session_start(); if(strlen($brcode)<=0) { print ""; return; } include("../opendb.php"); include("../test.php"); ?>
| No. | To | Inv NO. | Inv. Date | Financer | DA | MCode | Config | Net Amt. | Tax | Tax% | Before Tax
$i=1;
while($row=mysql_fetch_array($result))
{
if($row[type]=='-')
{
$cus_result=mysql_query("select custname from cust_master where code='$row[cust]'")or die (mysql_error());
$cus_row=mysql_fetch_row($cus_result);
$cust=$cus_row[0];
}
else if($row[type]=='trans-out')
{
$cus_result=mysql_query("select brname from br_master where code='$row[cust]'")or die (mysql_error());
$cus_row=mysql_fetch_row($cus_result);
$cust="".$cus_row[0];
}
else
$cust="".$row[0];
print "| ".$i++." | $cust | $row[invno] | ".datetohtml($row[invdate])." | $row[fin] | ";
print "$row[da] | $row[model_code] | $row[config] | $row[netamt] | ";
print "$row[tax] | $row[taxp] | $row[amt2] | Total | ".putcoma($tnet)." | ";
print " ".putComa($ttax)." | | ";
print "".putComa($tb)." | |
|---|---|---|---|---|---|---|---|---|---|---|---|