<?php
if(isset($_POST['Save']))
{
 $empmonth=$_REQUEST['employee_m1']."/".$_REQUEST['employee_m2']."/".$_REQUEST['employee_y']."/".$_REQUEST['employee_y1']."/".$_REQUEST['employee_y2']."/".$_REQUEST['employee_y3'];	
 $empmonth2=$_REQUEST['employer_m1']."/".$_REQUEST['employer_m2']."/".$_REQUEST['employer_y']."/".$_REQUEST['employer_y1']."/".$_REQUEST['employer_y2']."/".$_REQUEST['employer_y3'];	
 $dateof=$_REQUEST['date_of_payment_d1']."/".$_REQUEST['date_of_payment_d2']."/".$_REQUEST['date_of_payment_m1']."/".$_REQUEST['date_of_payment_m2']."/".$_REQUEST['date_of_payment_y1']."/".$_REQUEST['date_of_payment_y2']."/".$_REQUEST['date_of_payment_y3'];
 $check=DB_query("select * from statutory_employee_provident_fund where establishment_code='".$_REQUEST['establishment_code']."' and establishment_name='".$_REQUEST['establishment_name']."'",$db);
 $num=DB_num_rows($check);
 if($num<=0)
 {
 $insert="insert into statutory_employee_provident_fund set establishment_code='".$_REQUEST['establishment_code']."'
        ,account_group='".$_REQUEST['account_group']."',paid_by='".$_REQUEST['paid_by_cheque']."',employee_month_dues='".$empmonth."',
         employer_month_dues='".$empmonth2."',date_of_payment='".FormatDateForSQL($dateof)."',total_no_subscribers_ac1='".$_REQUEST['total_no_subscribers_ac1']."'
         ,total_no_subscribers_ac10='".$_REQUEST['total_no_subscribers_ac10']."',total_no_subscribers_ac21='".$_REQUEST['total_no_subscribers_ac21']."',
         total_wages_due_ac1='".$_REQUEST['total_wages_due_ac1']."',total_wages_due_ac10='".$_REQUEST['total_wages_due_ac10']."'
         ,total_wages_due_ac21='".$_REQUEST['total_wages_due_ac21']."',total_ac1='".$_REQUEST['total_ac1']."',total_ac2='".$_REQUEST['total_ac2']."'
         ,total_ac10='".$_REQUEST['total_ac10']."',total_ac21='".$_REQUEST['total_ac21']."',total_ac22='".$_REQUEST['total_ac22']."',
         grand_total='".$_REQUEST['grand_total']."',amount_in_words='".$_REQUEST['amount_in_words']."',banks_use='".$_REQUEST['banks_use']."',establishment_name='".$_REQUEST['establishment_name']."'
         ,address='".$_REQUEST['address']."',dipositor_name='".$_REQUEST['dipositor_name']."',depositor_signature='".$_REQUEST['depositor_signature']."'
         ,received_amount='".$_REQUEST['received_amount']."', cheques_only='".$_REQUEST['cheques_only']."'
         ,presentation_date='".FormatDateForSQL($_REQUEST['presentation_date'])."',realisation_date='".FormatDateForSQL($_REQUEST['realisation_date'])."'
         ,branch_name='".$_REQUEST['branch_name']."',branch_code='".$_REQUEST['branch_code']."',bank_name='".$_REQUEST['bank_name']."'
         ,cheque_no='".$_REQUEST['cheque_no']."',date='".FormatDateForSQL($_REQUEST['date'])."' ";
$query=DB_query($insert,$db);
 $ErrMsg = _('An error occurred Record Note Save') . '. ' . _('The error says');
 $Lastreq_id=DB_Last_Insert_ID($db,'statutory_employee_provident_fund',$ErrMsg);
  if($Lastreq_id!='')
				{
				$insert2="insert into statutory_employee_provident_fund_datails set	parentid='".$Lastreq_id."',employer_share_count_ac1='".$_REQUEST['employer_share_count_ac1']."'
				,employer_share_count_ac2='".$_REQUEST['employer_share_count_ac2']."', employer_share_count_ac10='".$_REQUEST['employer_share_count_ac10']."'
				,employer_share_count_ac21='".$_REQUEST['employer_share_count_ac21']."',employer_share_count_ac22='".$_REQUEST['employer_share_count_ac22']."'
				,employer_share_count_total='".$_REQUEST['employer_share_count_total']."',employee_share_count_ac1='".$_REQUEST['employee_share_count_ac1']."'
				,employee_share_count_ac2='".$_REQUEST['employee_share_count_ac2']."',employee_share_count_ac10='".$_REQUEST['employee_share_count_ac10']."'
				,employee_share_count_ac21='".$_REQUEST['employee_share_count_ac21']."',employee_share_count_ac22='".$_REQUEST['employee_share_count_ac22']."'
				,employee_share_count_total='".$_REQUEST['employee_share_count_total']."',adm_charges_ac1='".$_REQUEST['adm_charges_ac1']."'
				,adm_charges_ac2='".$_REQUEST['adm_charges_ac2']."',adm_charges_ac10='".$_REQUEST['adm_charges_ac10']."',
			         adm_charges_ac21='".$_REQUEST['adm_charges_ac21']."',adm_charges_ac22='".$_REQUEST['adm_charges_ac22']."'
			         ,adm_charges_total='".$_REQUEST['adm_charges_total']."',insp_charges_ac1='".$_REQUEST['insp_charges_ac1']."'
			         ,insp_charges_ac2='".$_REQUEST['insp_charges_ac2']."',insp_charges_ac10='".$_REQUEST['insp_charges_ac10']."',
			         insp_charges_ac21='".$_REQUEST['insp_charges_ac21']."',insp_charges_ac22='".$_REQUEST['insp_charges_ac22']."'
			         ,insp_charges_total='".$_REQUEST['insp_charges_total']."',penal_demages_ac1='".$_REQUEST['penal_demages_ac1']."'
			         ,penal_demages_ac2='".$_REQUEST['penal_demages_ac2']."',penal_demages_ac10='".$_REQUEST['penal_demages_ac10']."',
			         penal_demages_ac21='".$_REQUEST['penal_demages_ac21']."',penal_demages_ac22='".$_REQUEST['penal_demages_ac22']."'
			         ,penal_demages_total='".$_REQUEST['penal_demages_total']."',miss_payment_ac1='".$_REQUEST['miss_payment_ac1']."'
			         ,miss_payment_ac2='".$_REQUEST['miss_payment_ac2']."',miss_payment_ac10='".$_REQUEST['miss_payment_ac10']."',
			         miss_payment_ac21='".$_REQUEST['miss_payment_ac21']."',miss_payment_ac22='".$_REQUEST['miss_payment_ac22']."'
			         ,miss_payment_total='".$_REQUEST['miss_payment_total']."'";
			         $query1=DB_query($insert2,$db);
				}
				}
echo "<script>location.href='index.php?route=employee_providentlist&modid=".$_REQUEST['modid']."&frmid=".$_REQUEST['frmid']."'</script>";

}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>EMPLOYEES' PROVIDENT FUND ORGANISATION</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.text-wdthout-pad{
		font:12px Verdana, Geneva, sans-serif;
		color:#000;
		line-height:25px;
}
.text{
		font:12px Verdana, Geneva, sans-serif;
		color:#000;
		line-height:25px;
		padding-left:8px;
}
.text1{
		font:15px Verdana, Geneva, sans-serif;
		color:#000;
		line-height:25px;
		padding-left:8px;
}
.text2{
		font:18px Verdana, Geneva, sans-serif;
		color:#000;
		line-height:25px;
		padding-left:8px;
}
-->
</style></head>

