<html>
<head>
<title>Stock Current</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: 10px;
}
h1 {
font-size: 10px;
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{
    float: right;
  border-bottom: 1px solid black;
  border-top: 1px solid black;
    border-left: 1px solid black;
    border-right: 1px solid black;
      vertical-align: middle;
   }
table.pagehead td.rborder{
    border-bottom: 1px solid black;
  border-top: 1px solid black;
  border-right: 1px solid black;
  border-left: solid 1px #000;
  vertical-align: baseline;
  }
  table.footer{
      width:100%;
      margin:0px 0px 0px 0px;
}
.phead{
    width:200px;
    height:100px;
    float: right;
}


</style>
<style type='text/css'>
td{font-family:Arial; color:black; font-size:7pt;}
</style>
</head>
<body><div align="center">
     <img src="images/shared/printimage.jpg"  align="middle" alt="Posics Technologies" width="" height="" /><br>
     <?php echo $companyinfo[0]->ADDRESS1.', '.$companyinfo[0]->ADDRESS2.', '.$companyinfo[0]->CITY; ?><br>
        <?php echo $companyinfo[0]->REGION.','.$companyinfo[0]->PHONE1;?>
     <h5 align="center" ><u><big>Stock Current</big></u></h5>
    </div><br>

        <table class="pagehead">
<tbody>
<tr>
<!--    <td width="70%"  class="bborder">

            </td>-->
<!--    <td width="30%" align="right" class="bborder">-->
<!--        <h1>Warehouse</h1><br>-->
              <p align="right"> Printed On: <?php echo date('d-m-Y', time()); ?><br></p>
               <br>
<!--        </td>-->
        </tr>

</tbody>
</table>
<!--        </div>-->
<?php
echo "<table class='pagehead' cellpadding='0px'>";
//echo "<hr width='100%'>";
echo "<tbody>";
echo "<thead>
         <tr>
    <th width='20%' align='left' class='bborder'>Reference</th><th width='15%' align='left' class='bborder'>Material</th><th width='15%' align='center' class='bborder'>Unit Price</th><th width='15%' align='center' class='bborder'>Line Total</th><th width='5%' align='center' class='bborder'>Stock</th><th width='5%' align='center' class='bborder'>Minimum</th><th width='5%' align='center' class='bborder'>Maximum</th></tr></thead>";


foreach ($cilines as $value) {

//$qtysts=($value->QOH+$value->POQTY)-$value->RQTY;
$totallines=$totallines+1;
$product = $value->PRODUCT;
//if($product2=="")
//{
//    $product2=$product;
//}
//if($product!=$product2)
//{
////     echo " <tr>
////<td align='center' colspan='9'>_____________________________________________________________________________________________</td>
////          </tr>";
//     echo "
//  <tr>
//<td align='center'></td>
//<td  align='left'><b><font size='2'>Total</font></b></td>
//<td align='center'></td>
//<td  align='left'><b><font size='2'>".$product2."</font></b></td>
//        <td  align='center'><b><font size='2'>".$rqty."</font></b></td>
//        <td  align='center'><b><font size='2'>".$qoh."</font></b></td>
//           <td  align='left'><b><font size='2'>".$value->UOM."</font></b></td>
//
//          </tr>
//          ";
//
//// echo " <tr>
////<td align='center' colspan='9'>===============================================================================</td>
////          </tr>";
//}
//$gtotal=$gtotal+$value->TOTAL;
//$LINETOTAL=$LINETOTAL+$value->TOTAL;
//$rqty=$rqty+$value->APPROVEDQUANTITY;
//$qoh=$value->QOH;
//$poqty=$value->POQTY;
//$qtysts=($qoh+$poqty)-$rqty;

    echo "
  <tr>
<td align='center'>".$value->REFERENCE."</td>
    <td  align='left'>".$value->PRODUCT."</td>
<td  align='left'>".$value->UNITPRICE."</td>
<td  align='left'>".$value->LINETOTAL."</td>
        <td  align='center'>$value->UNITS $value->UOM</td>
        <td  align='center'>".$value->STOCKSECURITY."</td>
           <td  align='left'>".$value->STOCKMAXIMUM."</td>
               
          </tr>
          ";
//alert($REQUIREDON.value);
//$LINETOTAL = $LINETOTAL+($value->QUANTITY * ($value->UNITPRICE + $value->TAXAMOUNT));
//$qtysts=0;

}
// echo "
//  <tr>
//<td align='center'></td>
//
//<td  align='left'><b><font size='2'>Total</font></b></td>
//<td  align='left'><b><font size='2'></font></b></td>
//<td  align='left'><b><font size='2'>".$product2."</font></b></td>
//        <td  align='center'><b><font size='2'>".$rqty."</font></b></td>
//        <td  align='center'><b><font size='2'>".$qoh."</font></b></td>
//           <td  align='left'><b><font size='2'>".$value->UOM."</font></b></td>
//          </tr>
//          ";
     echo " <tr>
<td align='center' colspan='9'>_________________________________________________________________________________________________________________________________________</td>
          </tr>";
  echo "
  <tr>
<td align='center'></td>

<td  align='left'><b><font size='3'>GrandTotal</font></b></td>
<td  align='left'></td>
        <td  align='center'><b></b></td>
        <td  align='center'><b></b></td>
           <td  align='left'><b></b></td>
                <td  align='left'><b></b></td>
                    
          </tr>
          ";






while($totallines<24)
{
    $totallines=$totallines+1;

    echo "
          <tr>
 <td>&nbsp;</td>
 <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
   
           </tr>
          ";
    }
    ?>
<!--<td class="bborder" width="25%" align="right">-->

  <?php
  echo
"<tr>
    <td></td>
        <td></td>
        <td></td>
       <td></td>
        <td></td>
      <td></td>
      <td></td>
     
        </tr></table>";?>

<br>

 <table class="footer" width="100%">
    <tr>
                <br><br><br><br>
    <td width="50%">&nbsp;</td>
    <td width="40%">&nbsp;</td>
    <td width="10%">&nbsp;</td>
      </tr>
    <tr>
<!--       <td width='50%' valign="bottom" align="left">Authorised By</td><td width='40%' align="center" valign="bottom">Accounts Manager</td><td width='20%' align="right" valign="bottom">HOD Purchase</td>-->
    </tr>
    </table>
</body>
</html>