Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 377
  • Last Modified:

Function for formatting an input box for currency...

Below is a currency format function i am trying to use.  It says to use the function on the onKeyPress event of the input box. I tried this but it then breaks my other Calc function i use on the onchange event for that input box.

CODE:

<html>

<head>

<SCRIPT LANGUAGE="JAVASCRIPT">
function validate()

{
if (GreenSheet.txtStore.options[0].selected) {
alert('Please select a store.');
event.returnValue=false;
}

{
mNv=GreenSheet.txtBEGDATE.value;
if (mNv=='') {
alert('Please select a date.');
event.returnValue=false;
}

{
mNv1=GreenSheet.Explain.value;
if (mNv1=='') {
alert('Please give an explaination for over/under.');
event.returnValue=false;
}
}
}
}


</script>

<SCRIPT LANGUAGE="JAVASCRIPT">
function KeyPress()
{
//alert(window.event.keyCode)
if (window.event.keyCode == 13)
window.event.keyCode =0;
}
</script>


<SCRIPT LANGUAGE="JAVASCRIPT">
     function calculate(rowIndex){
         rowIndex+="";
          var formObject = document.GreenSheet;    // Creating reference to form
         if(rowIndex/1>0 && rowIndex!="undefined"){
             
             var cash = formObject.elements['cash['+rowIndex+']'].value+"";
             var checks = formObject.elements['checks['+rowIndex+']'].value+"";
             var credits = formObject.elements['credits['+rowIndex+']'].value+"";
             
             if(!isNaN(cash) && !isNaN(checks) && !isNaN(credits)){ // All values are numeric
                 formObject.elements['total['+rowIndex+']'].value = (cash/1 + checks/1 + credits/1).toFixed(2);
                 
             }
         }
         
         theIndexA=1;
         var totalCash = 0;
         var totalChecks = 0;
         var totalCredits = 0;
         var totalSub = 0;
         var totalCredits = 0;
         while(formObject.elements['cash['+theIndexA+']']){
              totalCash+=(formObject.elements['cash['+theIndexA+']'].value+"")/1
              totalChecks+=(formObject.elements['checks['+theIndexA+']'].value+"")/1
              totalCredits+=(formObject.elements['credits['+theIndexA+']'].value+"")/1              
              theIndexA++;
         }
         formObject.cashSub.value = (totalCash).toFixed(2);
         formObject.checksSub.value = (totalChecks).toFixed(2);
         formObject.creditsSub.value = (totalCredits).toFixed(2);
         formObject.totalSub.value = (totalCash/1 + totalChecks/1 + totalCredits/1).toFixed(2);
         
         formObject.cashTotal.value = (totalCash + (formObject.cashMinus.value+"")/1).toFixed(2);
         formObject.checksTotal.value = (totalChecks + (formObject.checksMinus.value+"")/1).toFixed(2);
         formObject.creditsTotal.value = (totalCredits + (formObject.creditsMinus.value+"")/1).toFixed(2);        
         
         formObject.totalSub.value = (formObject.cashTotal.value/1 + formObject.checksTotal.value/1 + formObject.creditsTotal.value/1).toFixed(2);
         formObject.totalMinus.value = (formObject.cashMinus.value/1 + formObject.checksMinus.value/1 + formObject.creditsMinus.value/1).toFixed(2);
         
         formObject.totalOfAll.value = (formObject.totalSub.value/1 - formObject.totalMinus.value/1).toFixed(2);
            
         buttonState();
                             
    }
    </script>
      
      
<script type="text/javascript">
    function calculate1(rowIndex){
         rowIndex+="";
          var formObject = document.GreenSheet;    // Creating reference to form
         if(rowIndex/1>0 && rowIndex!="undefined"){
             
             var cash1 = formObject.elements['cash1['+rowIndex+']'].value+"";
             var checks1 = formObject.elements['checks1['+rowIndex+']'].value+"";
             var credits1 = formObject.elements['credits1['+rowIndex+']'].value+"";
             
             if(!isNaN(cash1) && !isNaN(checks1) && !isNaN(credits1)){ // All values are numeric
                 formObject.elements['total1['+rowIndex+']'].value = (cash1/1 + checks1/1 + credits1/1).toFixed(2);
                 
             }
         }
         
         theIndexB=1;
         var totalCash1 = 0;
         var totalChecks1 = 0;
         var totalCredits1 = 0;
         var totalSub1 = 0;
         var totalCredits1 = 0;
         while(formObject.elements['cash['+theIndexB+']']){
              totalCash1+=(formObject.elements['cash1['+theIndexB+']'].value+"")/1
              totalChecks1+=(formObject.elements['checks1['+theIndexB+']'].value+"")/1
              totalCredits1+=(formObject.elements['credits1['+theIndexB+']'].value+"")/1              
              theIndexB++;
         }
         
             formObject.cashSub1.value = (totalCash1).toFixed(2);
         formObject.checksSub1.value = (totalChecks1).toFixed(2);
         formObject.creditsSub1.value = (totalCredits1).toFixed(2);
         formObject.totalSub1.value = (totalCash1/1 + totalChecks1/1 + totalCredits1/1).toFixed(2);
         
              formObject.OverShortCash.value = (formObject.cashSub1.value/1 - formObject.cashTotal.value/1).toFixed(2);
             formObject.OverShortChecks.value = (formObject.checksSub1.value/1 - formObject.checksTotal.value/1).toFixed(2);
             formObject.OverShortCredits.value = (formObject.creditsSub1.value/1 - formObject.creditsTotal.value/1).toFixed(2);
             
             formObject.OverShortTotal.value = (formObject.creditsSub1.value/1 - formObject.creditsTotal.value/1).toFixed(2);
             
             formObject.OverUnder.value = (formObject.OverShortTotal.value/1).toFixed(2);

             buttonState();

    }
    </script>
      

<script type="text/javascript">
    function calculate2(rowIndexC){
      var formObject = document.GreenSheet;

            formObject.SalesTotal.value = (formObject.Amt0.value/1 + formObject.Amt1.value/1 + formObject.Amt2.value/1 + formObject.Amt3.value/1 + formObject.Amt4.value/1 + formObject.Amt5.value/1 + formObject.Amt6.value/1 + formObject.Amt7.value/1 + formObject.Amt8.value/1 + formObject.Amt9.value/1 + formObject.Amt10.value/1 + formObject.Amt11.value/1 + formObject.Amt12.value/1 + formObject.Amt13.value/1 + formObject.Amt14.value/1 + formObject.Amt15.value/1 + formObject.Amt16.value/1 + formObject.Amt17.value/1 + formObject.Amt18.value/1 + formObject.Amt19.value/1 + formObject.Amt20.value/1 + formObject.Amt21.value/1 + formObject.Amt22.value/1 + formObject.Amt23.value/1 + formObject.Amt24.value/1 + formObject.Amt25.value/1 + formObject.Amt26.value/1 + formObject.Amt27.value/1 + formObject.Amt28.value/1 + formObject.Amt29.value/1 + formObject.Amt30.value/1).toFixed(2);
             formObject.TotalRevenue.value = (formObject.SalesTotal.value/1 + formObject.SalesTax.value/1 - formObject.NonRev.value/1 + formObject.OverUnder.value/1).toFixed(2);
        formObject.OverUnder.value = (formObject.OverShortTotal.value/1).toFixed(2);
            
            if(formObject.totalSub1.value != formObject.TotalRevenue.value)formObject.Submit.disabled = true; else formObject.Submit.disabled=false

    }
    </script>      

<script type="text/javascript">
      function Disable(){
            var formObject = document.GreenSheet;
            formObject.Submit.disabled = true;
      }
      </script>      

<script type="text/javascript">
    function buttonState(){
         var formObject = document.GreenSheet;    // Creating reference to form    
         var elementBlank = false;
         var els = document.getElementsByTagName('INPUT');
         for(var no=0;no<els.length;no++){
                   if(els[no].type=='text'){
                        if(els[no].value.length==0){
                             formObject.Submit.disabled = true
                             return;
                        }
                   }        
         }        
         formObject.Submit.disabled = false  
         
         
    }
</script>


<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  Mario Costa (mariocosta@openlink.com.br) -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function currencyFormat(fld, milSep, decSep, e) {
var sep = 0;
var key = '';
var i = j = 0;
var len = len2 = 0;
var strCheck = '0123456789';
var aux = aux2 = '';
var whichCode = (window.Event) ? e.which : e.keyCode;
if (whichCode == 13) return true;  // Enter
key = String.fromCharCode(whichCode);  // Get key value from key code
if (strCheck.indexOf(key) == -1) return false;  // Not a valid key
len = fld.value.length;
for(i = 0; i < len; i++)
if ((fld.value.charAt(i) != '0') && (fld.value.charAt(i) != decSep)) break;
aux = '';
for(; i < len; i++)
if (strCheck.indexOf(fld.value.charAt(i))!=-1) aux += fld.value.charAt(i);
aux += key;
len = aux.length;
if (len == 0) fld.value = '';
if (len == 1) fld.value = '0'+ decSep + '0' + aux;
if (len == 2) fld.value = '0'+ decSep + aux;
if (len > 2) {
aux2 = '';
for (j = 0, i = len - 3; i >= 0; i--) {
if (j == 3) {
aux2 += milSep;
j = 0;
}
aux2 += aux.charAt(i);
j++;
}
fld.value = '';
len2 = aux2.length;
for (i = len2 - 1; i >= 0; i--)
fld.value += aux2.charAt(i);
fld.value += decSep + aux.substr(len - 2, len);
}
return false;
}
//  End -->
</script>



<title>Green Sheets</title>

</head>

<body background="../images/MetalNew1.jpg" onLoad="Disable()" onKeyPress="KeyPress()">

