<html>
<head>
<title>Dead Stock</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style>
body {
    font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
font-size: 14px;
}
h1 {
font-size: 20px;
vertical-align: top;
}

table{
      border-collapse: collapse;
}
table.pagehead {
  width: 100%;

}

table.pagehead td.bborder, th.bborder{

  border-bottom: 1px solid black;
   vertical-align: baseline;
}

table.pagehead th.bborder{
  border-bottom: 1px solid black;
  border-right: 1px solid black;
  border-left: 1px solid black;
  vertical-align: baseline;

  }

table.pagehead td.rborder{
  border-right: 1px solid black;
  border-left: 1px solid black;
  vertical-align: middle;
  width:100%;
  }


</style>

</head>
<body>
  <div align="center"><img src="images/shared/M-Grill-new123.jpg"  align="center" valign="top" alt="Posics Technologies" width="220" height="60"/><br>
             <?php echo $companyinfo[0]->COMPANYNAME.', '.$companyinfo[0]->ADDRESS1.', '; ?><br>
               <?php echo $companyinfo[0]->ADDRESS2.', '.$companyinfo[0]->CITY.', '.$companyinfo[0]->REGION ; ?>
                    <br>
                    Phone: <?php echo $companyinfo[0]->PHONE1.', '.$companyinfo[0]->PHONE2.', Fax: '.$companyinfo[0]->FAX ?>
                    <br>
                     Email: <?php echo $companyinfo[0]->EMAIL.', Web: '.$companyinfo[0]->WEBSITE?>
<h3><u><big>Dead Stock</big></u></h3>
</div>
<table class="pagehead">
<tbody>
  <tr>
<!--    <td width="70%"  class="bborder">
                <img src="http://localhost/app2/images/shared/printlogo.jpg" alt="Posics Technologies" width="75" height="50" /><br>
                <h3><?php echo $companyinfo[0]->COMPANYNAME; ?></h3>
                <?php echo $companyinfo[0]->ADDRESS1.', '.$companyinfo[0]->ADDRESS2.', '.$companyinfo[0]->CITY.', '.$companyinfo[0]->REGION ; ?>
                    <br>
                    Phone: <?php echo $companyinfo[0]->PHONE1.', '.$companyinfo[0]->PHONE2.', Fax: '.$companyinfo[0]->FAX ?>
                    <br>
                    Email: <?php echo $companyinfo[0]->EMAIL.', Web: '.$companyinfo[0]->WEBSITE?>


            </td>-->
    <td width="30%" align="right" class="bborder">
                     Date: <?php echo date('d-m-Y', time()); ?><br>
               <br>
        </td>

</tr>
</tbody>
</table>

<?php
echo "<table class='pagehead' cellpadding='5'>";
echo "<tbody>";
echo "<thead><tr>
    <th width='15%' align='left' class='bborder'>Reference</th><th width='20%' align='center' class='bborder'>Product</th><th width='15%' align='center' class='bborder'>Units</th><th width='20%' align='center' class='bborder'>Date</th></tr></thead>";
$totallines=0;
$LINETOTAL=0;
$LINETOTAL1=0;
foreach ($deadstocklines as $value) {
$totallines=$totallines+1;
echo "
<tr>
<td class='rborder' align='left'>".$value->REFERENCE."</td>
    <td class='rborder' align='left'>".$value->PRODUCT."</td>
 <td class='rborder' align='left'>".$value->UNITS."</td>
     <td class='rborder' align='center'>".$value->DATENEW."</td>
 </tr>";
//$LINETOTAL = $LINETOTAL+($value->TOTAL);
//$LINETOTAL1 = $LINETOTAL1+($value->UNITS);
}
while($totallines<30)
{
       $totallines=$totallines+1;
    echo "<tr>
    <td class='rborder'>&nbsp;</td>
    <td class='rborder'>&nbsp;</td>
    <td class='rborder'>&nbsp;</td>
       <td class='rborder'>&nbsp;</td>
       </tr>";
}
echo "<tr>
      <td class='bborder'></td>
    <td class='bborder'></td>
    <td class='bborder'></td>
     <td class='bborder'></td>
        </tr>";

echo "</tbody>";
echo "</table>";
?>
    <br><br>
    <table class="pagehead" width="60%">
    <tr>
    <td width="20%">&nbsp;</td>
    <td width="20%">&nbsp;</td>
    <td width="20%">&nbsp;</td>
    </tr>
    <tr>
       <?php
    echo "<table align='right'>";
echo "<tbody>";
echo "
     <tr>
    </tr> ";
  echo "</tbody>";
echo "</table>";
?>
    </table>
</body>

</html>