<? 
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=400 align=right> </td><td><font size='3'><b>&nbsp;&nbsp;&nbsp;&nbsp; <?print $invno?></b></font></td><td align=center width=840></td><td><?print datetohtml($row[invdate])?></td><TD width=160></TD>
</table>
</center>

<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
To: <br>
<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;Hypothicated to : <?print $row[fin]?>
</blockquote>
<TABLE align = center CELLSPACING=1 CELLPADDING=1 BGCOLOR=BLACK width=85% border=1>
<tr align=center><td>SL<br>No.</td><td>Description </td><td>HSN Code </td>
<td>Unit Price </td><td>Qty</td><td>Disc</td><td>Gross Value</td><td>Net Value</td>
<td>SGST %</td><td>SGST Amt</td>
<td>CGST %</td><td>CGST Amt</td>
<td>Grand Total</td></tr>
<?
$sgstp=$row[taxp]/2;
$cgstp=$row[taxp]/2;
$sgstamt=$row[tax]/2;
$cgstamt=$row[tax]/2;

?>
<tr valign=top><td>1</td><td><?print $row[config]?></td><td>&nbsp;</td>
<td align=right><?print $row[unit]?></td><td align=right><?print $row[qty]?></td>
<td><?print $row[disc]?></td><td align=right><?print $row[netamt]?></td>
<td align=right><?print $row[amt2]?></td><td align=right><?print $sgstp?></td><td align=right><?print $sgstamt?></td>
<td align=right><?print $cgstp?></td><td align=right><?print $cgstamt?></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><?print $row[disc]?></td><td align=right><?print $row[netamt]?></td><td align=right><?print $row[amt2]?>
<td align=right><?print $sgstp?></td>
<td align=right><?print $sgstamt?></td>
<td align=right><?print $cgstp ?></td>
<td align=right><?print $cgstamt ?></td>

<td align=right><font size=3><?print $row[netamt]?></td>
<?
$tcsamt=$row[netamt]*$row[tcs]/100;
$tcsamt=number_format($tcsamt, 2, '.', '');

$netamount=$row[netamt]+$tcsamt;
$netamount1=round($netamount,0);
$netamount2=number_format($netamount1, 2, '.', '');

if($tcsamt>0)
{
?>

<tr><td>&nbsp;</td><td colspan=10 align=center>Tax Collected at Source (TCS) @1%</TD>
<td align=right><?print $tcsamt ?></td><td align=right><font size=3><?print $netamount2 ?></td>
</tr>

<?
}
?>

</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></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>
</tr>
</table>
-->
<br>
<?
$brname=explode(',',$branch);
?>
<?
if($brcode=='Aut141'|| $brcode=='AUT009')
{
print "
<table width=95%  cellspacing=5 border=0>";

if($brcode=='Aut141')
print "<tr><td width=55  valign=top>&nbsp;&nbsp;&nbsp;&nbsp;Remarks:</td><td>$row[20]</td></tr>";

{
print "<tr><td></td><td><font size=2> Please mail Delivery Order (DO) to amplcalicut@gmail.com</font></td></tr>";
}


print "<tr><td width=55  valign=top>&nbsp;&nbsp;&nbsp;&nbsp;Note :</td><td>


 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,SSI Branch,Ernakulam</font><b> (IFSC Code.SBIN0005387)</b> or crossed Bank draft in favour of <font size=3>";  print $brname[0]; print",<b><u> A/c No.";
if($brcode=='Aut141')
 print "30440302994 ";
else if($brcode=='AUT009')
  print "31619302636 ";

 print"</u></b></font> payable at ";

if($brcode=='Aut141')
 print "CALICUT";
else if($brcode=='AUT009')
  print "MANGALORE";
else
  print "COCHIN";

print "</td></tr>

<tr><td></td><td><font size=2>2. Prices prevailing at the date of delivery will be applicable.</font></td></tr>

<tr><td></td><td>3. Delivery in 2 weeks of receiving the full payment. For Built ups & non standard configuration, delivery in 4 to 8 weeks of receiving the full payment.</td></tr>

<tr><td></td><td><font size=2>4. Arranging finance for new vehicle will be the sole responsibility of the customer.</font></td></tr>
<tr><td></td><td><font size=2>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=2>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=2>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=2>8. Price allowed for exchanging old vehicle will be valid only if customer takes delivery of new vehicle from AMPL.</font></td></tr>
<tr><td></td><td><font size=2>9. 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>
<tr><td></td><td><font size=2>10. Subject to Force Majeure clause.&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</font><font size=2><b> For PSN AUTOMOTIVE MARKETING P LTD</b></FONT></td></tr>
<tr><td></td><td><font size=2>11.Vehicle once sold will not be taken back. </font></td></tr>

<tr><td></td><td>12. Subject to jurisdiction of Courts at :";

if($brcode=='Aut141')
 print "CALICUT";
else if($brcode=='AUT009')
  print "MANGALORE";
else
  print "COCHIN";
print "<script></table></script>";

}