<FORM name="GreenSheet" METHOD="POST" ACTION="NumberGenGreenSheet.asp" onSubmit="validate()">
  <table width="658" border="0">
    <tr>
      <td><div align="center"><b><font face="Tahoma" size="4" color="#0033CC">Green Sheet</font></b></div></td>
    </tr>
    <tr>
      <td><div align="center"><b><font face="Tahoma" size="2">&nbsp;Store:</font></b><font face="Tahoma">
          <select size="1" name="txtStore" tabindex="3">
            <option selected>Select Store</option>
            <option>Arnold, MO</option>
            <option>Avon, IN</option>
            <option>Bluff, IN</option>
            <option>Carmel, IN</option>
            <option>Bethel, OH</option>
            <option>Chesterfield, MO</option>
            <option>Clayton, MO</option>
            <option>Columbia, IL</option>
            <option>Crestwood, MO</option>
            <option>Concord Fit, MO</option>
            <option>Concord Tan, MO</option>
            <option>Creve Coeur, MO</option>
            <option>Dorsett Fit, MO</option>
            <option>Dorsett Tan, MO</option>
            <option>Edwardsville, IL</option>
            <option>Ellisville, MO</option>
            <option>Fairview, IL</option>
            <option>Fenton, MO</option>
            <option>Festus, MO</option>
            <option>Hampton, MO</option>
            <option>Homewood, AL</option>
            <option>Kansas City, MO</option>
            <option>Lane, OH</option>
            <option>Manchester, MO</option>
            <option>Ofallon, MO</option>
            <option>Ofallon, IL</option>
            <option>Olive, MO</option>
            <option>Overland Park, KS</option>
            <option>Oxford, MI</option>
            <option>Pevely, MO</option>
            <option>Sawmill, OH</option>
            <option>St. Charles, MO</option>
            <option>Southport, IN</option>
            <option>Speedway, IN</option>
            <option>Springfield, MO</option>
            <option>Telegraph, MO</option>
            <option>Washington, MO</option>
            <option>Yorkshire, MO</option>
            <option>Zionsville, IN</option>
          </select>
        </font><font face="Tahoma" size="2"><b>Date:</b></font><font face="Tahoma" size="3">
        <input type="text" name="txtBEGDATE" size="8" onchange="buttonState()" tabindex="1" style="text-align: Center; font-family: Tahoma">
      </font><font face="Tahoma" size="2"><a href="https://webapps.thetanco.com/tancoweb/scripts/AspDatepicker.asp?inField=GreenSheet.txtBEGDATE" onload="self.focus()" onClick="window.open('https://webapps.thetanco.com/tancoweb/scripts/AspDatepicker.asp?inField=GreenSheet.txtBEGDATE', 'MyWin', 'status=no,resizable=no,scrollbars=no,width=200,height=140,left=250,top=250'); return false"><img border="0" src="../dynCalendar.gif" width="16" height="16"></a></font><font face="Tahoma">      </font></div></td>
    </tr>
  </table>
  <table border="0" width="658" height="487" align="left">
            <tr>
                  <td width="652" align="center" valign="top">
                  <table border="1" width="445" cellspacing="1">
                        <tr>
                              <td width="437" colspan="5" align="center"><b>
                              <font face="Tahoma">Cash Balance</font></b></td>
                        </tr>
                        <tr>
                              <td width="133" height="23">&nbsp;</td>
                              <td width="71" align="center" height="23"><b>
                              <font face="Tahoma" size="2">Cash</font></b></td>
                              <td width="71" align="center" height="23"><b>
                              <font face="Tahoma" size="2">Checks</font></b></td>
                              <td width="71" align="center" height="23"><b>
                              <font face="Tahoma" size="2">Credit</font></b></td>
                              <td width="71" align="center" height="23"><b>
                              <font face="Tahoma" size="2">Total</font></b></td>
                        </tr>
                        <tr>
                              <td width="133" height="26"><font face="Tahoma" size="2">Per System
                              Reports</font></td>
                              <td height="26" width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="cash[1]" onchange="calculate(1)" size="9"  style="text-align: right">
                            </font></div></td>
                              <td height="26" width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="checks[1]" onchange="calculate(1)" size="9"  style="text-align: right">
                            </font></div></td>
                              <td height="26" width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="credits[1]" onchange="calculate(1)" size="9"  style="text-align: right">
                            </font></div></td>
                              <td height="26" width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="total[1]" size="9" style="text-align: right" readonly>
                            </font></div></td>
                        </tr>
                        <tr>
                              <td width="133"><font face="Tahoma" size="2">Overring</font></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="cash[2]" onChange="calculate(2)" size="9" style="text-align: right">
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="checks[2]" onchange="calculate(2)" size="9" style="text-align: right">
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="credits[2]" onchange="calculate(2)" size="9" style="text-align: right">
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma" >
                            <input type="text" name="total[2]" size="9" style="text-align: right" readonly>
                            </font></div></td>
                        </tr>
                        
                        <tr>
                              <td width="133"><font face="Tahoma" size="2">Batch Out From Prior Day</font></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="cash[3]" value=0 onChange="calculate(3)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="checks[3]" onChange="calculate(3)" size="9" style="text-align: right">
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="credits[3]" onChange="calculate(3)" size="9" style="text-align: right">
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="total[3]" size="9" style="text-align: right" readonly>
                            </font></div></td>
                        </tr>
                        <tr>
                              <td width="133"><font face="Tahoma" size="2">Store Expenses</font></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="cash[4]" onChange="calculate(4)" size="9" style="text-align: right">
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="checks[4]" value=0 onChange="calculate(4)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="credits[4]" value=0 onChange="calculate(4)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="total[4]" size="9" style="text-align: right" readonly>
                            </font></div></td>
                        </tr>
                        <tr>
                              <td width="133"><font face="Tahoma" size="2">Refunds</font></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="cash[5]" onChange="calculate(5)" size="9" style="text-align: right">
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="checks[5]" onChange="calculate(5)" size="9" style="text-align: right">
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="credits[5]" onChange="calculate(5)" size="9" style="text-align: right">
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="total[5]" size="9" style="text-align: right" readonly>
                            </font></div></td>
                        </tr>
                        <tr>
                              <td width="437" colspan="5">&nbsp;</td>
                        </tr>
                        <tr>
                              <td width="133"><font face="Tahoma" size="2">Subtotal</font></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="cashSub" onchange="calculate()" size="9" style="text-align: right" readonly>
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text"name="checksSub" onchange="calculate()" size="9" style="text-align: right" readonly>
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="creditsSub" onchange="calculate()" size="9" style="text-align: right" readonly>
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="totalSub" size="9" style="text-align: right" readonly>
                            </font></div></td>
                        </tr>
                        <tr>
                              <td width="133"><font face="Tahoma" size="2">&nbsp;&nbsp;&nbsp;&nbsp;
                              Reclassifications</font></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="cashMinus" onChange="calculate()" size="9" style="text-align: right">
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="checksMinus" onChange="calculate()" size="9" style="text-align: right">
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="creditsMinus" onChange="calculate()" size="9" style="text-align: right">
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="totalMinus" value=0 onChange="calculate()" size="9" style="text-align: right" readonly>
                            </font></div></td>
                        </tr>
                        <tr>
                              <td width="437" colspan="5"><div align="center">
                                <input type="button" name="CalcB2" onmousedown="calculate()" value="Calculate">
                            </div></td>
                        </tr>
                        <tr>
                              <td width="133"><font face="Tahoma" size="2">Total</font></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="cashTotal" onchange="calculate()" style="text-align: right" size="9" readonly>
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="checksTotal" onchange="calculate()" style="text-align: right" size="9" readonly>
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="creditsTotal" style="text-align: right" size="9" readonly>
                            </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                            <input type="text" name="totalOfAll" style="text-align: right" size="9" readonly>
                            </font></div></td>
                        </tr>
                  </table>
                  <font size="2">
                  <br>
                  </font>                  <div align="center">
                        <table border="1" width="440">
                              <tr>
                                    <td width="149">&nbsp;</td>
                                    <td width="71" align="center"><b>
                                    <font face="Tahoma" size="2">
                                    Cash</font></b></td>
                                    <td width="71" align="center"><b>
                                    <font face="Tahoma" size="2">
                                    Checks</font></b></td>
                                    <td width="71" align="center"><b>
                                    <font face="Tahoma" size="2">
                                    Credit</font></b></td>
                                    <td width="71" align="center"><b>
                                    <font face="Tahoma" size="2">
                                    Total</font></b></td>
                              </tr>
                              <tr>
                                    <td width="149"><font face="Tahoma" size="2">Count of Cash and
                                    Checks</font></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="cash1[1]" onChange="calculate1(1)" size="9" style="text-align: right">
                                  </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="checks1[1]" onChange="calculate1(1)" size="9" style="text-align: right">
                                  </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="credits1[1]" onChange="calculate1(1)" size="9" style="text-align: right">
                                  </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="total1[1]" size="9" readonly style="text-align: right">
                                  </font></div></td>
                              </tr>
                              <tr>
                                    <td width="149"><font face="Tahoma" size="2">Electronic Checks</font></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="cash1[2]" onChange="calculate1(2)" size="9" style="text-align: right">
                                    </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="checks1[2]" onChange="calculate1(2)" size="9" style="text-align: right">
                                  </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="credits1[2]" onChange="calculate1(2)" size="9" style="text-align: right">
                                  </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="total1[2]" size="9" readonly style="text-align: right">
                                  </font></div></td>
                              </tr>
                              <tr>
                                    <td width="149"><font face="Tahoma" size="2">Visa</font></td>
                                    <td width="71" align="center"><div align="center"><font face="Tahoma">
                                      <input type="text" name="cash1[3]" value=0 onChange="calculate1(3)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                                    </font></div></td>
                                    <td width="71" align="center"><div align="center"><font face="Tahoma">
                                      <input type="text" name="checks1[3]" value=0 onChange="calculate1(3)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                                    </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="credits1[3]" onChange="calculate1(3)" style="text-align: right" size="9">
                                  </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="total1[3]" size="9" style="text-align: right" readonly>
                                  </font></div></td>
                              </tr>
                              <tr>
                                    <td width="149"><font face="Tahoma" size="2">MasterCard</font></td>
                                    <td width="71" align="center"><div align="center"><font face="Tahoma">
                                      <input type="text" name="cash1[4]" value=0 onChange="calculate1(4)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                                    </font></div></td>
                                    <td width="71" align="center"><div align="center"><font face="Tahoma">
                                      <input type="text" name="checks1[4]" value=0 onChange="calculate1(4)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                                    </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text"name="credits1[4]" onChange="calculate1(4)" size="9" style="text-align: right">
                                  </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="total1[4]" size="9" style="text-align: right" readonly>
                                  </font></div></td>
                              </tr>
                              <tr>
                                    <td width="149"><font face="Tahoma" size="2">American Express</font></td>
                                    <td width="71" align="center"><div align="center"><font face="Tahoma">
                                      <input type="text" name="cash1[5]" value=0 onChange="calculate1(5)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                                    </font></div></td>
                                    <td width="71" align="center"><div align="center"><font face="Tahoma">
                                      <input type="text"name="checks1[5]" value=0 onChange="calculate1(5)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                                    </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="credits1[5]" onChange="calculate1(5)" size="9" style="text-align: right">
                                  </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="total1[5]" size="9" style="text-align: right" readonly>
                                  </font></div></td>
                              </tr>
                              <tr>
                                    <td width="149"><font face="Tahoma" size="2">Discover</font></td>
                                    <td width="71" align="center"><div align="center"><font face="Tahoma">
                                      <input type="text" name="cash1[6]" value=0 onChange="calculate1(6)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                                    </font></div></td>
                                    <td width="71" align="center"><div align="center"><font face="Tahoma">
                                      <input type="text"name="checks1[6]" value=0 onChange="calculate1(6)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                                    </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="credits1[6]" onChange="calculate1(6)" size="9" style="text-align: right">
                                  </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="total1[6]" size="9" style="text-align: right" readonly>
                                  </font></div></td>
                              </tr>
                              <tr>
                                    <td width="149"><font face="Tahoma" size="2">Debit/ATM</font></td>
                                    <td width="71" align="center"><div align="center"><font face="Tahoma">
                                      <input type="text" name="cash1[7]" value=0 onChange="calculate1(7)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                                    </font></div></td>
                                    <td width="71" align="center"><div align="center"><font face="Tahoma">
                                      <input type="text" name="checks1[7]" value=0 onChange="calculate1(7)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                                    </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="credits1[7]" onChange="calculate1(7)" size="9" style="text-align: right">
                                  </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="total1[7]" size="9" style="text-align: right" readonly>
                                  </font></div></td>
                              </tr>
                              <tr>
                                    <td width="149"><font face="Tahoma" size="2">Redeem Gift
                                    Certificates</font></td>
                                    <td width="71" align="center"><div align="center"><font face="Tahoma">
                                      <input type="text" name="cash1[8]" value=0 onChange="calculate1(8)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                                    </font></div></td>
                                    <td width="71" align="center"><div align="center"><font face="Tahoma">
                                      <input type="text" name="checks1[8]" value=0 onChange="calculate1(8)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                                    </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="credits1[8]" onChange="calculate1(8)" size="9" style="text-align: right">
                                  </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="total1[8]" size="9" style="text-align: right" readonly>
                                  </font></div></td>
                              </tr>
                              <tr>
                                    <td width="430" colspan="5">&nbsp;</td>
                              </tr>
                              <tr>
                                    <td width="149"><font face="Tahoma" size="2">Total</font></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="cashSub1" onchange="calculate1()" style="text-align: right" size="9" readonly>
                                  </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="checksSub1" onchange="calculate1()" style="text-align: right" size="9" readonly>
                                  </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="creditsSub1" onchange="calculate1()" style="text-align: right" size="9" readonly>
                                  </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="totalSub1" size="9" style="text-align: right" readonly>
                                  </font></div></td>
                              </tr>
                              <tr>
                                    <td width="430" colspan="5">&nbsp;</td>
                              </tr>
                              <tr>
                                    <td width="149"><font face="Tahoma" size="2">Over/Under</font></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="OverShortCash"  size="9" style="text-align: right" readonly>
                                  </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="OverShortChecks" size="9" style="text-align: right" readonly>
                                  </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="OverShortCredits" size="9" style="text-align: right" readonly>
                                  </font></div></td>
                                    <td width="71"><div align="center"><font face="Tahoma">
                                  <input type="text" name="OverShortTotal" size="9" style="text-align: right" readonly>
                                  </font></div></td>
                              </tr>
                              <tr>
                                    <td width="430" colspan="5"><div align="center">
                                      <input type="button" name="CalcB" onmousedown="calculate1();ConfirmTotals()" value="Calculate">
                                  </div></td>
                              </tr>
                              <tr>
                                    <td width="149"><font face="Tahoma" size="2">Explaination</font></td>
                                    <td width="313" colspan="4">
                                    <p align="center"><font face="Tahoma">
                                    <textarea rows="3" name="Explain" cols="38"></textarea></font></td>
                              </tr>
                        </table>
                  <p>&nbsp;</p>
                      <p>&nbsp;</p>
                  <p>
                <input type="Submit" name="Submit" value="Submit">
                <input type="Reset" name="reset">
                </p>
                  <p>&nbsp;</p>
                  </div>
                  </td>
                  <td width="203" align="center" valign="top">
                  <table border="1" width="31%" align="left">
                        <tr>
                              <td colspan="3" align="center"><b>
                              <font face="Tahoma">Revenue Balance</font></b></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><b>
                              <font face="Tahoma" size="2">Code</font></b></td>
                              <td width="63%" align="center"><b>
                              <font face="Tahoma" size="2">
                              Department</font></b></td>
                              <td width="19%" align="center"><b>
                              <font face="Tahoma" size="2">Amount</font></b></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">0</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt0" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">1</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt1" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">2</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt2" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">3</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt3" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">4</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt4" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">5</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt5" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">6</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt6" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">7</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt7" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">8</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt8" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">9</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt9" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">10</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt10" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">11</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt11" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">12</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt12" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">13</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt13" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">14</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt14" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">15</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt15" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">16</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt16" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">17</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt17" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">18</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt18" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">19</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt19" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">20</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt20" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">21</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt21" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">22</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt22" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">23</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt23" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">24</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt24" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">25</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt25" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">26</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt26" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">27</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt27" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">28</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt28" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">29</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt29" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td width="41" align="center"><font face="Tahoma" size="2">30</font></td>
                              <td width="63%">&nbsp;</td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="Amt30" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td colspan="3">&nbsp;</td>
                        </tr>
                        <tr>
                              <td colspan="2"><font face="Tahoma" size="2">Sales</font></td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="SalesTotal" size="9" onchange="calculate2()" style="text-align: right" readonly></font></td>
                        </tr>
                        <tr>
                              <td colspan="2"><font face="Tahoma" size="2">Plus: Sales Tax</font></td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="SalesTax" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td colspan="2"><font face="Tahoma" size="2">Less: Non-Revenue</font></td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="NonRev" size="9" onchange="calculate2()" style="text-align: right"></font></td>
                        </tr>
                        <tr>
                              <td colspan="2"><font face="Tahoma" size="2">Over/Under</font></td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="OverUnder" size="9" onchange="calculate2()" style="text-align: right" readonly></font></td>
                        </tr>
                        <tr>
                              <td colspan="3"><div align="center"><input type="button" name="CalcB22" onmousedown="calculate2()" value="Calculate">
                              </div></td>
                        </tr>
                        <tr>
                              <td colspan="2"><font face="Tahoma" size="2">Total Revenue</font></td>
                              <td width="19%"><font face="Tahoma">
                              <input type="text" name="TotalRevenue" size="9" style="text-align: right" readonly></font></td>
                        </tr>
                  </table>
                  </td>
            </tr>
                  
  </table>
</form>
</body>

</html>

Thanks,
Andrew


0
Ahelbling
Asked:
Ahelbling
  • 23
  • 20
1 Solution
 
trailblazzyr55Commented:
Curious, what are you trying to do, and with what fields? trying to get an idea ;o)

~trail
0
 
AhelblingAuthor Commented:
i am trying to format EVERY field with 2 decimals and commas.
0
 
trailblazzyr55Commented:
so you'd want it to format like so...

from: 1002450

to: $10,024.50

right?

not a problem ;o)

~trail
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
AhelblingAuthor Commented:
yes that is what i am after.
0
 
trailblazzyr55Commented:
just curious, in the first section, is the refunds part of the reclassifications?

so the total of each cell in the reclass's in derived from the cell amount of the refunds?

just about finished ;o) the math was a bit off...

~trail
0
 
AhelblingAuthor Commented:
no they are not - reclassifications are when the monkeys at the store accidentally choose the wrong payment type for a sale.  ie: customer paid cash, but they chose that they paid with credit card on the pos program. Reclassifications is where that is noted.
0
 
trailblazzyr55Commented:
refunds do get deducted though right? from the total?

~trail
0
 
AhelblingAuthor Commented:
yes they do - and now i see that they are not doing that correctly.
0
 
AhelblingAuthor Commented:
actually they are - nevermind the refunds - it is working properly.
0
 
AhelblingAuthor Commented:
any luck??
0
 
trailblazzyr55Commented:
yeah I have almost all of them formatting for currency the main boxes where you enter your amounts is a little more tricky, I'm trying to work out the kinks. Just been busy with work. Will post something soon...

~trail
0
 
AhelblingAuthor Commented:
no problem - thanks!
0
 
