<? 
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><br><br><br><br></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>
<?
$tcsamt=$row[netamt]*$row[tcsamt]/100;
$tcsamt=number_format($tcsamt, 2, '.', '');
$tcsamt=round($tcsamt);
$netamount=$row[netamt];
$cgstamt = round($row[tax]/2);
$Sgstamt = round($row[tax]/2);
$cgstper = $row[taxp]/2;
$tcsamt=number_format($tcsamt, 2, '.', '');
?>

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><b>Description </td><td align='left'><b><?print $row[config]?></td>
<tr><td>Unit Price </td><td align='right'><?print putComa($row[unit])?></td>
<tr><td>Qty</td><td align='right'><?print $row[qty]?></td>
<tr><td>Gross Value</td><td align='right'><?print putComa($row[unit]*$row[qty])?></td>
<tr><td>Disc / unit</td><td align='right'><?print putComa($row[disc])?></td>
<?if($tcsamt>0){?>
<tr><td><b>Total Inclusive of TCS & GST</td><td align='right'><?print putComa(($row[unit]*$row[qty])-($row[disc]*$row[qty]))?></td>
<?}else{?>
<tr><td><b>Total Inclusive of GST</td><td align='right'><?print putComa(($row[unit]*$row[qty])-($row[disc]*$row[qty]))?></td>
<?}

/*
<tr><td>Basic Price</td><td align='right'><?print putComa($row[amt2])?></td>
<tr><td>Tax Collected at Source (TCS) @1%</TD><td align='right'><?print putComa($tcsamt) ?></td>
<tr><td>CGST Amt (<?print $cgstper.'%'?>)</td><td align='right'><?print putComa($cgstamt)?></td>
<tr><td>SGST Amt (<?print $cgstper.'%'?>)</td><td align='right'><?print putComa($cgstamt)?></td>
<tr><td><b>T O T A L </td><td align='right'><b><?print putComa($netamount)?></td></tr>
*/
?>
</table>


<?$gtot=($row[unit]*$row[qty])-($row[disc]*$row[qty])+$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></td><td></td><td width=160></td></tr>
<tr><td>Tyre size :</td><td><b><? print $row[tyre] ?></b></td><td>Tax,Registration.permit <br> and Other expenses :</td><td><b><? print $row[regis_permit_amt] ?></b></td><td></td><td></td><td><b><font size='3'><b>Total :<? print $gtot ?></font></td></tr>
</table>
<table  width=100% cellspacing=4 border=0>
<tr><td width=100 valign=top>&nbsp;&nbsp;Remarks :</td><td><b><? print $row[remark] ?></b></td></tr>
<tr><td width=100 valign=top>&nbsp;&nbsp;Warranty :</td><td><? print $row[warranty] ?></td></tr>
<tr><td width=50 valign=top>&nbsp;&nbsp;&nbsp;Note :</td><td>
<?
$brname=explode(',',$branch);
?>
 
 <?
if($brcode=='Aut141')
{

print"<font size=1>1. The Full payment in advance by Electronic transfer to our </font><b><u> Bank A/c no.30440302994 </u>of SBI,SSI Branch Ernakulam<b> (IFSC Code.SBIN0005387)</b> <font size=1>or crossed Bank draft in favour of</font> <font size=1> <?print $brname[0]?>,</font><b><u> A/c No. 30440302994</u></b> payable at Ernakulam.";
}
else
{


print"<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,SSI Branch Ernakulam<b> (IFSC Code.SBIN0005387)</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 Ernakulam.";
  }
?>
</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>