else if($brcode=='AUT103')
{
print "
<table width=95%  cellspacing=5 border=0>
<tr><td width=55  valign=top>&nbsp;&nbsp;&nbsp;&nbsp;Note :</td><td>
 1. The Full payment in advance by Electronic transfer to our <font size=3><b><u> Bank A/c no.31150550268</u></b> of SBI,RICHMOND ROAD, BANGALORE</font><b> (IFSC Code.SBIN0011352)</b> or crossed Bank draft in favour of <font size=3>";  print $brname[0]; print",<b><u> A/c No.31150550268";


 print"</u></b></font> payable at BANGALORE.";



print "</td></tr>

<tr><td></td><td><font size=2>2. Prices prevailing at the date of delivery will be applicable.</font></td></tr>

<tr><td></td><td>3. 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><font size=2>4. Arranging finance for new vehicle will be the sole responsibility of the customer.</font></td></tr>
<tr><td></td><td><font size=2>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=2>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=2>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=2>8. Price allowed for exchanging old vehicle will be valid only if customer takes delivery of new vehicle from AMPL.</font></td></tr>
<tr><td></td><td><font size=2>9. 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>
<tr><td></td><td><font size=2>10. Subject to Force Majeure clause.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</font><font size=2><b> For PSN AUTOMOTIVE MARKETING P LTD</b></FONT></td></tr>
<tr><td></td><td><font size=2>11.Vehicle once sold will not be taken back. </font></td></tr>

<tr><td></td><td>12. Subject to jurisdiction of Courts at : BANGALORE";


print "<script></table></script>";

}


else
{

print"<table  width=100% cellspacing=5 border=0>
<tr><td width=70 valign=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Note :</td><td>

 <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,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];print",</font><b><u> A/c No. 30440302994</u></b> payable at ";
if($brcode=='Aut141')
 print "CALICUT";
else if($brcode=='AUT009')
  print "MANGALORE";
else
  print "COCHIN";

print"</td></tr>
<tr><td></td><td><font size=1>2. Advance payment by Demand Draft in favour of PSN AUTOMOBILES (P) LTD payable at Ernakulam.</font></td></tr>
<tr><td></td><td><font size=1>3. Balance payable by Demand Draft in favour of PSN AUTOMOBILES (P) LTD payable at Ernakulam.</font></td></tr>
<tr><td></td><td><font size=1>4. The prices indicated above are inclusive of K VAT as applicable.</font></td></tr>
<tr><td></td><td><font size=1>5. Prices prevailing at the date of delivery will be applicable.</font></td></tr>
<tr><td></td><td><font size=1>6. The delivery of the vehicle will be normally effected with in two weeks from the date of confirmed booking, at our showroom at Ernakulam and will be subject to availability, and receipt of full payment.</font></td></tr>
<tr><td></td><td><font size=1>7. Arranging finance for new vehicle will be the sole responsibility of the customer.</font></td></tr>
<tr><td></td><td><font size=1>8. 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>9. 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>10. 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>11. 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>12. Vehicle once sold will not be taken back.</font></td></tr>
<tr><td></td><td><font size=1>13. Subject to Force Majeure clause</font></td></tr>
<tr><td></td><td><font size=1>14. Subject to jurisdiction of Courts at Ernakulam.</font></td></tr>
<tr><td></td><td><font size=1>15. 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>
<tr><td></td><td><font size=1>16. Jurisdiction :</font>";

if($brcode=='Aut141')
 print "CALICUT";
else if($brcode=='AUT009')
  print "MANGALORE";
else
  print "COCHIN";




print"</table>




<br><br><br>

<BR>&nbsp;";
}
?>