trailblazzyr55Commented:
hey, here ya go, sorry it took a bit, was busy at work here, but I think this is what you're looking for, I did the dollar formatting with $'s and ','s for dollar values. I had to add two additional functions, but anyway have a look and tell me what ya think... for the other table, not sure what you wanted to do with that? The revenue balance table? Did you want the dollar formatting with that as well?

anyway have a look, just cut n paste ;o) I had to change values in the form too so if you just cut n paste the javascript, you'll get errors..

here's the code...


<script type="text/javascript">
function RevertCurr(val)
{
    return val.replace(/[\$\,]/g, '');
}
    function calculate(obj,rowIndex){      
         rowIndex+="";
          var formObject = document.GreenSheet;
               if(rowIndex/1>0 && rowIndex!="undefined"){
             var cash = RevertCurr(formObject.elements['cash['+rowIndex+']'].value+"");
             var checks = RevertCurr(formObject.elements['checks['+rowIndex+']'].value+"");
             var credits = RevertCurr(formObject.elements['credits['+rowIndex+']'].value+"");
             if(!isNaN(cash) && !isNaN(checks) && !isNaN(credits)){
                 formObject.elements['total['+rowIndex+']'].value = formatCurrency((cash/1 + checks/1 + credits/1));
             }
         }
         theIndex=1;
             var totalCash = 0;
         var totalChecks = 0;
         var totalCredits = 0;
         var totalSub = 0;
         while(formObject.elements['cash['+theIndex+']']){
              totalCash+=RevertCurr((formObject.elements['cash['+theIndex+']'].value+""))/1
              totalChecks+=RevertCurr((formObject.elements['checks['+theIndex+']'].value+""))/1
              totalCredits+=RevertCurr((formObject.elements['credits['+theIndex+']'].value+""))/1              
              theIndex++;
         }
             if (formObject.cashMinus.value != 0){
                   var format1 = RevertCurr(formObject.cashMinus.value);
                         }else{
                               var format1 = 0
                         }
             if (formObject.checksMinus.value != 0){
                   var format2 = RevertCurr(formObject.checksMinus.value);
                         }else{
                               var format2 = 0
                         }
             if (formObject.creditsMinus.value != 0){
                   var format3 = RevertCurr(formObject.creditsMinus.value);
                         }else{
                               var format3 = 0
                         }
            var sub1 = (totalCash + totalChecks + totalCredits)
            var sub2 = (format1/1 + format2/1 + format3/1).toFixed(2);
            var sub3 = (sub1 - sub2/1).toFixed(2);
         formObject.cashSub.value = formatCurrency((totalCash).toFixed(2));
         formObject.checksSub.value = formatCurrency((totalChecks).toFixed(2));
         formObject.creditsSub.value = formatCurrency((totalCredits).toFixed(2));       
             formObject.totalSub.value = formatCurrency(sub1)
             
             formObject.cashMinus.value = formatCurrency(format1);
             formObject.checksMinus.value = formatCurrency(format2);
             formObject.creditsMinus.value = formatCurrency(format3);
             formObject.totalMinus.value = formatCurrency(sub2);
                   
         formObject.cashTotal.value = formatCurrency((totalCash - (format1+"")/1).toFixed(2));
         formObject.checksTotal.value = formatCurrency((totalChecks - (format2+"")/1).toFixed(2));
         formObject.creditsTotal.value = formatCurrency((totalCredits - (format3+"")/1).toFixed(2));                    
         formObject.totalOfAll.value = formatCurrency(sub3);
             
             obj.value = formatCurrency(obj.value);
    }

    function calculate1(obj,index){
         index+="";
          var formObject = document.GreenSheet;
         if(index/1>0 && index!="undefined"){
             var cash1 = RevertCurr(formObject.elements['cash1['+index+']'].value+"");
             var checks1 = RevertCurr(formObject.elements['checks1['+index+']'].value+"");
             var credits1 = RevertCurr(formObject.elements['credits1['+index+']'].value+"");
             if(!isNaN(cash1) && !isNaN(checks1) && !isNaN(credits1)){
                 formObject.elements['total1['+index+']'].value = formatCurrency((cash1/1 + checks1/1 + credits1/1).toFixed(2));
             }
         }
         theIndexTwo=1;
         var totalCash1 = 0;
         var totalChecks1 = 0;
         var totalCredits1 = 0;
         var totalSub1 = 0;
         var totalCredits1 = 0;
              while(formObject.elements['cash1['+theIndexTwo+']']){    
              totalCash1+=RevertCurr((formObject.elements['cash1['+theIndexTwo+']'].value+""))/1
              totalChecks1+=RevertCurr((formObject.elements['checks1['+theIndexTwo+']'].value+""))/1
              totalCredits1+=RevertCurr((formObject.elements['credits1['+theIndexTwo+']'].value+""))/1              
              theIndexTwo++;
         }
             var subA1 = (totalCash1 + totalChecks1 + totalCredits1)
         formObject.cashSub1.value = formatCurrency((totalCash1).toFixed(2));
         formObject.checksSub1.value = formatCurrency((totalChecks1).toFixed(2));
         formObject.creditsSub1.value = formatCurrency((totalCredits1).toFixed(2));       
             formObject.totalSub1.value = formatCurrency(subA1)
         obj.value = formatCurrency(obj.value);
    }
      
      function formatCurrency(strValue)
      {
                  strValue = strValue.toString().replace(/\$|\,/g,'');
                  dblValue = parseFloat(strValue);
                  blnSign = (dblValue == (dblValue = Math.abs(dblValue)));
                  dblValue = Math.floor(dblValue*100+0.50000000001);
                  intCents = dblValue%100;
                  strCents = intCents.toString();
                  dblValue = Math.floor(dblValue/100).toString();
            if(intCents<10)
                  strCents = "0" + strCents;
            for (var i = 0; i < Math.floor((dblValue.length-(1+i))/3); i++)
                  dblValue = dblValue.substring(0,dblValue.length-(4*i+3))+','+
                  dblValue.substring(dblValue.length-(4*i+3));
            return (((blnSign)?'':'-') + '$' + dblValue + '.' + strCents);
      }
</script>

<body background="../images/MetalNew1.jpg">

<FORM name="GreenSheet" METHOD="POST" ACTION="NumberGenGreenSheet.asp" onblur="calculate(); calculate1();">
  <table width="658" border="0">
    <tr>
      <td><div align="center"><b><font face="Tahoma" size="4" color="#0033CC">Green Sheet</font></b></div></td>
    </tr>
    <tr>
      <td><div align="center"><b><font face="Tahoma" size="2">&nbsp;Store:</font></b><font face="Tahoma">
          <select size="1" name="txtStore" tabindex="3">
            <option selected>Select Store</option>
            <option>Arnold, MO</option>
            <option>Avon, IN</option>
            <option>Bluff, IN</option>
            <option>Carmel, IN</option>
            <option>Bethel, OH</option>
            <option>Chesterfield, MO</option>
            <option>Clayton, MO</option>
            <option>Columbia, IL</option>
            <option>Crestwood, MO</option>
            <option>Concord Fit, MO</option>
            <option>Concord Tan, MO</option>
            <option>Creve Coeur, MO</option>
            <option>Dorsett Fit, MO</option>
            <option>Dorsett Tan, MO</option>
            <option>Edwardsville, IL</option>
            <option>Ellisville, MO</option>
            <option>Fairview, IL</option>
            <option>Fenton, MO</option>
            <option>Festus, MO</option>
            <option>Hampton, MO</option>
            <option>Homewood, AL</option>
            <option>Kansas City, MO</option>
            <option>Lane, OH</option>
            <option>Manchester, MO</option>
            <option>Ofallon, MO</option>
            <option>Ofallon, IL</option>
            <option>Olive, MO</option>
            <option>Overland Park, KS</option>
            <option>Oxford, MI</option>
            <option>Pevely, MO</option>
            <option>Sawmill, OH</option>
            <option>St. Charles, MO</option>
            <option>Southport, IN</option>
            <option>Speedway, IN</option>
            <option>Springfield, MO</option>
            <option>Telegraph, MO</option>
            <option>Washington, MO</option>
            <option>Yorkshire, MO</option>
            <option>Zionsville, IN</option>
          </select>
        </font><font face="Tahoma" size="2"><b>Date:</b></font><font face="Tahoma" size="3">
        <input type="text" name="txtBEGDATE" size="8" tabindex="1" style="text-align: Center; font-family: Tahoma">
      </font><font face="Tahoma" size="2"><a href="https://webapps.thetanco.com/tancoweb/scripts/AspDatepicker.asp?inField=GreenSheet.txtBEGDATE" onload="self.focus()" onClick="window.open('https://webapps.thetanco.com/tancoweb/scripts/AspDatepicker.asp?inField=GreenSheet.txtBEGDATE', 'MyWin', 'status=no,resizable=no,scrollbars=no,width=200,height=140,left=250,top=250'); return false"><img border="0" src="../dynCalendar.gif" width="16" height="16"></a></font><font face="Tahoma">      </font></div></td>
    </tr>
  </table>
  <table border="0" width="658" height="487" align="left">
          <tr>
               <td width="445" align="center" valign="top">
               <table border="1" width="445" cellspacing="1">
                    <tr>
                         <td width="437" colspan="5" align="center"><b>
                         <font face="Tahoma">Cash Balance</font></b></td>
                    </tr>
                    <tr>
                         <td width="133" height="23">&nbsp;</td>
                         <td width="71" align="center" height="23"><b>
                         <font face="Tahoma" size="2">Cash</font></b></td>
                         <td width="71" align="center" height="23"><b>
                         <font face="Tahoma" size="2">Checks</font></b></td>
                         <td width="71" align="center" height="23"><b>
                         <font face="Tahoma" size="2">Credit</font></b></td>
                         <td width="71" align="center" height="23"><b>
                         <font face="Tahoma" size="2">Total</font></b></td>
                    </tr>
                    <tr>
                         <td width="133" height="26"><font face="Tahoma" size="2">Per System
                         Reports</font></td>
                         <td height="26" width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cash[1]" onChange="calculate(this,1)" onfocus="this.value=''" size="9"  style="text-align: right">
                        </font></div></td>
                         <td height="26" width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checks[1]" onchange="calculate(this,1)" onfocus="this.value=''" size="9"  style="text-align: right">
                        </font></div></td>
                         <td height="26" width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="credits[1]" onchange="calculate(this,1)" onfocus="this.value=''" size="9"  style="text-align: right">
                        </font></div></td>
                         <td height="26" width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="total[1]" size="9" style="text-align: right" readonly>
                        </font></div></td>
                    </tr>
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">Overring</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cash[2]" onChange="calculate(this,2)" onfocus="this.value=''" size="9" style="text-align: right">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checks[2]" onchange="calculate(this,2)" onfocus="this.value=''" size="9" style="text-align: right">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="credits[2]" onchange="calculate(this,2)" onfocus="this.value=''" size="9" style="text-align: right">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma" >
                        <input type="text" name="total[2]" size="9" style="text-align: right" readonly>
                        </font></div></td>
                    </tr>
                   
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">Batch Out From Prior Day</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cash[3]" value=0 onChange="calculate(this,3)" size="9" style="text-align: right" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checks[3]" onChange="calculate(this,3)" onfocus="this.value=''" size="9" style="text-align: right">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="credits[3]" onChange="calculate(this,3)" onfocus="this.value=''" size="9" style="text-align: right">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="total[3]" size="9" style="text-align: right" readonly>
                        </font></div></td>
                    </tr>
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">Store Expenses</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cash[4]" onChange="calculate(this,4)" onfocus="this.value=''" size="9" style="text-align: right">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checks[4]" value=0 onChange="calculate(this,4)" size="9" style="text-align: right" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="credits[4]" value=0 onChange="calculate(this,4)" size="9" style="text-align: right" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="total[4]" size="9" style="text-align: right" readonly>
                        </font></div></td>
                    </tr>
                    <tr>
                         
            <td width="133"><font face="Tahoma" size="2">Reclassifications</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cash[5]" onChange="calculate(this,5)" onfocus="this.value=''" size="9" style="text-align: right">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checks[5]" onChange="calculate(this,5)" onfocus="this.value=''" size="9" style="text-align: right">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="credits[5]" onChange="calculate(this,5)" onfocus="this.value=''" size="9" style="text-align: right">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="total[5]" size="9" style="text-align: right" readonly>
                        </font></div></td>
                    </tr>
                    <tr>
                         <td width="437" colspan="5">&nbsp;</td>
                    </tr>
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">Subtotal</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cashSub" size="9" style="text-align: right" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text"name="checksSub" size="9" style="text-align: right" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="creditsSub" size="9" style="text-align: right" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="totalSub" size="9" style="text-align: right" readonly>
                        </font></div></td>
                    </tr>
                    <tr>
                         
            <td width="133"><font face="Tahoma" size="2">&nbsp;&nbsp;&nbsp;&nbsp;
              Refunds</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cashMinus" onChange="calculate(this,1)" onfocus="this.value=''" size="9" style="text-align: right">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checksMinus" onChange="calculate(this,1)" onfocus="this.value=''" size="9" style="text-align: right">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="creditsMinus" onChange="calculate(this,1)" onfocus="this.value=''" size="9" style="text-align: right">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="totalMinus" value=0 size="9" style="text-align: right" readonly>
                        </font></div></td>
                    </tr>
                    <tr>
                         <td width="437" colspan="5">&nbsp;</td>
                    </tr>
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">Total</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cashTotal" style="text-align: right" size="9" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checksTotal" style="text-align: right" size="9" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="creditsTotal" style="text-align: right" size="9" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="totalOfAll" style="text-align: right" size="9" readonly>
                        </font></div></td>
                    </tr>
               </table>
               <font size="2">
               <br>
               </font>               <div align="center">
                    <table border="1" width="440">
                         <tr>
                              <td width="149">&nbsp;</td>
                              <td width="71" align="center"><b>
                              <font face="Tahoma" size="2">
                              Cash</font></b></td>
                              <td width="71" align="center"><b>
                              <font face="Tahoma" size="2">
                              Checks</font></b></td>
                              <td width="71" align="center"><b>
                              <font face="Tahoma" size="2">
                              Credit</font></b></td>
                              <td width="71" align="center"><b>
                              <font face="Tahoma" size="2">
                              Total</font></b></td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">Count of Cash and
                              Checks</font></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="cash1[1]" onChange="calculate1(this,1)" onfocus="this.value=''" size="9" style="text-align: right">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="checks1[1]" onChange="calculate1(this,1)" onfocus="this.value=''" size="9" style="text-align: right">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="credits1[1]" onChange="calculate1(this,1)" onfocus="this.value=''" size="9" style="text-align: right">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="total1[1]" size="9" readonly style="text-align: right">
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">Electronic Checks</font></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="cash1[2]" onChange="calculate1(this,2)" onfocus="this.value=''" size="9" style="text-align: right">
                              </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="checks1[2]" onChange="calculate1(this,2)" onfocus="this.value=''" size="9" style="text-align: right">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="credits1[2]" onChange="calculate1(this,2)" onfocus="this.value=''" size="9" style="text-align: right">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="total1[2]" size="9" readonly style="text-align: right">
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">Visa</font></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="cash1[3]" value=0 onChange="calculate1(this,3)" size="9" style="text-align: right" readonly>
                              </font></div></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="checks1[3]" value=0 onChange="calculate1(this,3)" size="9" style="text-align: right">
                              </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="credits1[3]" onChange="calculate1(this,3)" onfocus="this.value=''" style="text-align: right" size="9">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="total1[3]" size="9" style="text-align: right" readonly>
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">MasterCard</font></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="cash1[4]" value=0 onChange="calculate1(this,4)" size="9" style="text-align: right" readonly>
                              </font></div></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="checks1[4]" value=0 onChange="calculate1(this,4)" size="9" style="text-align: right">
                              </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text"name="credits1[4]" onChange="calculate1(this,4)" onfocus="this.value=''" size="9" style="text-align: right">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="total1[4]" size="9" style="text-align: right" readonly>
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">American Express</font></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="cash1[5]" value=0 onChange="calculate1(this,5)" size="9" style="text-align: right" readonly>
                              </font></div></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text"name="checks1[5]" value=0 onChange="calculate1(this,5)" size="9" style="text-align: right">
                              </font></div></td>

                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="credits1[5]" onChange="calculate1(this,5)" onfocus="this.value=''" size="9" style="text-align: right">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="total1[5]" size="9" style="text-align: right" readonly>
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">Discover</font></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="cash1[6]" value=0 onChange="calculate1(this,6)" size="9" style="text-align: right" readonly>
                              </font></div></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text"name="checks1[6]" value=0 onChange="calculate1(this,6)" size="9" style="text-align: right">
                              </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="credits1[6]" onChange="calculate1(this,6)" size="9" onfocus="this.value=''" style="text-align: right">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="total1[6]" size="9" style="text-align: right" readonly>
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">Debit/ATM</font></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="cash1[7]" value=0 onChange="calculate1(this,7)" size="9" style="text-align: right" readonly>
                              </font></div></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="checks1[7]" value=0 onChange="calculate1(this,7)" size="9" style="text-align: right">
                              </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="credits1[7]" onChange="calculate1(this,7)" size="9" onfocus="this.value=''" style="text-align: right">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="total1[7]" size="9" style="text-align: right" readonly>
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">Redeem Gift
                              Certificates</font></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="cash1[8]" value=0 onChange="calculate1(this,8)" size="9" style="text-align: right" readonly>
                              </font></div></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="checks1[8]" value=0 onChange="calculate1(this,8)" size="9" style="text-align: right">
                              </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="credits1[8]" onChange="calculate1(this,8)" size="9" onfocus="this.value=''" style="text-align: right">
                             </font></div></td>

                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="total1[8]" size="9" style="text-align: right" readonly>
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="430" colspan="5">&nbsp;</td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">Total</font></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="cashSub1" style="text-align: right" size="9" readonly>
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="checksSub1" style="text-align: right" size="9" readonly>
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="creditsSub1" style="text-align: right" size="9" readonly>
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="totalSub1" size="9" style="text-align: right" readonly>
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="430" colspan="5">&nbsp;</td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">Over/Short</font></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="T63" size="9">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="T64" size="9">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="T65" size="9">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="T66" size="9">
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="430" colspan="5">&nbsp;</td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">Explaination</font></td>
                              <td width="313" colspan="4">
                              <p align="center"><font face="Tahoma">
                              <textarea rows="3" name="S1" cols="38"></textarea></font></td>
                         </tr>
                    </table>
                <p>&nbsp;</p>
                   <p>&nbsp;</p>
                <p>&nbsp;              </p>
                </div>
               </td>
               <td width="203" align="center" valign="top">
               <table border="1" width="31%" align="left">
                    <tr>
                         <td colspan="3" align="center"><b>
                         <font face="Tahoma">Revenue Balance</font></b></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><b>
                         <font face="Tahoma" size="2">Code</font></b></td>
                         <td width="63%" align="center"><b>
                         <font face="Tahoma" size="2">
                         Department</font></b></td>
                         <td width="19%" align="center"><b>
                         <font face="Tahoma" size="2">Amount</font></b></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">0</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T67" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">1</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T68" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">2</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T69" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">3</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T70" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">4</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T71" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">5</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T72" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">6</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T73" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">7</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T74" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">8</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T75" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">9</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T76" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">10</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T77" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">11</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T78" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">12</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T79" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">13</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T80" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">14</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T81" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">15</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T82" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">16</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T83" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">17</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T84" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">18</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T85" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">19</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T86" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">20</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T87" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">21</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T88" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">22</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T89" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">23</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T90" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">24</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T91" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">25</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T92" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">26</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T93" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">27</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T94" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">28</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T95" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">29</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T96" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">30</font></td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T97" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41">&nbsp;</td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%">&nbsp;</td>
                    </tr>
                    <tr>
                         <td width="41">&nbsp;</td>
                         <td width="63%"><font face="Tahoma" size="2">Sales</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T98" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41">&nbsp;</td>
                         <td width="63%"><font face="Tahoma" size="2">Plus: Sales Tax</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T99" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41">&nbsp;</td>
                         <td width="63%"><font face="Tahoma" size="2">Less: Non-Revenue</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T100" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41">&nbsp;</td>
                         <td width="63%"><font face="Tahoma" size="2">Over/Under</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T101" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41">&nbsp;</td>
                         <td width="63%">&nbsp;</td>
                         <td width="19%">&nbsp;</td>
                    </tr>
                    <tr>
                         <td width="41">&nbsp;</td>
                         <td width="63%"><font face="Tahoma" size="2">Total Revenue</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="T102" size="9"></font></td>
                    </tr>
               </table>
               </td>
          </tr>
               <tr>
               <td width="652" align="center" valign="center" colspan="2"><p>

            </p>
                 <p>
                <input type="Submit" name="submit" value="submit">
                <input type="Reset" name="reset">
                </p>

