<? 
session_start();
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../ind.php'; </script>";
 return;
}

include("../opendb.php");
include("../test.php");
$result=mysqli_query($db,"select * from profinv where invno='$invno' and brcode='$brcode'");
$row=mysqli_fetch_array($result);

$re=mysqli_query($db,"select * from branch where brcode='$brcode'");
$brow=mysqli_fetch_array($re);

?>
<style>
td,body{font-family:arial;background-color:white;font-size:12}
</style>
<table width=100%>
<tr><td align=center><span style={letter-spacing:5}><u> PROFORMA INVOICE </u></span></TD></TR>
<tr><td>TIN: <?print $brow[tin]?><BR>(TAX PAYERS IDENTIFICATION NO.)</td></tr>
<tr><td align=right>CST Reg. No.:<?print $brow[cstno]?></td></tr>
<?
$brname=explode(',',$branch);
?>
<tr><td align=center><span style={letter-spacing:5}><b><?print STRTOUPPER($brname[0])?></b> </span> <br>
<?Print $brow[braddr].'<br>'.$brow[brcity].',Phone:'.$brow[brphone]?>
<br>AUTHORISED DEALER FOR EICHER VEHICLES<BR>Regd.Off. 35/189, NH 47, PALARIVATTOM, KOCHIN, PIN.682 025<BR>
</td></tr>

</TABLE>
<br>
<center>
<TABLE width=100% border=0>
<tr><td width=800 align=right>No </td><td>: <?print $invno?></td></tr>
<tr><td align=right width=800>date</td><td>: <?print datetohtml($row[invdate])?></td>
</table>
</center>
To: <br>
<blockquote>
<? print $row[cust].'<br>'.str_replace('-','<br>',$row[addr])?>
<br>Hypothicated to : <?print $row[fin]?>
</blockquote>

<TABLE CELLSPACING=1 CELLPADDING=1 BGCOLOR=BLACK width=100% border=1>
<tr align=center><td>SL<br>No.</td><td>Description </td><td>ITem Code </td><td>Tax<br>Rate
<td>Unit Price </td><td>Qty</td><td>Gross Value</td><td>Cash<br>Disc</td><td>Net Value</td>
<td>Tax Amount</td>
<td>Cess% </td><td>Cess Amt</td>
<td>Grand Total</td><td>Discount<br>Gifts Free</td></tr>

<tr valign=top><td>1</td><td><?print $row[config]?></td><td>&nbsp;</td>
<td><?print $row[taxp].'%'?></td><td align=right><?print $row[unit]?></td><td align=right><?print $row[qty]?></td>
<td align=right><?print $row[netamt]?></td><td><?print $row[disc]?></td>
<td align=right><?print $row[amt2]?></td><td align=right><?print $row[tax]?></td>
<td align=right><?print $row[cessp]?></td><td align=right><?print $row[cessamt]?></td>
<td align=right><?print $row[netamt]?></td><td align=center>-<br><br><br></td></tr>

<tr><td>&nbsp;</td><td>T O T A L</TD><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>
<td align=right><?print $row[netamt]?></td><td><?print $row[disc]?></td><td align=right><?print $row[amt2]?>
<td align=right><?print $row[tax]?></td>
<td align=right><?print $row[cessp]?></td>
<td align=right><?print $row[cessamt]?></td>
<td align=right><font size=3><?print $row[netamt]?></td>
<td align=center>- </td></tr>
</table>

<!--
<TABLE CELLSPACING=1 CELLPADDING=1 BGCOLOR=BLACK width=100% border=1>
<tr align=center><td>SL<br>No.</td><td>Description </td><td>ITem Code </td><td>Tax<br>Rate
<td>Unit Price </td><td>Qty</td><td>Gross Value</td><td>Cash<br>Disc</td><td>Net Value</td>
<td>Tax Amount</td><td>Grand Total</td><td>Discount<br>Gifts Free</td></tr>

<tr valign=top><td>1</td><td><?print $row[config]?></td><td></td>
<td><?print $row[taxp].'%'?></td><td align=right><?print $row[unit]?></td><td align=right>1</td>
<td align=right><?print $row[netamt]?></td><td><?print $row[disc]?></td>
<td align=right><?print $row[amt2]?></td><td align=right><?print $row[tax]?></td>
<td align=right><?print $row[netamt]?></td><td align=center>-<br><br><br></td></tr>
<tr><td>&nbsp;</td><td>T O T A L</TD><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>
<td align=right><?print $row[netamt]?></td><td><?print $row[disc]?></td><td align=right><?print $row[netamt]?><td align=right><?print $row[tax]?></td><td align=right><?print $row[netamt]?></td>
<td align=center>- </td></tr>
</table>
-->
<br>

<table width=100% cellspacing=5 border=0>
<tr><td width=95 valign=top>Note :</td><td>
<?
$brname=explode(',',$branch);
?>
 1. The Full payment in advance by Electronic transfer to our <font size=3><b><u> Bank A/c no.30440302994 </u></b>of SBI,Commercial Branch Ernakulam</font><b> (IFSC Code.SBIN0004062)</b> or crossed Bank draft in favour of <font size=3> <?print $brname[0]?>,<b><u> A/c No. 30440302994</u></b></font> payable at <?
if($brcode=='Aut141')
 print "CALICUT";
else if($brcode=='AUT009')
  print "MANGALORE";
else
  print "COCHIN";
?>
</td></tr>
<tr><td></td><td>2. Delivery in 2 weeks of receiving the full payment. For Built ups & non standard configuration, delivery in 4 to 6 weeks of receiving the full payment.</td></tr>
<tr><td></td><td>3. The price as well as specifications are subject to change without notice..  Price, taxes / duties will be those ruling at the time of delivery.</td></tr>
<tr><td></td><td>4. The delivery indication given is subject to 'Force Majeure' clauce.  Any delay or failure to deliver due to such reasons, should not enitle the buyer to cancel order, nor will the company be liable to any consequentia damages.</td></tr>
<tr><td></td><td>5. Jurisdiction :
<?
if($brcode=='Aut141')
 print "CALICUT";
else if($brcode=='AUT009')
  print "MANGALORE";
else
  print "COCHIN";
?>



</table>



<br><br><br>
<table width=100% border=0>
<tr><td> </td><td width=500 align=center> For <?print $brname[0]?></td></tr>
<tr><td></td><td width=500 align=center><BR><BR><BR>Authorised Signatory<br></TD></TR>
<tr><td colspan=2 align=center>PSN - 90 YEARS OF REPUTATION & TRUST</td></tr>
</TABLE>
<BR>&nbsp;