<body>
	<form action=""method="post">
<table  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="353" class="text-wdthout-pad">(COMBINED CHALLAN OF A/C No. 1,2,10,21 &amp; 22)</td>
        <td width="373" align="left" class="text">(USE SEPARATE CHALLAN FOR EACH MONTH)</td>
        <td width="264" align="right" class="text"><strong>DUPLICATE</strong></td>
      </tr>
    </table></td>
  </tr>
  <tr>
  	 <td align="center"><table  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
       <td width="453">&nbsp;</td>  <td class="text" width="373">STATE BANK OF INDIA</td><td width="264">&nbsp;</td>
        
      </tr>
    </table></td>	
  	
    
  </tr>
  <tr>
  	<td align="center"><table  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
       <td width="253">&nbsp;</td><td align="center" class="text2" width="453"><u>EMPLOYEES' PROVIDENT FUND ORGANISATION</u></td><td width="264">&nbsp;</td>
    </tr></table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><table  border="0" align="left" cellpadding="0" cellspacing="0">
      <tr>
        <td width="201" class="text">Establishment Code No. DL :</td>
        <td width="168"><input  size="10"  type="text" id="establishment_code" name="establishment_code" /></td>
        <td width="147" class="text">Account Group No. :</td>
        <td ><input  size="10"  type="text" id="account_group" name="account_group" /></td>
        <td width="172" class="text">Paid by Cheque/Cash :</td>
        <td width="144"><input  size="10"  type="text" id="paid_by_cheque" name="paid_by_cheque" /></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><table  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td  class="text">Dues for the Month of :</td>
        <td width="431" align="center" valign="top"><table  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>&nbsp;</td>
            <td align="center" valign="top" class="text-wdthout-pad">M</td>
            <td align="center" valign="top" class="text-wdthout-pad">M</td>
            <td align="center" valign="top" class="text-wdthout-pad">Y</td>
            <td align="center" valign="top" class="text-wdthout-pad">Y</td>
            <td align="center" valign="top" class="text-wdthout-pad">Y</td>
            <td align="center" valign="top" class="text-wdthout-pad">Y</td>
          </tr>
          <tr>
            <td  class="text">Employees Share :</td>
            <td  align="center" valign="top"><input  size="2"  type="text" id="employee_m1" name="employee_m1"  maxlength="1" /></td>
            <td  align="center" valign="top"><input  size="2"  type="text" id="employee_m2" name="employee_m2" maxlength="1"/></td>
            <td  align="center" valign="top"><input  size="4"  type="text" id="employee_y" name="employee_y" maxlength="1"/></td>
            <td  align="center" valign="top"><input  size="4"  type="text" id="employee_y1" name="employee_y1" maxlength="1"/></td>
            <td  align="center" valign="top"><input  size="4"  type="text" id="employee_y2" name="employee_y2" maxlength="1"/></td>
            <td  align="center" valign="top"><input  size="4"  type="text" id="employee_y3" name="employee_y3" maxlength="1"/></td>
          </tr>
          <tr>
            <td height="5"></td>
            <td height="5" align="center" valign="top"></td>
            <td height="5" align="center" valign="top"></td>
            <td height="5" align="center" valign="top"></td>
            <td height="5" align="center" valign="top"></td>
            <td height="5" align="center" valign="top"></td>
            <td height="5" align="center" valign="top"></td>
          </tr>
          <tr>
            <td class="text">Employer Share :</td>
            <td align="center" valign="top"><input  size="2"  type="text" id="employer_m1" name="employer_m1" maxlength="1"/></td>
            <td align="center" valign="top"><input  size="2"  type="text" id="employer_m2" name="employer_m2" maxlength="1"/></td>
            <td align="center" valign="top"><input  size="4"  type="text" id="employer_y" name="employer_y" maxlength="1"/></td>
            <td align="center" valign="top"><input  size="4"  type="text" id="employer_y1" name="employer_y1" maxlength="1"/></td>
            <td align="center" valign="top"><input  size="4"  type="text" id="employer_y2" name="employer_y2" maxlength="1"/></td>
            <td align="center" valign="top"><input  size="4"  type="text" id="employer_y3" name="employer_y3" maxlength="1"/></td>
            </tr>
        </table></td>
        <td ><table  border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td>&nbsp;</td>
            <td align="center" valign="top" class="text-wdthout-pad">D</td>
            <td align="center" valign="top" class="text-wdthout-pad">D</td>
            <td align="center" valign="top" class="text-wdthout-pad">M</td>
            <td align="center" valign="top" class="text-wdthout-pad">M</td>
            <td align="center" valign="top" class="text-wdthout-pad">Y</td>
            <td align="center" valign="top" class="text-wdthout-pad">Y</td>
            <td align="center" valign="top" class="text-wdthout-pad">Y</td>
            <td align="center" valign="top" class="text-wdthout-pad">Y</td>
            </tr>
          <tr>
            <td  class="text-wdthout-pad">Date of Payment :</td>
            <td  align="center" valign="top"><input  size="2"  type="text" id="date_of_payment_d1" name="date_of_payment_d1" maxlength="1"/></td>
            <td  align="center" valign="top"><input  size="2"  type="text" id="date_of_payment_d2" name="date_of_payment_d2" maxlength="1"/></td>
            <td  align="center" valign="top"><input  size="2"  type="text" id="date_of_payment_m1" name="date_of_payment_m1" maxlength="1"/></td>
            <td  align="center" valign="top"><input  size="2"  type="text" id="date_of_payment_m2" name="date_of_payment_m2" maxlength="1"/></td>
            <td  align="center" valign="top"><input  size="4"  type="text" id="date_of_payment_y1" name="date_of_payment_y1" maxlength="1"/></td>
            <td  align="center" valign="top"><input  size="4"  type="text" id="date_of_payment_y2" name="date_of_payment_y2" maxlength="1"/></td>
            <td  align="center" valign="top"><input  size="4"  type="text" id="date_of_payment_y3" name="date_of_payment_y3" maxlength="1"/></td>
            <td  align="center" valign="top"><input  size="4"  type="text" id="date_of_payment_y4" name="date_of_payment_y4" maxlength="1"/></td>
            </tr>
        </table></td>
      </tr>
    </table>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="center" valign="top"><table  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="text">Total No. of Subscribers :</td>
        <td>&nbsp;</td>
        <td><input  size="10"  type="text" id="total_no_subscribers_ac1" name="total_no_subscribers_ac1" /></td>
        <td>&nbsp;</td>
        <td><input  size="10"  type="text" id="total_no_subscribers_ac10" name="total_no_subscribers_ac10" /></td>
        <td>&nbsp;</td>
        <td><input  size="10"  type="text" id="total_no_subscribers_ac21" name="total_no_subscribers_ac21" /></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td class="text-wdthout-pad">A/c 1</td>
        <td>&nbsp;</td>
        <td class="text-wdthout-pad">A/c 10</td>
        <td>&nbsp;</td>
        <td class="text-wdthout-pad">A/c 21</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td  class="text">Total Wages Due :</td>
        <td >&nbsp;</td>
        <td ><input  size="10"  type="text" id="total_wages_due_ac1" name="total_wages_due_ac1" /></td>
        <td >&nbsp;</td>
        <td ><input  size="10"  type="text" id="total_wages_due_ac10" name="total_wages_due_ac10" /></td>
        <td>&nbsp;</td>
        <td ><input  size="10"  type="text" id="total_wages_due_ac21" name="total_wages_due_ac21" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><table style="border:1px solid #cccccc;"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td  rowspan="2" align="center" class="text">Sl. No.</td>
        <td  rowspan="2" align="left" class="text-wdthout-pad">PARTICULARS</td>
        <td  align="center" valign="top" class="text-wdthout-pad">A/c. No. 1</td>
        <td  align="center" valign="top" class="text-wdthout-pad">A/c. No. 2</td>
        <td  align="center" valign="top" class="text-wdthout-pad">A/c. No. 10</td>
        <td  align="center" valign="top" class="text-wdthout-pad">A/c. No. 21</td>
        <td  align="center" valign="top" class="text-wdthout-pad">A/c. No. 22</td>
        <td  align="center" valign="top" class="text-wdthout-pad">Total</td>
      </tr>
      <tr>
        <td colspan="6" align="center" valign="top" class="text-wdthout-pad">.........AMOUNT (in Rupees).......</td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td align="center" valign="top"><table  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td   align="center" class="text">1.</td>
        <td   class="text-wdthout-pad">Employer's Share of Cont.</td>
        <td   align="center"><input  size="10"  type="text" id="employer_share_count_ac1" name="employer_share_count_ac1" /></td>
        <td  align="center"><input  size="10"  type="text" id="employer_share_count_ac2" name="employer_share_count_ac2" /></td>
        <td  align="center"><input  size="10"  type="text" id="employer_share_count_ac10" name="employer_share_count_ac10" /></td>
        <td   align="center"><input  size="10"  type="text" id="employer_share_count_ac21" name="employer_share_count_ac21" /></td>
        <td  align="center"><input  size="10"  type="text" id="employer_share_count_ac22" name="employer_share_count_ac22" /></td>
        <td  align="center"><input  size="10"  type="text" id="employer_share_count_total" name="employer_share_count_total" onfocus="emp_total();" readonly="readonly" /></td>
      </tr>
      <tr>
        <td align="center" class="text">2.</td>
        <td class="text-wdthout-pad">Employee's Share of Cont.</td>
        <td align="center"><input  size="10"  type="text" id="employee_share_count_ac1" name="employee_share_count_ac1" /></td>
        <td align="center"><input  size="10"  type="text" id="employee_share_count_ac2" name="employee_share_count_ac2" /></td>
        <td align="center"><input  size="10"  type="text" id="employee_share_count_ac10" name="employee_share_count_ac10" /></td>
        <td align="center"><input  size="10"  type="text" id="employee_share_count_ac21" name="employee_share_count_ac21" /></td>
        <td align="center"><input  size="10"  type="text" id="employee_share_count_ac22" name="employee_share_count_ac22" /></td>
        <td align="center"><input  size="10"  type="text" id="employee_share_count_total" name="employee_share_count_total"  onfocus="employee_total();" readonly="readonly"/></td>
        </tr>
      <tr>
        <td align="center" class="text">3.</td>
        <td class="text-wdthout-pad">ADM. Charges</td>
        <td align="center"><input  size="10"  type="text" id="adm_charges_ac1" name="adm_charges_ac1" /></td>
        <td align="center"><input  size="10"  type="text" id="adm_charges_ac2" name="adm_charges_ac2" /></td>
        <td align="center"><input  size="10"  type="text" id="adm_charges_ac10" name="adm_charges_ac10" /></td>
        <td align="center"><input  size="10"  type="text" id="adm_charges_ac21" name="adm_charges_ac21" /></td>
        <td align="center"><input  size="10"  type="text" id="adm_charges_ac22" name="adm_charges_ac22" /></td>
        <td align="center"><input  size="10"  type="text" id="adm_charges_total" name="adm_charges_total" onfocus="adm_total();" readonly="readonly"/></td>
        </tr>
      <tr>
        <td align="center" class="text">4.</td>
        <td class="text-wdthout-pad">Insp. Charges</td>
        <td align="center"><input  size="10"  type="text" id="insp_charges_ac1" name="insp_charges_ac1" /></td>
        <td align="center"><input  size="10"  type="text" id="insp_charges_ac2" name="insp_charges_ac2" /></td>
        <td align="center"><input  size="10"  type="text" id="insp_charges_ac10" name="insp_charges_ac10" /></td>
        <td align="center"><input  size="10"  type="text" id="insp_charges_ac21" name="insp_charges_ac21" /></td>
        <td align="center"><input  size="10"  type="text" id="insp_charges_ac22" name="insp_charges_ac22" /></td>
        <td align="center"><input  size="10"  type="text" id="insp_charges_total" name="insp_charges_total" onfocus="calinsp_total();" readonly="readonly"/></td>
        </tr>
      <tr>
        <td height="31" align="center" class="text">5.</td>
        <td class="text-wdthout-pad">Penal Damages</td>
        <td align="center"><input  size="10"  type="text" id="penal_demages_ac1" name="penal_demages_ac1" /></td>
        <td align="center"><input  size="10"  type="text" id="penal_demages_ac2" name="penal_demages_ac2" /></td>
        <td align="center"><input  size="10"  type="text" id="penal_demages_ac10" name="penal_demages_ac10" /></td>
        <td align="center"><input  size="10"  type="text" id="penal_demages_ac21" name="penal_demages_ac21" /></td>
        <td align="center"><input  size="10"  type="text" id="penal_demages_ac22" name="penal_demages_ac22" /></td>
        <td align="center"><input  size="10"  type="text" id="penal_demages_total" name="penal_demages_total" onfocus="calpen_total();" readonly="readonly"/></td>
        </tr>
      <tr>
        <td align="center" valign="top" class="text">6.</td>
        <td valign="top" class="text-wdthout-pad">Misc. Payment (past Accumulations only)</td>
        <td align="center" valign="top"><input  size="10"  type="text" id="miss_payment_ac1" name="miss_payment_ac1" /></td>
        <td align="center" valign="top"><input  size="10"  type="text" id="miss_payment_ac2" name="miss_payment_ac2" /></td>
        <td align="center" valign="top"><input  size="10"  type="text" id="miss_payment_ac10" name="miss_payment_ac10" /></td>
        <td align="center" valign="top"><input  size="10"  type="text" id="miss_payment_ac21" name="miss_payment_ac21" /></td>
        <td align="center" valign="top"><input  size="10"  type="text" id="miss_payment_ac22" name="miss_payment_ac22" /></td>
        <td align="center" valign="top"><input  size="10"  type="text" id="miss_payment_total" name="miss_payment_total"  onfocus="calmiss_total();" readonly="readonly"/></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td align="right" class="text">Total</td>
        <td align="right"><input  size="10"  type="text" id="total_ac1" name="total_ac1" onfocus="ac1total();" readonly="readonly"/></td>
        <td align="left"><input  size="10"  type="text" id="total_ac2" name="total_ac2" onfocus="ac1tota2();" readonly="readonly"/></td>
        <td align="left"><input  size="10"  type="text" id="total_ac10" name="total_ac10" onfocus="ac1total0();" readonly="readonly"/></td>
        <td align="left"><input  size="10"  type="text" id="total_ac21" name="total_ac21" onfocus="ac1tota21();" readonly="readonly"/></td>
        <td align="left"><input  size="10"  type="text" id="total_ac22" name="total_ac22" onfocus="ac1tota22();" readonly="readonly"/></td>
        <td align="left"><input  size="10"  type="text" id="grand_total" name="grand_total" onfocus="grandtotal();" readonly="readonly"/></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><table width="730" border="0" align="right" cellpadding="0" cellspacing="0">
      <tr>
        <td width="119" class="text-wdthout-pad">Amount in words</td>
        <td width="345" align="left"><input style="width:300px" type="text" id="amount_in_words" name="amount_in_words" onfocus="inwords()"  readonly="readonly"/></td>
        <td width="136" class="text-wdthout-pad">For Banks use only</td>
        <td width="130"><input  size="10"  type="text" id="banks_use" name="banks_use" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><table  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td  valign="top"><table   border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="200" align="left" valign="top" class="text-wdthout-pad">Name of Establishment :</td>
            <td  align="left" valign="top"><input  size="10"  type="text" id="establishment_name" name="establishment_name" /></td>
          </tr>
          <tr>
            <td align="left" valign="top" class="text-wdthout-pad">Address:</td>
            <td align="left" valign="top"><input  size="10"  type="text" id="address" name="address" /></td>
          </tr>
          <tr>
            <td align="left" valign="top" class="text-wdthout-pad">Name of Dipositor :</td>
            <td align="left" valign="top"><input  size="10"  type="text" id="dipositor_name" name="dipositor_name" /></td>
          </tr>
          <tr>
            <td align="left" valign="top" class="text-wdthout-pad">Signature of the Depositor :</td>
            <td align="left" valign="top"><input  size="10"  type="text" id="depositor_signature" name="depositor_signature" /></td>
          </tr>
          </table></td>
        <td  align="right" valign="top"><table width="300" border="0" align="right" cellpadding="0" cellspacing="0">
          <tr>
            <td align="left" valign="top" class="text-wdthout-pad">Amount Received Rs. :</td>
            <td align="left" valign="top"><input  size="10"  type="text" id="received_amount" name="received_amount" onfocus="grandtotal1()" readonly/></td>
          </tr>
          <tr>
            <td align="left" valign="top" class="text-wdthout-pad">For Cheques only :</td>
            <td align="left" valign="top"><input  size="10"  type="text" id="cheques_only" name="cheques_only" /></td>
          </tr>
          <tr>
            <td align="left" valign="top" class="text-wdthout-pad">Date of Presentation :</td>
            <td align="left" valign="top"><input  size="10"  type="text" id="presentation_date" name="presentation_date" class="datepicker" /></td>
          </tr>
          <tr>
            <td align="left" valign="top" class="text-wdthout-pad">Date of Realisation :</td>
            <td align="left" valign="top"><input  size="10"  type="text" id="realisation_date" name="realisation_date" class="datepicker" /></td>
          </tr>
          <tr>
            <td align="left" valign="top" class="text-wdthout-pad">Branch Name :</td>
            <td align="left" valign="top"><input  size="10"  type="text" id="branch_name" name="branch_name" /></td>
          </tr>
          <tr>
            <td align="left" valign="top" class="text-wdthout-pad">Branch Code No. :</td>
            <td align="left" valign="top"><input  size="10"  type="text" id="branch_code" name="branch_code" /></td>
          </tr>
          <tr>
            <td  align="left" valign="top">&nbsp;</td>
            <td  align="left" valign="top">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td align="center" valign="top" class="text1"><strong>(TO BE FILLED IN BY EMPLOYER)</strong></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><table  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="text-wdthout-pad">Name of the Bank</td>
        <td><input style="width:280px" type="text" id="bank_name" name="bank_name" /></td>
        <td class="text-wdthout-pad">Cheque No.</td>
        <td class="text-wdthout-pad"><input  size="10"  type="text" id="cheque_no" name="cheque_no" /></td>
        <td class="text-wdthout-pad">Date</td>
        <td ><input  size="10"  type="text"  name="date" id="date" class="datepicker">
       </td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><p align="center"><input type="submit" name="Save"  value="Save"/></p></td>
  </tr>