</td>
               </tr>
               
  </table>
</form>
</body>

</html>


hope that helps! ;o)
~trail
0
 
trailblazzyr55Commented:
oh one other thing, thought it would be a little easier on form input, I added the onfocus="this.value=''" to the fields so that you don't have to double click or anything to change the value, if you click on the field the values goes away and you can easily enter a new one hastle free.. ;o)
0
 
AhelblingAuthor Commented:
trail...

unfortunately a lot of things have changed since you first looked at the code i posted.

Can you show me how to apply your RevertCurr(val) function to the updated code i have??

CODE:


<%
Sub PopulateDropDown
 Dim objConn
 Dim objRS
 Dim strSQL
 Dim CustID
 Dim UserName

 Const adOpenForwardOnly = 0
 Const adLockReadOnly  = 1

 Set objConn = Server.CreateObject("ADODB.Connection")
 Set objRS  = Server.CreateObject("ADODB.Recordset")

 objConn.Open "Provider=sqloledb;" & _
           "Data Source=database-server;" & _
           "Initial Catalog=Heat_Team_Tan;" & _
           "User Id=empnum;" & _
           "Password=monktard"

 strSQL = "SELECT CustID FROM Profile ORDER BY CUSTID"

 objRS.Open strSQL, objConn, adOpenForwardOnly, adLockReadOnly

