<? 
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>  </u></span></TD></TR>

<?
$brname=explode(',',$branch);
?>

</TABLE>

<br>

<center>
<TABLE width=100% border=0>
<tr><td width=250 align=right> </td><td><font size='3'><b> <?print $invno?></b></font></td><td align=center width=680></td><td> <?print datetohtml($row[invdate])?></td><TD width=150></TD>
</table>
</center>


To:
<blockquote>&nbsp;&nbsp;&nbsp;
<? print $row[cust].'<br>&nbsp;&nbsp;&nbsp;&nbsp;'.str_replace('-','<br>&nbsp;&nbsp;&nbsp;&nbsp;',$row[addr])?>
<br>&nbsp;&nbsp;&nbsp;&nbsp;
</blockquote>
<TABLE align = center CELLSPACING=1 CELLPADDING=1 BGCOLOR=BLACK width=90% border=1>
<tr align=center><td>SL<br>No.</td><td>Description </td><td>Tax<br>Rate
<td>Unit Price </td><td>Qty</td><td>Gross Value</td><td>Disc / unit</td><td>Net Value</td>
<td>Tax Amount</td>
<td>Cess% </td><td>Cess Amt</td>
<td>Grand Total</td></tr>

<tr valign=top><td>1</td><td><?print $row[config]?></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[unit]*$row[qty]?></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><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 align=right><?print $row[unit]*$row[qty]?></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>
</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>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></tr>

<tr valign=top><td>1</td><td><?print $row[config]?></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 align=right><?print $row[netamt]?></td><td align=right><?print $row[netamt]?><td align=right><?print $row[tax]?></td><td align=right><?print $row[netamt]?></td>
</tr>
</table>
-->
<?
$gtot=$row[netamt]+$row[regis_permit_amt]+$row[insurenceamt]+$row[speedgvr];
?>

<table width=100% cellspacing=4 border=0>
<tr><td>GVW :</td><td><b><? print $row[gvw] ?></b></td><td>Insurance charges :</td><td><b><? print $row[insurenceamt] ?></b></td><td width=160></td></tr>
<tr><td>Wheel Base :</td><td><b><? print $row[wheel] ?></b></td><td>Speed Governor :</td><td><b><? print $row[speedgvr] ?></b></td><td width=160></td></tr>
<tr><td>Tyre size :</td><td><b><? print $row[tyre] ?></b></td><td>Tax,Registration.permit :</td><td><b><? print $row[regis_permit_amt] ?></b></td><td width=160></td><td><b>Total</b></td><td><font size='3'><b><? print $gtot ?></font></td></tr>
</table>
<table  width=100% cellspacing=4 border=0>
<tr><td width=100 valign=top>&nbsp;&nbsp;Remarks :</td><td><? print $row[remark] ?></td></tr>
<tr><td width=50 valign=top>&nbsp;&nbsp;&nbsp;Note :</td><td>
<?
$brname=explode(',',$branch);
?>
 <font size=1>1. The Full payment in advance by Electronic transfer to our </font><b><u> Bank A/c no.30728155988 </u>of SBI,Commercial Branch Ernakulam<b> (IFSC Code.SBIN0004062)</b> <font size=1>or crossed Bank draft in favour of</font> <font size=1> <?print $brname[0]?>,</font><b><u> A/c No. 30728155988</u></b> payable at <?
if($brcode=='Aut141')
 print "CALICUT";
else if($brcode=='AUT009')
  print "MANGALORE";
else
  print "COCHIN";
?>
</td></tr>
<tr><td></td><td><font size=1>2. Prices prevailing at the date of delivery will be applicable.</font></td></tr>
<tr><td></td><td><font size=1>3. The delivery of the vehicle will be effected within two weeks from the date of receipt of full payment for standard configuration. For builtups and non standard configurations, delivery will be effected in 4 to 6 weeks from the date of receipt of full payment. </font></td></tr>
<tr><td></td><td><font size=1>4. Arranging finance for new vehicle will be the sole responsibility of the customer.</font></td></tr>
<tr><td></td><td><font size=1>5. Advance payment will be refunded only after deducting Rs5000/- as Cancellation Charge, if the order is cancelled by the customer.</font></td></tr>
<tr><td></td><td><font size=1>6. In case of cancellation, cancellation request letter has to be forwarded along with the original order booking form and original receipt. Refund will be made with in one month with out  any interest</font></td></tr>
<tr><td></td><td><font size=1>7. In the case of exchange deal, Exchange price will be as per terms & conditions mentioned in the exchange vehicle agreement signed by customer and exchange vehicle in charge of the  company.</font></td></tr>
<tr><td></td><td><font size=1>8. Price allowed for exchanging old vehicle will be valid only if customer takes delivery of new vehicle from PSN.</font></td></tr>
<tr><td></td><td><font size=1>9. Vehicle once sold will not be taken back.</font></td></tr>
<tr><td></td><td><font size=1>10. Subject to Force Majeure clause</font></td></tr>
<tr><td></td><td><font size=1>11. Subject to jurisdiction of Courts at Ernakulam.</font></td></tr>
<tr><td></td><td><font size=1>12. The customer shall not be entitled to transfer the booking effected into the name of any other person and the vehicle. would be delivered, and invoiced only in the Name &Address of the person specified in the Delivery Order of the Financier.</font></td></tr>

</table>