</table>
</form>
</body>
</html>
<script language="JavaScript">
function emp_total()
{
var k=document.getElementById("employer_share_count_ac1").value;
var k1=document.getElementById("employer_share_count_ac2").value;
var k2=document.getElementById("employer_share_count_ac10").value;
var k3=document.getElementById("employer_share_count_ac21").value;
var k4=document.getElementById("employer_share_count_ac22").value;
var total=parseFloat(k)+parseFloat(k1)+parseFloat(k2)+parseFloat(k3)+parseFloat(k4);	
document.getElementById("employer_share_count_total").value=total.toFixed(2);
}	
function employee_total()
{
var k=document.getElementById("employee_share_count_ac1").value;
var k1=document.getElementById("employee_share_count_ac2").value;
var k2=document.getElementById("employee_share_count_ac10").value;
var k3=document.getElementById("employee_share_count_ac21").value;
var k4=document.getElementById("employee_share_count_ac22").value;
var total=parseFloat(k)+parseFloat(k1)+parseFloat(k2)+parseFloat(k3)+parseFloat(k4);	
document.getElementById("employee_share_count_total").value=total.toFixed(2);
}	
function adm_total()
{
var k=document.getElementById("adm_charges_ac1").value;
var k1=document.getElementById("adm_charges_ac2").value;
var k2=document.getElementById("adm_charges_ac10").value;
var k3=document.getElementById("adm_charges_ac21").value;
var k4=document.getElementById("adm_charges_ac22").value;
var total=parseFloat(k)+parseFloat(k1)+parseFloat(k2)+parseFloat(k3)+parseFloat(k4);	
document.getElementById("adm_charges_total").value=total.toFixed(2);
}	
function calinsp_total()
{
var k=document.getElementById("insp_charges_ac1").value;
var k1=document.getElementById("insp_charges_ac2").value;
var k2=document.getElementById("insp_charges_ac10").value;
var k3=document.getElementById("insp_charges_ac21").value;
var k4=document.getElementById("insp_charges_ac22").value;
var total=parseFloat(k)+parseFloat(k1)+parseFloat(k2)+parseFloat(k3)+parseFloat(k4);	
document.getElementById("insp_charges_total").value=total.toFixed(2);
}	
function calpen_total()
{
var k=document.getElementById("penal_demages_ac1").value;
var k1=document.getElementById("penal_demages_ac2").value;
var k2=document.getElementById("penal_demages_ac10").value;
var k3=document.getElementById("penal_demages_ac21").value;
var k4=document.getElementById("penal_demages_ac22").value;
var total=parseFloat(k)+parseFloat(k1)+parseFloat(k2)+parseFloat(k3)+parseFloat(k4);	
document.getElementById("penal_demages_total").value=total.toFixed(2);
}	
function calmiss_total()
{
var k=document.getElementById("miss_payment_ac1").value;
var k1=document.getElementById("miss_payment_ac2").value;
var k2=document.getElementById("miss_payment_ac10").value;
var k3=document.getElementById("miss_payment_ac21").value;
var k4=document.getElementById("miss_payment_ac22").value;
var total=parseFloat(k)+parseFloat(k1)+parseFloat(k2)+parseFloat(k3)+parseFloat(k4);	
document.getElementById("miss_payment_total").value=total.toFixed(2);
}	
function ac1total()
{
var k=document.getElementById("miss_payment_ac1").value;
var k1=document.getElementById("penal_demages_ac1").value;
var k2=document.getElementById("insp_charges_ac1").value;
var k3=document.getElementById("adm_charges_ac1").value;
var k4=document.getElementById("employee_share_count_ac1").value;
var k5=document.getElementById("employer_share_count_ac1").value;
var total=parseFloat(k)+parseFloat(k1)+parseFloat(k2)+parseFloat(k3)+parseFloat(k4)+parseFloat(k5);
document.getElementById("total_ac1").value=total.toFixed(2);
}
function ac1tota2()
{
var k=document.getElementById("miss_payment_ac2").value;
var k1=document.getElementById("penal_demages_ac2").value;
var k2=document.getElementById("insp_charges_ac2").value;
var k3=document.getElementById("adm_charges_ac2").value;
var k4=document.getElementById("employee_share_count_ac2").value;
var k5=document.getElementById("employer_share_count_ac2").value;
var total=parseFloat(k)+parseFloat(k1)+parseFloat(k2)+parseFloat(k3)+parseFloat(k4)+parseFloat(k5);
document.getElementById("total_ac2").value=total.toFixed(2);
}
function ac1total0()
{
var k=document.getElementById("miss_payment_ac10").value;
var k1=document.getElementById("penal_demages_ac10").value;
var k2=document.getElementById("insp_charges_ac10").value;
var k3=document.getElementById("adm_charges_ac10").value;
var k4=document.getElementById("employee_share_count_ac10").value;
var k5=document.getElementById("employer_share_count_ac10").value;
var total=parseFloat(k)+parseFloat(k1)+parseFloat(k2)+parseFloat(k3)+parseFloat(k4)+parseFloat(k5);
document.getElementById("total_ac10").value=total.toFixed(2);
}
function ac1tota21()
{
var k=document.getElementById("miss_payment_ac21").value;
var k1=document.getElementById("penal_demages_ac21").value;
var k2=document.getElementById("insp_charges_ac21").value;
var k3=document.getElementById("adm_charges_ac21").value;
var k4=document.getElementById("employee_share_count_ac21").value;
var k5=document.getElementById("employer_share_count_ac21").value;
var total=parseFloat(k)+parseFloat(k1)+parseFloat(k2)+parseFloat(k3)+parseFloat(k4)+parseFloat(k5);
document.getElementById("total_ac21").value=total.toFixed(2);
}
function ac1tota22()
{
var k=document.getElementById("miss_payment_ac22").value;
var k1=document.getElementById("penal_demages_ac22").value;
var k2=document.getElementById("insp_charges_ac22").value;
var k3=document.getElementById("adm_charges_ac22").value;
var k4=document.getElementById("employee_share_count_ac22").value;
var k5=document.getElementById("employer_share_count_ac22").value;
var total=parseFloat(k)+parseFloat(k1)+parseFloat(k2)+parseFloat(k3)+parseFloat(k4)+parseFloat(k5);
document.getElementById("total_ac22").value=total.toFixed(2);
}
function grandtotal()
{
var k=document.getElementById("employer_share_count_total").value;
var k1=document.getElementById("employee_share_count_total").value;
var k2=document.getElementById("adm_charges_total").value;
var k3=document.getElementById("insp_charges_total").value;
var k4=document.getElementById("penal_demages_total").value;
var k5=document.getElementById("miss_payment_total").value;
var total=parseFloat(k)+parseFloat(k1)+parseFloat(k2)+parseFloat(k3)+parseFloat(k4)+parseFloat(k5);
document.getElementById("grand_total").value=total.toFixed(2);
}
var th = ['','Thousand','Million', 'Billion','Trillion'];
var dg = ['Zero','One','Two','Three','Four', 'Five','Six','Seven','Eight','Nine']; var tn = ['Ten','Eleven','Twelve','Thirteen', 'Fourteen','Fifteen','Sixteen', 'Seventeen','Eighteen','Nineteen']; var tw = ['Twenty','Thirty','Forty','Fifty', 'Sixty','Seventy','Eighty','Ninety']; 