Response.Write "<SELECT Name=""txtStore"">"
Response.Write "<OPTION Value=""""></OPTION>"

 Do Until objRS.EOF = True
  CustID  = objRS("CustID").Value

   Response.Write "<OPTION Value=""" & CustID & """>"
   Response.Write CustID
   Response.Write "</OPTION>"

 objRS.Movenext
 Loop

 Response.Write "</SELECT>"

 objRS.Close
 Set objRS = Nothing
 Set objConn = Nothing
End Sub
%>


<html>

<head>

<script language="JavaScript1.2">

function SizeScreen()
{
top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
}
</script>


<SCRIPT LANGUAGE="JAVASCRIPT">

function validate()
{
var GreenSheet = document.GreenSheet;
if (GreenSheet.txtStore.options[0].selected) {
alert('Please select a store.');
return false;
}

{
mNv=GreenSheet.txtBEGDATE.value;
if (mNv=='') {
alert('Please select a date.');
return false;
}
if ((GreenSheet.OverUnder.value >= 7.00 || GreenSheet.OverUnder.value <= -7.00) && GreenSheet.Explain.value.length <1) {
alert('Please give an explaination for over/under.');
return false;
}
}
}
</script>


<SCRIPT LANGUAGE="JAVASCRIPT">
function minusfunc(obj)
{
if(obj.value.charAt(0) != '-')
{
var temp = obj.value * -1
obj.value = temp;
}
}
</script>

<SCRIPT LANGUAGE="JAVASCRIPT">
function KeyPress()
{
//alert(window.event.keyCode)
if (window.event.keyCode == 13)
window.event.keyCode =0;
}
</script>


<SCRIPT LANGUAGE="JAVASCRIPT">
     function calculate(rowIndex){
         rowIndex+="";
          var formObject = document.GreenSheet;    // Creating reference to form
         if(rowIndex/1>0 && rowIndex!="undefined"){
             
             var cash = formObject.elements['cash['+rowIndex+']'].value+"";
             var checks = formObject.elements['checks['+rowIndex+']'].value+"";
             var credits = formObject.elements['credits['+rowIndex+']'].value+"";
             
             if(!isNaN(cash) && !isNaN(checks) && !isNaN(credits)){ // All values are numeric
                 formObject.elements['total['+rowIndex+']'].value = (cash/1 + checks/1 + credits/1).toFixed(2);
                 
             }
         }
         
         theIndexA=1;
         var totalCash = 0;
         var totalChecks = 0;
         var totalCredits = 0;
         var totalSub = 0;
         var totalCredits = 0;
         while(formObject.elements['cash['+theIndexA+']']){
              totalCash+=(formObject.elements['cash['+theIndexA+']'].value+"")/1
              totalChecks+=(formObject.elements['checks['+theIndexA+']'].value+"")/1
              totalCredits+=(formObject.elements['credits['+theIndexA+']'].value+"")/1              
              theIndexA++;
         }
         formObject.cashSub.value = (totalCash).toFixed(2);
         formObject.checksSub.value = (totalChecks).toFixed(2);
         formObject.creditsSub.value = (totalCredits).toFixed(2);
         formObject.totalSub.value = (totalCash/1 + totalChecks/1 + totalCredits/1).toFixed(2);
         
         formObject.cashTotal.value = (totalCash + (formObject.cashMinus.value+"")/1).toFixed(2);
         formObject.checksTotal.value = (totalChecks + (formObject.checksMinus.value+"")/1).toFixed(2);
         formObject.creditsTotal.value = (totalCredits + (formObject.creditsMinus.value+"")/1).toFixed(2);        
         
         formObject.totalSub.value = (formObject.cashTotal.value/1 + formObject.checksTotal.value/1 + formObject.creditsTotal.value/1).toFixed(2);
         formObject.totalMinus.value = (formObject.cashMinus.value/1 + formObject.checksMinus.value/1 + formObject.creditsMinus.value/1).toFixed(2);
         
         formObject.totalOfAll.value = (formObject.totalSub.value/1 - formObject.totalMinus.value/1).toFixed(2);
         
         buttonState();
                           
    }
    </script>
     
     
<script type="text/javascript">
   function calculate1(rowIndex){
         rowIndex+="";
          var formObject = document.GreenSheet;    // Creating reference to form
         if(rowIndex/1>0 && rowIndex!="undefined"){
             
             var cash1 = formObject.elements['cash1['+rowIndex+']'].value+"";
             var checks1 = formObject.elements['checks1['+rowIndex+']'].value+"";
             var credits1 = formObject.elements['credits1['+rowIndex+']'].value+"";
             
             if(!isNaN(cash1) && !isNaN(checks1) && !isNaN(credits1)){ // All values are numeric
                 formObject.elements['total1['+rowIndex+']'].value = (cash1/1 + checks1/1 + credits1/1).toFixed(2);
                 
             }
         }
         
         theIndexB=1;
         var totalCash1 = 0;
         var totalChecks1 = 0;
         var totalCredits1 = 0;
         var totalSub1 = 0;
         var totalCredits1 = 0;
           for(theIndexB=1; theIndexB <9;theIndexB++)
           {
         
              totalCash1+=(formObject.elements['cash1['+theIndexB+']'].value+"")/1
              totalChecks1+=(formObject.elements['checks1['+theIndexB+']'].value+"")/1
              totalCredits1+=(formObject.elements['credits1['+theIndexB+']'].value+"")/1  
               
             
         }
         
         formObject.cashSub1.value = (totalCash1).toFixed(2);
         formObject.checksSub1.value = (totalChecks1).toFixed(2);
         formObject.creditsSub1.value = (totalCredits1).toFixed(2);
         formObject.totalSub1.value = (totalCash1/1 + totalChecks1/1 + totalCredits1/1).toFixed(2);
         
           formObject.OverShortCash.value = (formObject.cashSub1.value/1 - formObject.cashTotal.value/1).toFixed(2);
           formObject.OverShortChecks.value = (formObject.checksSub1.value/1 - formObject.checksTotal.value/1).toFixed(2);
           formObject.OverShortCredits.value = (formObject.creditsSub1.value/1 - formObject.creditsTotal.value/1).toFixed(2);
           
           formObject.OverShortTotal.value = (formObject.OverShortCash.value/1 + formObject.OverShortChecks.value/1 + formObject.OverShortCredits.value/1).toFixed(2);
           
           formObject.OverUnder.value = (formObject.OverShortTotal.value/1).toFixed(2);

           buttonState();

    }
    </script>    

<script type="text/javascript">
    function calculate2(rowIndexC){
      var formObject = document.GreenSheet;

          formObject.SalesTotal.value = (formObject.Amt0.value/1 + formObject.Amt1.value/1 + formObject.Amt2.value/1 + formObject.Amt3.value/1 + formObject.Amt4.value/1 + formObject.Amt5.value/1 + formObject.Amt6.value/1 + formObject.Amt7.value/1 + formObject.Amt8.value/1 + formObject.Amt9.value/1 + formObject.Amt10.value/1 + formObject.Amt11.value/1 + formObject.Amt12.value/1 + formObject.Amt13.value/1 + formObject.Amt14.value/1 + formObject.Amt15.value/1 + formObject.Amt16.value/1 + formObject.Amt17.value/1 + formObject.Amt18.value/1 + formObject.Amt19.value/1 + formObject.Amt20.value/1 + formObject.Amt21.value/1 + formObject.Amt22.value/1 + formObject.Amt23.value/1 + formObject.Amt24.value/1 + formObject.Amt25.value/1 + formObject.Amt26.value/1 + formObject.Amt27.value/1 + formObject.Amt28.value/1 + formObject.Amt29.value/1 + formObject.Amt30.value/1).toFixed(2);
           formObject.TotalRevenue.value = (formObject.SalesTotal.value/1 + formObject.SalesTax.value/1 - formObject.NonRev.value/1 + formObject.OverUnder.value/1).toFixed(2);
        formObject.OverUnder.value = (formObject.OverShortTotal.value/1).toFixed(2);
         
          if(formObject.totalSub1.value != formObject.TotalRevenue.value)formObject.Submit.disabled = true; else formObject.Submit.disabled=false

            
    }
    </script>    

<script type="text/javascript">
     function Disable(){
          var formObject = document.GreenSheet;
          formObject.Submit.disabled = true;
     }
     </script>    

<script type="text/javascript">
    function buttonState(){
         var formObject = document.GreenSheet;    // Creating reference to form    
         var elementBlank = false;
         var els = document.getElementsByTagName('INPUT');
         for(var no=0;no<els.length;no++){
                   if(els[no].type=='text'){
                        if(els[no].value.length==0){
                             formObject.Submit.disabled = true
                             return;
                        }
                   }        
         }        
         formObject.Submit.disabled = false  
         
    }
</script>



<title>Green Sheets</title>

</head>

<body background="../images/MetalNew1.jpg" onKeyPress="KeyPress()" onLoad="Disable();SizeScreen()">

<FORM name="GreenSheet" METHOD="POST" ACTION="NumberGenGreenSheet.asp" onSubmit="return validate()">
  <table width="658" border="0">
    <tr>
      <td><div align="center"><b><font face="Tahoma" size="4" color="#0033CC">Green Sheet</font></b></div></td>
    </tr>
    <tr>
      <td><div align="center">
        <p><b><font face="Tahoma" size="2">&nbsp;Store:</font></b><font face="Tahoma"><% Call PopulateDropDown %>
</font><font face="Tahoma" size="2"><b>Date:</b></font><font face="Tahoma" size="3">
            <input type="text" name="txtBEGDATE" size="8" onchange="buttonState()" tabindex="02" style="text-align: Center; font-family: Tahoma">
          </font><font face="Tahoma" size="2"><a href="https://webapps.thetanco.com/tancoweb/scripts/AspDatepicker.asp?inField=GreenSheet.txtBEGDATE" onload="self.focus()" onClick="window.open('https://webapps.thetanco.com/tancoweb/scripts/AspDatepicker.asp?inField=GreenSheet.txtBEGDATE', 'MyWin', 'status=no,resizable=no,scrollbars=no,width=200,height=140,left=250,top=250'); return false"><img border="0" src="../dynCalendar.gif" width="16" height="16"></a></font></p>
                 </div></td>
    </tr>
  </table>
  <table border="0" width="658" height="487" align="left">
          <tr>
               <td width="652" align="center" valign="top">
               <table border="0" width="445" cellspacing="1">
                    <tr>
                         <td width="437" colspan="5" align="center"><b>
                         <font face="Tahoma">Cash Balance</font></b></td>
                    </tr>
                    <tr>
                         <td width="133" height="23">&nbsp;</td>
                         <td width="71" align="center" height="23"><b>
                         <font face="Tahoma" size="2">Cash</font></b></td>
                         <td width="71" align="center" height="23"><b>
                         <font face="Tahoma" size="2">Checks</font></b></td>
                         <td width="71" align="center" height="23"><b>
                         <font face="Tahoma" size="2">Credit</font></b></td>
                         <td width="71" align="center" height="23"><b>
                         <font face="Tahoma" size="2">Total</font></b></td>
                    </tr>
                    <tr>
                         <td width="133" height="26"><font face="Tahoma" size="2">Per System
                         Reports</font></td>
                         <td height="26" width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cash[1]" onchange="calculate(1)" size="9"  style="text-align: right" tabindex="03">
                        </font></div></td>
                         <td height="26" width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checks[1]" onchange="calculate(1)" size="9"  style="text-align: right" tabindex="04">
                        </font></div></td>
                         <td height="26" width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="credits[1]" onchange="calculate(1)" size="9"  style="text-align: right" tabindex="05">
                        </font></div></td>
                         <td height="26" width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="total[1]" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                    </tr>
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">Overring</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cash[2]" onChange="calculate(2)" size="9" style="text-align: right" tabindex="06">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checks[2]" onchange="calculate(2)" size="9" style="text-align: right" tabindex="07">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="credits[2]" onchange="calculate(2)" size="9" style="text-align: right" tabindex="08">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma" >
                        <input type="text" name="total[2]" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                    </tr>
                   
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">Batch Out From Prior Day</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cash[3]" value=0 onChange="calculate(3)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checks[3]" onChange="calculate(3)" size="9" style="text-align: right" tabindex="09">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="credits[3]" onChange="calculate(3)" size="9" style="text-align: right" tabindex="10">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="total[3]" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                    </tr>
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">Store Expenses</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cash[4]" onChange="calculate(4)" size="9" style="text-align: right" tabindex="11">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checks[4]" value=0 onChange="calculate(4)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="credits[4]" value=0 onChange="calculate(4)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="total[4]" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                    </tr>
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">Refunds</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cash[5]" onChange="calculate(5)" size="9" style="text-align: right" tabindex="12">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checks[5]" onChange="calculate(5)" size="9" style="text-align: right" tabindex="13">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="credits[5]" onChange="calculate(5)" size="9" style="text-align: right" tabindex="14">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="total[5]" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                    </tr>
                    <tr>
                         <td width="437" colspan="5">&nbsp;</td>
                    </tr>
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">Subtotal</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cashSub" onchange="calculate()" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text"name="checksSub" onchange="calculate()" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="creditsSub" onchange="calculate()" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="totalSub" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                    </tr>
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">&nbsp;&nbsp;&nbsp;&nbsp;
                         Reclassifications</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cashMinus" onChange="calculate()" size="9" style="text-align: right" tabindex="15">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checksMinus" onChange="calculate()" size="9" style="text-align: right" tabindex="16">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="creditsMinus" onChange="calculate()" size="9" style="text-align: right" tabindex="17">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="totalMinus" value=0 onChange="calculate()" size="9"style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                    </tr>
                    <tr>
                         <td width="437" colspan="5"><div align="right">
                         <input type="button" name="CalcB2" onmousedown="calculate()" value="Calculate">
                        </div></td>
                    </tr>
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">Total</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cashTotal" onchange="calculate()" style="text-align: right; background-color:#C0C0C0" size="9" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checksTotal" onchange="calculate()" style="text-align: right; background-color:#C0C0C0" size="9" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="creditsTotal" style="text-align: right; background-color:#C0C0C0" size="9" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="totalOfAll" style="text-align: right; background-color:#C0C0C0" size="9" readonly>
                        </font></div></td>
                    </tr>
               </table>
               <font size="2">
               <br>
               </font>               <div align="center">
                    <table border="0" width="440">
                         <tr>
                              <td width="149">&nbsp;</td>
                              <td width="71" align="center"><b>
                              <font face="Tahoma" size="2">
                              Cash</font></b></td>
                              <td width="71" align="center"><b>
                              <font face="Tahoma" size="2">
                              Checks</font></b></td>
                              <td width="71" align="center"><b>
                              <font face="Tahoma" size="2">
                              Credit</font></b></td>
                              <td width="71" align="center"><b>
                              <font face="Tahoma" size="2">
                              Total</font></b></td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">Count of Cash and
                              Checks</font></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="cash1[1]" onChange="calculate1(1)" size="9" style="text-align: right" tabindex="17">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="checks1[1]" onChange="calculate1(1)" size="9" style="text-align: right" tabindex="18">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="credits1[1]" value=0 onChange="calculate1(1)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="total1[1]" size="9" readonly style="text-align: right; background-color:#C0C0C0"">
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">Electronic Checks</font></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="cash1[2]" onChange="calculate1(2)" value=0 size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                              </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="checks1[2]" onChange="calculate1(2)" size="9" style="text-align: right" tabindex="19">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="credits1[2]" onChange="calculate1(2)" value=0 size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="total1[2]" size="9" readonly style="text-align: right; background-color:#C0C0C0">
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">Visa</font></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="cash1[3]" value=0 onChange="calculate1(3)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                              </font></div></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="checks1[3]" value=0 onChange="calculate1(3)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                              </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="credits1[3]" onChange="calculate1(3)" style="text-align: right" size="9" tabindex="20">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="total1[3]" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">MasterCard</font></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="cash1[4]" value=0 onChange="calculate1(4)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                              </font></div></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="checks1[4]" value=0 onChange="calculate1(4)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                              </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text"name="credits1[4]" onChange="calculate1(4)" size="9" style="text-align: right" tabindex="21">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="total1[4]" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">American Express</font></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="cash1[5]" value=0 onChange="calculate1(5)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                              </font></div></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text"name="checks1[5]" value=0 onChange="calculate1(5)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                              </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="credits1[5]" onChange="calculate1(5)" size="9" style="text-align: right" tabindex="22">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="total1[5]" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">Discover</font></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="cash1[6]" value=0 onChange="calculate1(6)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                              </font></div></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text"name="checks1[6]" value=0 onChange="calculate1(6)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                              </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="credits1[6]" onChange="calculate1(6)" size="9" style="text-align: right" tabindex="23">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="total1[6]" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">Debit/ATM</font></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="cash1[7]" value=0 onChange="calculate1(7)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                              </font></div></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="checks1[7]" value=0 onChange="calculate1(7)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                              </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="credits1[7]" onChange="calculate1(7)" size="9" style="text-align: right" tabindex="24">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="total1[7]" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">Redeem Gift
                              Certificates</font></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="cash1[8]" value=0 onChange="calculate1(8)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                              </font></div></td>
                              <td width="71" align="center"><div align="center"><font face="Tahoma">
                                <input type="text" name="checks1[8]" value=0 onChange="calculate1(8)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                              </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="credits1[8]" onChange="minusfunc(this);calculate1(8)" size="9" style="text-align: right" tabindex="25">
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="total1[8]" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="430" colspan="5">&nbsp;</td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">Total</font></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="cashSub1" onchange="calculate1()" style="text-align: right; background-color:#C0C0C0" size="9" readonly>
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="checksSub1" onchange="calculate1()" style="text-align: right; background-color:#C0C0C0" size="9" readonly>
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="creditsSub1" onchange="calculate1()" style="text-align: right; background-color:#C0C0C0" size="9" readonly>
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="totalSub1" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="430" colspan="5">&nbsp;</td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">Over/Under</font></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="OverShortCash"  size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="OverShortChecks" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="OverShortCredits" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                             </font></div></td>
                              <td width="71"><div align="center"><font face="Tahoma">
                             <input type="text" name="OverShortTotal" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                             </font></div></td>
                         </tr>
                         <tr>
                              <td width="430" colspan="5"><div align="right">
                                <input type="button" name="CalcB" onmousedown="calculate1()" value="Calculate">
                             </div></td>
                         </tr>
                         <tr>
                              <td width="149"><font face="Tahoma" size="2">Explanation</font></td>
                              <td width="313" colspan="4">
                              <p align="center"><font face="Tahoma">
                              <textarea rows="3" name="Explain" cols="38" tabindex="25"></textarea></font></td>
                         </tr>
                    </table>
                <p>&nbsp;</p>
                   <p>&nbsp;</p>
                <p>&nbsp;</p>
                <p>
                <input type="Submit" name="Submit" value="Submit">
                <input type="Reset" name="reset">
              </p>
                <p>&nbsp;</p>
               </div>
               </td>
               <td width="203" align="center" valign="top">
                         <table border="0" width="31%" align="left">
          <tr>
                         <td colspan="3" align="center"><b>
                         <font face="Tahoma">Revenue Balance</font></b></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><b>
                         <font face="Tahoma" size="2">Code</font></b></td>
                         <td width="63%" align="center"><b>
                         <font face="Tahoma" size="2">
                         Department</font></b></td>
                         <td width="19%" align="center"><b>
                         <font face="Tahoma" size="2">Amount</font></b></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">0</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">None</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt0" size="9" onchange="calculate2()" style="text-align: right" tabindex="26"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">1</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Buy INTRO Offers</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt1" size="9" onchange="calculate2()" style="text-align: right" tabindex="27"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">2</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Buy WORLD Membership</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt2" size="9" onchange="calculate2()" style="text-align: right" tabindex="27"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">3</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Buy MYSTIC Membership</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt3" size="9" onchange="calculate2()" style="text-align: right" tabindex="28"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">4</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Buy Paid In Fulls</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt4" size="9" onchange="calculate2()" style="text-align: right" tabindex="29"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">5</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Caribbean Gold</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt5" size="9" onchange="calculate2()" style="text-align: right" tabindex="30"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">6</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Buy Member Banks</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt6" size="9" onchange="calculate2()" style="text-align: right" tabindex="31"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">7</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">By Guest Banks</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt7" size="9" onchange="calculate2()" style="text-align: right" tabindex="32"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">8</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Employee Tan</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt8" size="9" onchange="calculate2()" style="text-align: right" tabindex="33"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">9</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Wolrd Tan</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt9" size="9" onchange="calculate2()" style="text-align: right" tabindex="34"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">10</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">VIP Tan</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt10" size="9" onchange="calculate2()" style="text-align: right" tabindex="35"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">11</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Tan on Freeze</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt11" size="9" onchange="calculate2()" style="text-align: right" tabindex="36"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">12</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">USE Mystic</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt12" size="9" onchange="calculate2()" style="text-align: right" tabindex="37"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">13</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Non-Member Tan</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt13" size="9" onchange="calculate2()" style="text-align: right" tabindex="38"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">14</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">BUY Mystic</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt14" size="9" onchange="calculate2()" style="text-align: right" tabindex="39"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">15</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Austrailian Gold</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt15" size="9" onchange="calculate2()" style="text-align: right" tabindex="40"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">16</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Swedish Beauty</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt16" size="9" onchange="calculate2()" style="text-align: right" tabindex="41"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">17</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Unfreeze Membership</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt17" size="9" onchange="calculate2()" style="text-align: right" tabindex="42"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">18</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Eyewear</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt18" size="9" onchange="calculate2()" style="text-align: right" tabindex="43"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">19</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Food and Drink</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt19" size="9" onchange="calculate2()" style="text-align: right" tabindex="44"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">20</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Accessories</font></td>
                         <td width="19%"><font face="Tahoma">
                        <input type="text" name="Amt20" size="9" onChange="calculate2()" style="text-align: right" tabindex="45">
                         </font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">21</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">EFT Draft</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt21" size="9" onchange="calculate2()" style="text-align: right" tabindex="46"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">22</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Returned EFT Payment</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt22" size="9" onchange="calculate2()" style="text-align: right" tabindex="47"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">23</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">UPGRADE Membership</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt23" size="9" onchange="calculate2()" style="text-align: right" tabindex="48"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">24</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Downgrade Memmbership</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt24" size="9" onchange="calculate2()" style="text-align: right" tabindex="49"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">25</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Cancel Membership</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt25" size="9" onchange="calculate2()" style="text-align: right" tabindex="50"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">26</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Freeze Membership</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt26" size="9" onchange="calculate2()" style="text-align: right" tabindex="51"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">27</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Buy Gift Cert.</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt27" size="9" onchange="calculate2()" style="text-align: right" tabindex="52"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">28</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Payment on Account</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt28" size="9" onchange="calculate2()" style="text-align: right" tabindex="53"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">29</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Miscellaneous</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt29" size="9" onchange="calculate2()" style="text-align: right" tabindex="54"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">30</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Flex Membership</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt30" size="9" onchange="calculate2()" style="text-align: right" tabindex="55"></font></td>
                    </tr>
                    <tr>
                         <td colspan="3">&nbsp;</td>
                    </tr>
                    <tr>
                         <td colspan="2"><font face="Tahoma" size="2">Sales</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="SalesTotal" size="9" onchange="calculate2()" style="text-align: right; background-color:#C0C0C0" readonly></font></td>
                    </tr>
                    <tr>
                         <td colspan="2"><font face="Tahoma" size="2">Plus: Sales Tax</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="SalesTax" size="9" onchange="calculate2()" style="text-align: right" tabindex="56"></font></td>
                    </tr>
                    <tr>
                         <td colspan="2"><font face="Tahoma" size="2">Less: Non-Revenue</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="NonRev" size="9" onchange="calculate2()" style="text-align: right" tabindex="57"></font></td>
                    </tr>
                    <tr>
                         <td colspan="2"><font face="Tahoma" size="2">Over/Under</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="OverUnder" size="9" onchange="calculate2()" style="text-align: right; background-color:#C0C0C0" readonly></font></td>
                    </tr>
                    <tr>
                         <td colspan="3"><div align="center"><input type="button" name="CalcB22" onmousedown="calculate2()" value="Calculate">
                         </div></td>
                    </tr>
                    <tr>
                         <td colspan="2"><font face="Tahoma" size="2">Total Revenue</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="TotalRevenue" size="9" style="text-align: right; background-color:#C0C0C0" readonly></font></td>
                    </tr>
               </table>
               </td>
          </tr>
               
  </table>
</form>
</body>

</html>

Thanks
Andrew
0
 
trailblazzyr55Commented:
Errrr!! quit changing it on me!! lol, just kidding, yep lemme apply it to the changes/additions you made ;o) so ur using ASP I'm guessing?

~trail
0
 
AhelblingAuthor Commented:
yes ASP - cant there just be a function we can call on each input box's on blur event that will format it without messing with the Calc Functions i have working flawlessly at this point???
0
 
AhelblingAuthor Commented:
also if we could add a condition to set the value of an input box to 0.00 IF they tab through and do not key anything - that would be perfect!
0
 
trailblazzyr55Commented:
ok so what you want to do ontop of what you have now...

1) format currency... onBlur
2) when tabbing through, default to $0.00, IF no value
3) calculate all totals when Calculate it clicked?

Umm one question, your first set of calculations/ first set of input boxes at the top, you have reclassifications which you explained to me above, and refunds, however they seem to be reversed according to the naming of those text fields. In the script I had posted last, I made the change, should I keep the change though? just cut and paste that script to see if what I'm saying makes sense.

Also, why have a calculate button when it is done as you type?
all the functions can still apply without having to hit calculate for each form section.

~trail
0
 
trailblazzyr55Commented:
Also just a couple things I noticed with your latest script, the fields are calcualted automatically, perhaps there's something with your query the calculate buttons does depending on query results and store location, but other than that, do you really need the calculate button? I see the fields do it automatically already?

~trail
0
 
AhelblingAuthor Commented:
1. yes
2. yes
3. okay as long as they calculate the totals properly, the Calc buttons can go - i added them though becuase i noticed that if you jumped around the form and came back to a section and continued, then it didnt calculate properly again, and you would have to fire the calc function to fix it.

let me check on the names for refunds and reclass....
0
 
AhelblingAuthor Commented:
AHH I found out why i needed the Calc buttons - if you fill out the top table and then jump down to the bottom and fill some out and then jump back to the top and fill some out - they Over/Under does not dynamically recaluculate.
0
 
trailblazzyr55Commented:
Here's the only issue with formatting fields individually...

lets say you have no value.. so field value is 0 right? function works!

so now you enter 2, formats to $2.00 goes through calc function and returns $NaN.NaN

problem is you're feeding then NaN values to your function, to avoid this error, you'd have to account for this in your calcualtions, which it why I made the changes to the calcualtions only, it was actually a lot easier and didn't affect the calculation.

would you rather keep the way I have it, the calcualtions are actually quite simple, formatting them won't harm anything?

~trail
0
 
AhelblingAuthor Commented:
as long as it works and i can follow the code i dont care.
0
 
AhelblingAuthor Commented:
and i dont need $. just 2 decimal places and commas.
0
 
trailblazzyr55Commented:
Humm, ok I see why you had the calculate button in there now, we can actually change that? wanna go for it? just make the forms account for eachother, remove the buttons, and do it automatically.

~trail
0
 
AhelblingAuthor Commented:
YES that would be perfect - show me how master!
0
 
trailblazzyr55Commented:
Here you go, give this a try, the math all seems to be correct, all fields are formated with currencyFormat, buttons removed, replaced with onClick in the form. You can tab through and fields will default to $0.00. you can also click through, they are done with onBlur in the text field attributes.
This should be what you're looking for. There two javascript errors, they don't take away from functionality, I'm thinking they may have to do with the absence of the JSP code. Give it a try and see what you think ;o)

<%
Sub PopulateDropDown
 Dim objConn
 Dim objRS
 Dim strSQL
 Dim CustID
 Dim UserName

 Const adOpenForwardOnly = 0
 Const adLockReadOnly  = 1

 Set objConn = Server.CreateObject("ADODB.Connection")
 Set objRS  = Server.CreateObject("ADODB.Recordset")

 objConn.Open "Provider=sqloledb;" & _
           "Data Source=database-server;" & _
           "Initial Catalog=Heat_Team_Tan;" & _
           "User Id=empnum;" & _
           "Password=monktard"

 strSQL = "SELECT CustID FROM Profile ORDER BY CUSTID"

 objRS.Open strSQL, objConn, adOpenForwardOnly, adLockReadOnly

Response.Write "<SELECT Name=""txtStore"">"
Response.Write "<OPTION Value=""""></OPTION>"

 Do Until objRS.EOF = True
  CustID  = objRS("CustID").Value

   Response.Write "<OPTION Value=""" & CustID & """>"
   Response.Write CustID
   Response.Write "</OPTION>"

 objRS.Movenext
 Loop

 Response.Write "</SELECT>"

 objRS.Close
 Set objRS = Nothing
 Set objConn = Nothing
End Sub
%>


<html>

<head>

<script language="JavaScript">

      function SizeScreen()
      {
            top.window.moveTo(0,0);
            if (document.all) {
            top.window.resizeTo(screen.availWidth,screen.availHeight);
      }
      else if (document.layers||document.getElementById) {
      if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
            top.window.outerHeight = screen.availHeight;
            top.window.outerWidth = screen.availWidth;
                  }
            }
      }

      function validate()
      {
      var GreenSheet = document.GreenSheet;
      if (GreenSheet.txtStore.options[0].selected) {
      alert('Please select a store.');
      return false;
      }

      {
      mNv=GreenSheet.txtBEGDATE.value;
      if (mNv=='') {
      alert('Please select a date.');
      return false;
      }
      if ((GreenSheet.OverUnder.value >= 7.00 || GreenSheet.OverUnder.value <= -7.00) && GreenSheet.Explain.value.length <1) {
      alert('Please give an explaination for over/under.');
      return false;
                  }
            }
      }

      function minusfunc(obj)
      {
      if(obj.value.charAt(0) != '-')
      {
      var temp = obj.value * -1
      obj.value = temp;
            }
      }

      function KeyPress()
      {
            //alert(window.event.keyCode)
      if (window.event.keyCode == 13)
      window.event.keyCode =0;
      }

      function RevertCurr(val)
      {
          return val.replace(/[\$\,]/g, '');
      }
      
      function calculate(obj,rowIndex){      
         rowIndex+="";
          var formObject = document.GreenSheet;
               if(rowIndex/1>0 && rowIndex!="undefined"){
             var cash = RevertCurr(formObject.elements['cash['+rowIndex+']'].value+"");
             var checks = RevertCurr(formObject.elements['checks['+rowIndex+']'].value+"");
             var credits = RevertCurr(formObject.elements['credits['+rowIndex+']'].value+"");
             if(!isNaN(cash) && !isNaN(checks) && !isNaN(credits)){
                 formObject.elements['total['+rowIndex+']'].value = formatCurrency((cash/1 + checks/1 + credits/1));
             }
         }
         theIndex=1;
             var totalCash = 0;
         var totalChecks = 0;
         var totalCredits = 0;
         var totalSub = 0;
         while(formObject.elements['cash['+theIndex+']']){
              totalCash+=RevertCurr((formObject.elements['cash['+theIndex+']'].value+""))/1
              totalChecks+=RevertCurr((formObject.elements['checks['+theIndex+']'].value+""))/1
              totalCredits+=RevertCurr((formObject.elements['credits['+theIndex+']'].value+""))/1              
              theIndex++;
         }
             if (formObject.cashMinus.value != 0){
                   var format1 = RevertCurr(formObject.cashMinus.value);
                         }else{
                               var format1 = 0
                         }
             if (formObject.checksMinus.value != 0){
                   var format2 = RevertCurr(formObject.checksMinus.value);
                         }else{
                               var format2 = 0
                         }
             if (formObject.creditsMinus.value != 0){
                   var format3 = RevertCurr(formObject.creditsMinus.value);
                         }else{
                               var format3 = 0
                         }
            var sub1 = (totalCash + totalChecks + totalCredits)
            var sub2 = (format1/1 + format2/1 + format3/1).toFixed(2);
            var sub3 = (sub1 - sub2/1).toFixed(2);
         formObject.cashSub.value = formatCurrency((totalCash).toFixed(2));
         formObject.checksSub.value = formatCurrency((totalChecks).toFixed(2));
         formObject.creditsSub.value = formatCurrency((totalCredits).toFixed(2));       
             formObject.totalSub.value = formatCurrency(sub1)
             
             formObject.cashMinus.value = formatCurrency(format1);
             formObject.checksMinus.value = formatCurrency(format2);
             formObject.creditsMinus.value = formatCurrency(format3);
             formObject.totalMinus.value = formatCurrency(sub2);
                   
         formObject.cashTotal.value = formatCurrency((totalCash - (format1+"")/1).toFixed(2));
         formObject.checksTotal.value = formatCurrency((totalChecks - (format2+"")/1).toFixed(2));
         formObject.creditsTotal.value = formatCurrency((totalCredits - (format3+"")/1).toFixed(2));                    
         formObject.totalOfAll.value = formatCurrency(sub3);
             
             obj.value = formatCurrency(obj.value);
    }
      
    function calculate1(obj,index){
         index+="";
          var formObject = document.GreenSheet;
         if(index/1>0 && index!="undefined"){
             var cash1 = RevertCurr(formObject.elements['cash1['+index+']'].value+"");
             var checks1 = RevertCurr(formObject.elements['checks1['+index+']'].value+"");
             var credits1 = RevertCurr(formObject.elements['credits1['+index+']'].value+"");
             if(!isNaN(cash1) && !isNaN(checks1) && !isNaN(credits1)){
                 formObject.elements['total1['+index+']'].value = formatCurrency((cash1/1 + checks1/1 + credits1/1).toFixed(2));
             }
         }
         theIndexTwo=1;
         var totalCash1 = 0;
         var totalChecks1 = 0;
         var totalCredits1 = 0;
         var totalSub1 = 0;
         var totalCredits1 = 0;
             
              while(formObject.elements['cash1['+theIndexTwo+']']){    
              totalCash1+=RevertCurr((formObject.elements['cash1['+theIndexTwo+']'].value+""))/1
              totalChecks1+=RevertCurr((formObject.elements['checks1['+theIndexTwo+']'].value+""))/1
              totalCredits1+=RevertCurr((formObject.elements['credits1['+theIndexTwo+']'].value+""))/1              
              theIndexTwo++;
         }
             var subA1 = (totalCash1 + totalChecks1 + totalCredits1)
         formObject.cashSub1.value = formatCurrency((totalCash1).toFixed(2));
         formObject.checksSub1.value = formatCurrency((totalChecks1).toFixed(2));
         formObject.creditsSub1.value = formatCurrency((totalCredits1).toFixed(2));       
             formObject.totalSub1.value = formatCurrency(subA1)
             
             Container1 = RevertCurr(formObject.cashSub1.value);
             Container2 = RevertCurr(formObject.cashTotal.value);
             Container3 = RevertCurr(formObject.checksSub1.value);
             Container4 = RevertCurr(formObject.checksTotal.value);
             Container5 = RevertCurr(formObject.creditsSub1.value);
             Container6 = RevertCurr(formObject.creditsTotal.value);
         
           formObject.OverShortCash.value = formatCurrency(Container1 - Container2);
           formObject.OverShortChecks.value = formatCurrency(Container3 - Container4);
           formObject.OverShortCredits.value = formatCurrency(Container5 - Container6);
           formObject.OverShortTotal.value = formatCurrency((Container1 - Container2) + (Container3 - Container4) + (Container5 - Container6));
           formObject.OverUnder.value = formObject.OverShortTotal.value;

               obj.value = formatCurrency(obj.value);
    }


    function calculate2(obj,rowIndexC){
         rowIndexC+="";
          var formObject = document.GreenSheet;
               if(rowIndexC/1>=0 && rowIndexC!="undefined"){
             var TotalAmt = RevertCurr(formObject.elements['Amt['+rowIndexC+']'].value+"");
                     }
            Idx=0;
         var AmtTotal = 0;
                     while(formObject.elements['Amt['+Idx+']']){
                           AmtTotal+=RevertCurr((formObject.elements['Amt['+Idx+']'].value+""))/1
                           Idx++;
                        }
 
            formObject.SalesTotal.value = formatCurrency(AmtTotal);
            formObject.TotalRevenue.value = formatCurrency((RevertCurr(formObject.SalesTotal.value)/1 + RevertCurr(formObject.SalesTax.value)/1 - RevertCurr(formObject.NonRev.value)/1 + RevertCurr(formObject.OverUnder.value)/1).toFixed(2));
            formObject.OverUnder.value = formObject.OverShortTotal.value;
         
          if(formObject.totalSub1.value != formObject.TotalRevenue.value)formObject.Submit.disabled = true; else formObject.Submit.disabled=false

          obj.value = formatCurrency(obj.value);
    }
      
      function formatCurrency(strValue)
      {
            
            strValue = strValue.toString().replace(/\$|\,/g,'');
            if (strValue != ""){      
                  dblValue = parseFloat(strValue);
                  blnSign = (dblValue == (dblValue = Math.abs(dblValue)));
                  dblValue = Math.floor(dblValue*100+0.50000000001);
                  intCents = dblValue%100;
                  strCents = intCents.toString();
                  dblValue = Math.floor(dblValue/100).toString();
                  }
            if(intCents<10)
                  strCents = "0" + strCents;
            for (var i = 0; i < Math.floor((dblValue.length-(1+i))/3); i++)
                  dblValue = dblValue.substring(0,dblValue.length-(4*i+3))+','+
                  dblValue.substring(dblValue.length-(4*i+3));
            return (((blnSign)?'':'-') + '$' + dblValue + '.' + strCents);
      }
      
    function Disable(){
          var formObject = document.GreenSheet;
          formObject.Submit.disabled = true;
    }
      
    function buttonState(){
         var formObject = document.GreenSheet;    // Creating reference to form    
         var elementBlank = false;
         var els = document.getElementsByTagName('INPUT');
         for(var no=0;no<els.length;no++){
                   if(els[no].type=='text'){
                        if(els[no].value.length==0){
                             formObject.Submit.disabled = true
                             return;
                        }
                   }        
         }        
         formObject.Submit.disabled = false  
         
    }
</script>
   
<title>Green Sheets</title>

</head>

<body background="../images/MetalNew1.jpg" onKeyPress="KeyPress()" onLoad="Disable();SizeScreen()">

<FORM name="GreenSheet" METHOD="POST" ACTION="NumberGenGreenSheet.asp" onClick="calculate1(this,8)" onSubmit="return validate()">
  <table width="658" border="0">
    <tr>
      <td><div align="center"><b><font face="Tahoma" size="4" color="#0033CC">Green Sheet</font></b></div></td>
    </tr>
    <tr>
      <td><div align="center">
        <p><b><font face="Tahoma" size="2">&nbsp;Store:</font></b><font face="Tahoma"><% Call PopulateDropDown %>
</font><font face="Tahoma" size="2"><b>Date:</b></font><font face="Tahoma" size="3">
            <input type="text" name="txtBEGDATE" size="8" onchange="buttonState()" tabindex="02" style="text-align: Center; font-family: Tahoma">
          </font><font face="Tahoma" size="2"><a href="https://webapps.thetanco.com/tancoweb/scripts/AspDatepicker.asp?inField=GreenSheet.txtBEGDATE" onload="self.focus()" onClick="window.open('https://webapps.thetanco.com/tancoweb/scripts/AspDatepicker.asp?inField=GreenSheet.txtBEGDATE', 'MyWin', 'status=no,resizable=no,scrollbars=no,width=200,height=140,left=250,top=250'); return false"><img border="0" src="../dynCalendar.gif" width="16" height="16"></a></font></p>
               </div></td>
    </tr>
  </table>
  <table border="0" width="658" height="487" align="left">
          <tr>
               <td width="652" align="center" valign="top">
               <table border="0" width="445" cellspacing="1">
                    <tr>
                         <td width="437" colspan="5" align="center"><b>
                         <font face="Tahoma">Cash Balance</font></b></td>
                    </tr>
                    <tr>
                         <td width="133" height="23">&nbsp;</td>
                         <td width="71" align="center" height="23"><b>
                         <font face="Tahoma" size="2">Cash</font></b></td>
                         <td width="71" align="center" height="23"><b>
                         <font face="Tahoma" size="2">Checks</font></b></td>
                         <td width="71" align="center" height="23"><b>
                         <font face="Tahoma" size="2">Credit</font></b></td>
                         <td width="71" align="center" height="23"><b>
                         <font face="Tahoma" size="2">Total</font></b></td>
                    </tr>
                    <tr>
                         <td width="133" height="26"><font face="Tahoma" size="2">Per System
                         Reports</font></td>
                         <td height="26" width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cash[1]" onchange="calculate(this,1)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9"  style="text-align: right" tabindex="03">
                        </font></div></td>
                         <td height="26" width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checks[1]" onchange="calculate(this,1)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9"  style="text-align: right" tabindex="04">
                        </font></div></td>
                         <td height="26" width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="credits[1]" onchange="calculate(this,1)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9"  style="text-align: right" tabindex="05">
                        </font></div></td>
                         <td height="26" width="71"><div align="center"><font face="Tahoma">
                        <input type="text" value="$0.00" name="total[1]" size="9" style="text-align: right; background-color:#C0C0C0" onblur="if(this.value=='')this.value='$0.00'" readonly>
                        </font></div></td>
                    </tr>
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">Overring</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cash[2]" onChange="calculate(this,2)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="06">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checks[2]" onchange="calculate(this,2)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="07">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="credits[2]" onchange="calculate(this,2)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="08">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma" >
                        <input type="text" value="$0.00" name="total[2]" size="9" style="text-align: right; background-color:#C0C0C0" onblur="if(this.value=='')this.value='$0.00'" readonly>
                        </font></div></td>
                    </tr>
                   
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">Batch Out From Prior Day</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cash[3]" value=0 onChange="calculate(this,3)" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checks[3]" onChange="calculate(this,3)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="09">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="credits[3]" onChange="calculate(this,3)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="10">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" value="$0.00" name="total[3]" size="9" style="text-align: right; background-color:#C0C0C0" onblur="if(this.value=='')this.value='$0.00'" readonly>
                        </font></div></td>
                    </tr>
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">Store Expenses</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cash[4]" onChange="calculate(this,4)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="11">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checks[4]" value=0 onChange="calculate(this,4)" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="credits[4]" value=0 onChange="calculate(this,4)" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" value="$0.00" name="total[4]" size="9" onblur="if(this.value=='')this.value='$0.00'" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                    </tr>
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">Refunds</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cash[5]" onChange="calculate(this,5)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="12">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="checks[5]" onChange="calculate(this,5)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="13">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="credits[5]" onChange="calculate(this,5)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="14">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" value="$0.00" name="total[5]" size="9" onblur="if(this.value=='')this.value='$0.00'" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                    </tr>
                    <tr>
                         <td width="437" colspan="5">&nbsp;</td>
                    </tr>
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">Subtotal</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="cashSub" value="$0.00" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text"name="checksSub" value="$0.00" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="creditsSub" value="$0.00" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="totalSub" value="$0.00" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                    </tr>
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">&nbsp;&nbsp;&nbsp;&nbsp;
                         Reclassifications</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" value="$0.00" name="cashMinus" onChange="calculate(this,1)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="15">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" value="$0.00" name="checksMinus" onChange="calculate(this,1)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="16">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" value="$0.00" name="creditsMinus" onChange="calculate(this,1)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="17">
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" name="totalMinus" value="$0.00" onChange="calculate(this,1)" onblur="if(this.value=='$0.00')this.value='$0.00'" size="9"style="text-align: right; background-color:#C0C0C0" readonly>
                        </font></div></td>
                    </tr>
                    <tr>
                         <td width="437" colspan="5"><div align="right"> </div></td>
                    </tr>
                    <tr>
                         <td width="133"><font face="Tahoma" size="2">Total</font></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" value="$0.00" name="cashTotal" style="text-align: right; background-color:#C0C0C0" size="9" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" value="$0.00" name="checksTotal" style="text-align: right; background-color:#C0C0C0" size="9" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" value="$0.00" name="creditsTotal" style="text-align: right; background-color:#C0C0C0" size="9" readonly>
                        </font></div></td>
                         <td width="71"><div align="center"><font face="Tahoma">
                        <input type="text" value="$0.00" name="totalOfAll" style="text-align: right; background-color:#C0C0C0" size="9" readonly>
                        </font></div></td>
                    </tr>
               </table>
               <font size="2">
               <br>
               </font>               <div align="center">
                   
          <table border="0" width="440">
            <tr>
              <td width="149">&nbsp;</td>
              <td width="71" align="center"><b> <font face="Tahoma" size="2">
                Cash</font></b></td>
              <td width="71" align="center"><b> <font face="Tahoma" size="2">
                Checks</font></b></td>
              <td width="71" align="center"><b> <font face="Tahoma" size="2">
                Credit</font></b></td>
              <td width="71" align="center"><b> <font face="Tahoma" size="2">
                Total</font></b></td>
            </tr>
            <tr>
              <td width="149"><font face="Tahoma" size="2">Count of Cash and Checks</font></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" name="cash1[1]" onChange="calculate1(this,1)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="17">
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" name="checks1[1]" onChange="calculate1(this,1)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="18">
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" name="credits1[1]" value=0 onChange="calculate1(this,1)" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" value="$0.00" name="total1[1]" size="9" onblur="if(this.value=='')this.value='$0.00'" readonly style="text-align: right; background-color:#C0C0C0">
                  </font></div></td>
            </tr>
            <tr>
              <td width="149"><font face="Tahoma" size="2">Electronic Checks</font></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" name="cash1[2]" onChange="calculate1(this,2)" onblur="if(this.value=='')this.value='$0.00'" value=0 size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" name="checks1[2]" onChange="calculate1(this,2)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="19">
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" name="credits1[2]" onChange="calculate1(this,2)" onblur="if(this.value=='')this.value='$0.00'" value=0 size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" value="$0.00" name="total1[2]" size="9" onblur="if(this.value=='')this.value='$0.00'" readonly style="text-align: right; background-color:#C0C0C0">
                  </font></div></td>
            </tr>
            <tr>
              <td width="149"><font face="Tahoma" size="2">Visa</font></td>
              <td width="71" align="center"><div align="center"><font face="Tahoma">
                  <input type="text" name="cash1[3]" value=0 onChange="calculate1(this,3)" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
              <td width="71" align="center"><div align="center"><font face="Tahoma">
                  <input type="text" name="checks1[3]" value=0 onChange="calculate1(this,3)" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" name="credits1[3]" onChange="calculate1(this,3)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" style="text-align: right" size="9" tabindex="20">
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" value="$0.00" name="total1[3]" size="9" onblur="if(this.value=='')this.value='$0.00'" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
            </tr>
            <tr>
              <td width="149"><font face="Tahoma" size="2">MasterCard</font></td>
              <td width="71" align="center"><div align="center"><font face="Tahoma">
                  <input type="text" name="cash1[4]" value=0 onChange="calculate1(this,4)" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
              <td width="71" align="center"><div align="center"><font face="Tahoma">
                  <input type="text" name="checks1[4]" value=0 onChange="calculate1(this,4)" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text"name="credits1[4]" onChange="calculate1(this,4)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="21">
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" value="$0.00" name="total1[4]" size="9" onblur="if(this.value=='')this.value='$0.00'" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
            </tr>
            <tr>
              <td width="149"><font face="Tahoma" size="2">American Express</font></td>
              <td width="71" align="center"><div align="center"><font face="Tahoma">
                  <input type="text" name="cash1[5]" value=0 onChange="calculate1(this,5)" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
              <td width="71" align="center"><div align="center"><font face="Tahoma">
                  <input type="text"name="checks1[5]" value=0 onChange="calculate1(this,5)" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" name="credits1[5]" onChange="calculate1(this,5)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="22">
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" value="$0.00" name="total1[5]" size="9" onblur="if(this.value=='')this.value='$0.00'" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
            </tr>
            <tr>
              <td width="149"><font face="Tahoma" size="2">Discover</font></td>
              <td width="71" align="center"><div align="center"><font face="Tahoma">
                  <input type="text" name="cash1[6]" value=0 onChange="calculate1(this,6)" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
              <td width="71" align="center"><div align="center"><font face="Tahoma">
                  <input type="text"name="checks1[6]" value=0 onChange="calculate1(this,6)" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" name="credits1[6]" onChange="calculate1(this,6)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="23">
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" value="$0.00" name="total1[6]" size="9" onblur="if(this.value=='')this.value='$0.00'" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
            </tr>
            <tr>
              <td width="149"><font face="Tahoma" size="2">Debit/ATM</font></td>
              <td width="71" align="center"><div align="center"><font face="Tahoma">
                  <input type="text" name="cash1[7]" value=0 onChange="calculate1(this,7)" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
              <td width="71" align="center"><div align="center"><font face="Tahoma">
                  <input type="text" name="checks1[7]" value=0 onChange="calculate1(this,7)" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" name="credits1[7]" onChange="calculate1(this,7)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="24">
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" value="$0.00" name="total1[7]" size="9" onblur="if(this.value=='')this.value='$0.00'" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
            </tr>
            <tr>
              <td width="149"><font face="Tahoma" size="2">Redeem Gift Certificates</font></td>
              <td width="71" align="center"><div align="center"><font face="Tahoma">
                  <input type="text" name="cash1[8]" value=0 onChange="calculate1(this,8)" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
              <td width="71" align="center"><div align="center"><font face="Tahoma">
                  <input type="text" name="checks1[8]" value=0 onChange="calculate1(this,8)" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" name="credits1[8]" onChange="minusfunc(this);calculate1(this,8)" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" size="9" style="text-align: right" tabindex="25">
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" value="$0.00" name="total1[8]" size="9" onblur="if(this.value=='')this.value='$0.00'" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
            </tr>
            <tr>
              <td width="430" colspan="5">&nbsp;</td>
            </tr>
            <tr>
              <td width="149"><font face="Tahoma" size="2">Total</font></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" value="$0.00" name="cashSub1" onchange="calculate1(this,8)" style="text-align: right; background-color:#C0C0C0" size="9" readonly>
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" value="$0.00" name="checksSub1" onchange="calculate1(this,8)" style="text-align: right; background-color:#C0C0C0" size="9" readonly>
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" value="$0.00" name="creditsSub1" onchange="calculate1(this,8)" style="text-align: right; background-color:#C0C0C0" size="9" readonly>
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" value="$0.00" name="totalSub1" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
            </tr>
            <tr>
              <td width="430" colspan="5">&nbsp;</td>
            </tr>
            <tr>
              <td width="149"><font face="Tahoma" size="2">Over/Under</font></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" value="$0.00" name="OverShortCash" onchange="calculate1(this,8)"  size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" value="$0.00" name="OverShortChecks" onchange="calculate1(this,8)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" value="$0.00" name="OverShortCredits" onchange="calculate1(this,8)" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
              <td width="71"><div align="center"><font face="Tahoma">
                  <input type="text" value="$0.00" name="OverShortTotal" size="9" style="text-align: right; background-color:#C0C0C0" readonly>
                  </font></div></td>
            </tr>
            <tr>
              <td colspan="5">&nbsp;</td>
            </tr>
            <tr>
              <td width="430" colspan="5"><div align="right"> </div></td>
            </tr>
            <tr>
              <td width="149"><font face="Tahoma" size="2">Explanation</font></td>
              <td width="313" colspan="4"> <p align="center"><font face="Tahoma">
                  <textarea rows="3" name="Explain" cols="38" tabindex="25"></textarea>
                  </font></td>
            </tr>
          </table>
                <p>&nbsp;</p>
                   <p>&nbsp;</p>
                <p>&nbsp;</p>
                <p>
                <input type="Submit" name="Submit" value="Submit">
                <input type="Reset" name="reset">
              </p>
                <p>&nbsp;</p>
               </div>
               </td>
               <td width="203" align="center" valign="top">
                         <table border="0" width="31%" align="left">
          <tr>
                         <td colspan="3" align="center"><b>
                         <font face="Tahoma">Revenue Balance</font></b></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><b>
                         <font face="Tahoma" size="2">Code</font></b></td>
                         <td width="63%" align="center"><b>
                         <font face="Tahoma" size="2">
                         Department</font></b></td>
                         <td width="19%" align="center"><b>
                         <font face="Tahoma" size="2">Amount</font></b></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">0</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">None</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input name="Amt[0]" type="text" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" style="text-align: right" tabindex="26" onchange="calculate2(this,0)" size="9"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">1</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Buy INTRO Offers</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[1]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,1)" style="text-align: right" tabindex="27"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">2</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Buy WORLD Membership</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[2]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,2)" style="text-align: right" tabindex="27"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">3</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Buy MYSTIC Membership</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[3]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,3)" style="text-align: right" tabindex="28"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">4</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Buy Paid In Fulls</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[4]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,4)" style="text-align: right" tabindex="29"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">5</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Caribbean Gold</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[5]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,5)" style="text-align: right" tabindex="30"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">6</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Buy Member Banks</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[6]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,6)" style="text-align: right" tabindex="31"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">7</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">By Guest Banks</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[7]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,7)" style="text-align: right" tabindex="32"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">8</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Employee Tan</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[8]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,8)" style="text-align: right" tabindex="33"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">9</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Wolrd Tan</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[9]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,9)" style="text-align: right" tabindex="34"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">10</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">VIP Tan</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[10]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,10)" style="text-align: right" tabindex="35"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">11</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Tan on Freeze</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[11]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,11)" style="text-align: right" tabindex="36"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">12</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">USE Mystic</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[12]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,12)" style="text-align: right" tabindex="37"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">13</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Non-Member Tan</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[13]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,13)" style="text-align: right" tabindex="38"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">14</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">BUY Mystic</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[14]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,14)" style="text-align: right" tabindex="39"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">15</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Austrailian Gold</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[15]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,15)" style="text-align: right" tabindex="40"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">16</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Swedish Beauty</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[16]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,16)" style="text-align: right" tabindex="41"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">17</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Unfreeze Membership</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[17]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,17)" style="text-align: right" tabindex="42"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">18</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Eyewear</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[18]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,18)" style="text-align: right" tabindex="43"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">19</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Food and Drink</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[19]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,19)" style="text-align: right" tabindex="44"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">20</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Accessories</font></td>
                         <td width="19%"><font face="Tahoma">
                        <input type="text" name="Amt[20]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onChange="calculate2(this,20)" style="text-align: right" tabindex="45">
                         </font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">21</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">EFT Draft</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[21]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,21)" style="text-align: right" tabindex="46"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">22</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Returned EFT Payment</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[22]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,22)" style="text-align: right" tabindex="47"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">23</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">UPGRADE Membership</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[23]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,23)" style="text-align: right" tabindex="48"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">24</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Downgrade Memmbership</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[24]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,24)" style="text-align: right" tabindex="49"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">25</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Cancel Membership</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[25]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,25)" style="text-align: right" tabindex="50"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">26</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Freeze Membership</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[26]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,26)" style="text-align: right" tabindex="51"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">27</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Buy Gift Cert.</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[27]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,27)" style="text-align: right" tabindex="52"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">28</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Payment on Account</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[28]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,28)" style="text-align: right" tabindex="53"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">29</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Miscellaneous</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[29]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,29)" style="text-align: right" tabindex="54"></font></td>
                    </tr>
                    <tr>
                         <td width="41" align="center"><font face="Tahoma" size="2">30</font></td>
                         <td width="63%"><font size="-5" face="Tahoma">Flex Membership</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" name="Amt[30]" size="9" onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" onchange="calculate2(this,30)" style="text-align: right" tabindex="55"></font></td>
                    </tr>
                    <tr>
                         <td colspan="3">&nbsp;</td>
                    </tr>
                    <tr>
                         <td colspan="2"><font face="Tahoma" size="2">Sales</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" value="$0.00" name="SalesTotal" size="9" onchange="calculate2()" style="text-align: right; background-color:#C0C0C0" readonly></font></td>
                    </tr>
                    <tr>
                         <td colspan="2"><font face="Tahoma" size="2">Plus: Sales Tax</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" value="$0.00" name="SalesTax" size="9" onchange="calculate2(this,1)"  onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" style="text-align: right" tabindex="56"></font></td>
                    </tr>
                    <tr>
                         <td colspan="2"><font face="Tahoma" size="2">Less: Non-Revenue</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" value="$0.00" name="NonRev" size="9" onchange="calculate2(this,1)"  onfocus="this.value=''" onblur="if(this.value=='')this.value='$0.00'" style="text-align: right" tabindex="57"></font></td>
                    </tr>
                    <tr>
                         <td colspan="2"><font face="Tahoma" size="2">Over/Under</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" value="$0.00" name="OverUnder" size="9" onchange="calculate2()" style="text-align: right; background-color:#C0C0C0" readonly></font></td>
                    </tr>
                    <tr>
                         <td colspan="3"><div align="center"><input type="button" name="CalcB22" onmousedown="calculate2()" value="Calculate">
                         </div></td>
                    </tr>
                    <tr>
                         <td colspan="2"><font face="Tahoma" size="2">Total Revenue</font></td>
                         <td width="19%"><font face="Tahoma">
                         <input type="text" value="$0.00" name="TotalRevenue" size="9" style="text-align: right; background-color:#C0C0C0" readonly></font></td>
                    </tr>
               </table>
               </td>
          </tr>
               
  </table>
</form>
</body>

</html>


Best Regards,
~trail
0
 
AhelblingAuthor Commented:
Works great - just 2 things i found though.

1. The Revenue Balance table on the right does not seem to have values of $0.00 even though it shows it when you tab through them.  The db is storing nulls for them for some reason.

2. validate function not working now. The top 2 are working but this piece is not???

>>>>>    if ((GreenSheet.OverUnder.value >= 7.00 || GreenSheet.OverUnder.value <= -7.00) && GreenSheet.Explain.value.length <1)

function validate()
     {
     var GreenSheet = document.GreenSheet;
     if (GreenSheet.txtStore.options[0].selected) {
     alert('Please select a store.');
     return false;
     }

     {
     mNv=GreenSheet.txtBEGDATE.value;
     if (mNv=='') {
     alert('Please select a date.');
     return false;
     }
     if ((GreenSheet.OverUnder.value >= 7.00 || GreenSheet.OverUnder.value <= -7.00) && GreenSheet.Explain.value.length <1) {
     alert('Please give an explaination for over/under.');
     return false;
               }
          }
     }
0
 
AhelblingAuthor Commented:
the problem with the Rev Balance fields was that you changed the names to Amt[#]. I adjusted that in my insert query in my ASP and that is working now.  So we are left with #2 problem above and that should be it.
0
 
AhelblingAuthor Commented:
AND the math for the Reclassification is incorrect - it is supposed to just add to the total. right now it is subtracting.  If i put in -10.00 for Cash and 10.00 for Credits, the math is backwards.
0
 
AhelblingAuthor Commented:
i fixed the math - i just changed these"

formObject.cashTotal.value = formatCurrency((totalCash - (format1+"")/1).toFixed(2));
formObject.checksTotal.value = formatCurrency((totalChecks - (format2+"")/1).toFixed(2));
formObject.creditsTotal.value = formatCurrency((totalCredits - (format3+"")/1).toFixed(2));                  

TO THESE:

formObject.cashTotal.value = formatCurrency((totalCash + (format1+"")/1).toFixed(2));
formObject.checksTotal.value = formatCurrency((totalChecks + (format2+"")/1).toFixed(2));
formObject.creditsTotal.value = formatCurrency((totalCredits + (format3+"")/1).toFixed(2));                  

*****Just that one issue left with the validate() and we are set!!!!*****
0
 
trailblazzyr55Commented:
Sorry yeah I did make the changes with Amt[] it made your javascript a bit shorter with being able to loop through them. So yep that would throw off an insert if it wasn't adjusted in the insert query. So we have the validate function to look at... it was hard for me to test because I can't submit the form... ;o) The reclassification I wasn't sure how your math was so yeah I did minus when I was re-writing some of it, sorry bout that. It sounds like you have the kinks worked out so lets look at this validate function and get it working.

~trail
0
 
AhelblingAuthor Commented:
yep - lets git r done!
0
 
trailblazzyr55Commented:
try this for your validate function ;o)

function validate(theForm){
  Err = "";
  FieldFocus = null;
  var GreenSheet = document.GreenSheet;
  if(GreenSheet.txtStore.selectedIndex<1){
    Err += "\nPlease select a store.";
    FieldFocus = GreenSheet.txtStore;
  }
  if(GreenSheet.txtStore.selectedIndex<1 && GreenSheet.txtBEGDATE.value==""){
    Err += "\nYou Must Select a Date.\nPlease Select From the Calendar pop-up.";
    FieldFocus = GreenSheet.txtBEGDATE;
  }
  if(Err>""){
    alert(Err);
    FieldFocus.focus();
    return false;
  } else {
    return true;
  }
}



lol,... get er' done!
0
 
trailblazzyr55Commented:
missed the explain field at the bottom, here try this one instead..

function validate(theForm){
  Err = "";
  FieldFocus = null;
  var GreenSheet = document.GreenSheet;
  if(GreenSheet.txtStore.selectedIndex<1){
    Err += "\nPlease select a store.";
    FieldFocus = GreenSheet.txtStore;
  }
  if(GreenSheet.txtStore.selectedIndex<1 && GreenSheet.txtBEGDATE.value==""){
    Err += "\nYou Must Select a Date.\nPlease Select From the Calendar pop-up.";
    FieldFocus = GreenSheet.txtBEGDATE;
  }
  if((GreenSheet.OverUnder.value >= 7.00 || GreenSheet.OverUnder.value <= -7.00) && GreenSheet.Explain.value.length <1){
        Err += "\nPlease give an explaination for over/under.";
      FieldFocus = GreenSheet.Explain;
  }
  if(Err>""){
    alert(Err);
    FieldFocus.focus();
    return false;
  } else {
    return true;
  }
}
0
 
trailblazzyr55Commented:
This will focus the user to the correct field with the error, also make sure to replace "TheForm" appropriately in the function, you can take it out, and it should work without making changes to the rest of the form if you have OnSubmit="return validate();" in your form.

just make function validate(theForm){

this

function validate(){

0
 
AhelblingAuthor Commented:
again, the first two worked, but this one doesn't work. The form submits with the over/under values meeting the conditions.

 }
  if((GreenSheet.OverUnder.value >= 7.00 || GreenSheet.OverUnder.value <= -7.00) && GreenSheet.Explain.value.length <1){
       Err += "\nPlease give an explaination for over/under.";
     FieldFocus = GreenSheet.Explain;
  }
0
 
trailblazzyr55Commented:
ahh maybe it's because of the formatting, try this...

}
  if((RevertCurr(GreenSheet.OverUnder.value) >= 7.00 || RevertCurr(GreenSheet.OverUnder.value)<= -7.00) && GreenSheet.Explain.value.length <1){
       Err += "\nPlease give an explaination for over/under.";
     FieldFocus = GreenSheet.Explain;
  }
0
 
AhelblingAuthor Commented:
that works, but now the darn date one is broken.  If i leave the store and date and explanation all blank and fill out the form and have it $100 over, it give an error message stating i need to select a store and a date together in one message, and then puts me up to Store. I select a store and submit and it gives me error about explanation, but not date.
0
 
trailblazzyr55Commented:
lets see, the javascript works like this...

if ( nothing selected from dropdown ) {
       Display DropDown Error
       Focus to dropdown
       }
if ( nothing selected from dropdown & no date ) {
       Display Date Error
       Focus to date
       }
if ( Value <> 7 & -7 & explaination is "" ) {
       Display explaination Error
       Focus to explaination
       }

so I'm guessing changing the middle one would do the trick, try this javascript for validation for the middle one...

 }
  if(GreenSheet.txtBEGDATE.value==""){
    Err += "\nYou Must Select a Date.\nPlease Select From the Calendar pop-up.";
    FieldFocus = GreenSheet.txtBEGDATE;
  }

this way it says...

if ( no date ) {
       Display Date Error
       Focus to date
       }
0
 
AhelblingAuthor Commented:
Operation Accounting Madness complete!
I really learned a lot with your help on this project. Thanks a lot, from a young rookie programmer!!
0
 
trailblazzyr55Commented:
Awesome! Glad its working properly now!

I'm glad I could help, you're very welcome..anytime, and thanks for the points ;o)
I'm glad you were able to learn something as well...

Best Regards,
~trail
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 23
  • 20
Tackle projects and never again get stuck behind a technical roadblock.
Join Now