<? 
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");
$det=mysqli_query($db,"select * from branch where brcode='$brcode'");
$detrow=mysqli_fetch_array($det);
?>
<style>
td,body{font-family:arial;background-color:white;font-size:12; letter-spacing:1}
</style>

<table width=100%>
<tr><td>TIN : <?print $detrow[tin]?></td><td align=right>CST Reg. No. : <?print $detrow[cstno]?></td></tr>
<tr><td colspan=2 align=center><span><font size=3><b><?print $branch?></b></font></span>
<br><B>PSN CONSTRUCTION EQUIPMENTS P LTD</B><BR>
Regd.Off. 35/189, NH 47, PALARIVATTOM, KOCHIN, PIN.682 025<BR>
<?Print $detrow[braddr].'<br>'.$detrow[brcity].',Phone:'.$detrow[brphone]?>
</td></tr>
<tr><td colspan=2 align=center><BR><span><font size=4><b><U>DELIVERY ORDER</U></B></SPAN></td></tr>
</table>

<?
print "<font size=3<b>No.".$invno."</font></b><br>";
$re=mysqli_query($db,"select * from veh_transout where invno='$invno' and brcode='$brcode'");
if(mysqli_num_rows($re)>0)
{
 $row=mysqli_fetch_array($re);
print  "Date : ".datetohtml($row[invdate]);

  $brres1=mysqli_query($db,"select * from branch where brcode='$row[ledger]'")or die(mysqli_error());
  $brres=mysqli_fetch_array($brres1);
  print "<br>&nbsp;<br>&nbsp;To <blockquote>";
  print "$brres[brname]<br>$brres[addr1]<br>$brres[addr2]<br>$brres[city]- $brres[pin] <br>";
  print "TIN : $brres[tin]<br>";
}
else
{
 print "<script> alert('Invoice NO does not exist'); </script>";
 return;
}
?>
<p>&nbsp;</p>
<table border=1 bgcolor=black width=100%>
<tr bgcolor=white align=center height=25><td>SL No </td><td>Description </td><td>Item Code </td><td>Unit Price </td> <td>Qty </td><td>Gross Value </td></td>

<tr bgcolor=white align=center height=25><td>1 </td><td><?print $row[config]?> </td><td>&nbsp; </td> <td><?print $row[amt2]?> </td> <td>1 </td><td><?print $row[amt2]?></td></td></tr>

<tr bgcolor=white align=center height=25><td>&nbsp; </td><td>&nbsp; </td><td>&nbsp; </td> <td>&nbsp; </td> <td>&nbsp; </td><td>&nbsp;</td></td></tr>

<tr bgcolor=white align=center height=25><td>&nbsp; </td><td><b>G R A N D &nbsp; T O T A L </td><td>&nbsp; </td> <td>&nbsp; </td> <td>&nbsp; </td><td><b><?print $row[amt2]?></td></td></tr>
</table>
<br>
<?print word($row[amt2]);?>
<br><br>
<table>
<tr><td>MSNO</td><td>: <?print $row[da]?></td></tr>
<tr><td>ENGINE NO</td><td>: <?print $row[engno]?></td></tr>
</table>
<?
$brr=explode(',',$branch);
?>
<p align=right>for PSN CONSTRUCTION EQUIPMENT PVT LTD.

<br><br><br><br>
Authorised Signatory
</p>