function inwords()
{ 
	s=document.getElementById("grand_total").value;
	s = s.toString(); s = s.replace(/[\, ]/g,'');  if (s != parseFloat(s)) return 'not a number'; var x = s.indexOf('.'); if (x == -1) x = s.length; if (x > 15) return 'too big'; var n = s.split(''); var str = ''; var sk = 0; for (var i=0; i < x; i++) {if ((x-i)%3==2) {if (n[i] == '1') {str += tn[Number(n[i+1])] + ' '; i++; sk=1;} else if (n[i]!=0) {str += tw[n[i]-2] + ' ';sk=1;}} else if (n[i]!=0) {str += dg[n[i]] +' '; if ((x-i)%3==0) str += 'hundred ';sk=1;} if ((x-i)%3==1) {if (sk) str += th[(x-i-1)/3] + ' ';sk=0;}} 
if (x != s.length) {var y = s.length; str += 'point '; for (var i=x+1; i<y; i++) str += dg[n[i]] +' ';} 
document.getElementById("amount_in_words").value=str;
//return str.replace(/\s+/g,' ');
 }
 function grandtotal1()
 {
 	document.getElementById("received_amount").value=document.getElementById("grand_total").value;
 	
 }	
 function input_onchange(me){ 
        if (me.value.length!=this.maxlength){
            return;
        }
        var i;
        var elements = me.form.elements;
        for (i=0, numElements=elements.length; i<numElements; i++) {
            if (elements[i]==me){
                break;
            }
        }
        elements[i+1].focus();
    }

</script>




