<?php
$PageSecurity = 11;
//echo $_SERVER['QUERY_STRING'];exit;
include('includes/SQL_CommonFunctions.inc');
include('includes/function_lib.php');
include('includes/session.inc');
		        	$q=$_GET['q'];
				    $tab=$_GET['tab'];
					$amount=$_GET['amount'];
		 	$sql="Select taxrate   from sales_tax_master Where ledger_id   ='".$q."'";
 			$result = DB_query($sql,$db);
 			$myrow=DB_Fetch_array($result);
			
			$condition="1=1";	 
			$lastids=$s->GetLastRecord('invoice',  $condition,'invoice_id');
			$newid=$lastids+1;
			 
?><input name="vat_cst" type="hidden" id="vat_cst" value="<?php  echo $myrow['taxrate']; ?>" size="1" onfocus="cal_vatcst(this.value)" readonly="true" > 
               <input name="calvatcst" id="calvatcst" type="text" value="<?php echo number_format(($amount*$myrow['taxrate']*.01) ,2, '.', '') ?>" size="21"    onfocus="cal_vatcst(this.value)"/>        