<html>
<head>
<title>Cash by User</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/printimage.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>Cash by user</big></u></h3>
</div>
<table class="pagehead">
<tbody>
<tr>
        <td width="30%" align="right" class="bborder">
        <h1></h1><br>
               Date: <?php echo date('d-m-Y', time()); ?><br>
               <br>
        </td>

</tr>

</tbody>
</table>

<?php
echo "<table class='pagehead'>";
echo "<tbody>";
echo "<thead><tr>
    <th width='25%' align='left' class='bborder'>User</th><th width='25%' align='center' class='bborder'>Start date</th><th width='25%' align='center' class='bborder'>End date</th><th width='25%' align='center' class='bborder'>Cash</th></tr></thead>";
$totallines=0;
foreach ($cashlines as $value) {
$totallines=$totallines+1;
echo "
<tr>
<td class='rborder' align='left'>".$value->USER."</td>
<td class='rborder' align='center'>".$value->DATESTART."</td>
<td class='rborder' align='center'>".$value->DATEEND."</td>
<td class='rborder' align='center'>".$value->SUM."</td>
 </tr>";
//$LINETOTAL = $LINETOTAL+($value->QUANTITY * ($value->UNITPRICE + $value->TAXAMOUNT));
}
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="100%">
    <tr>
    <td width="50%">&nbsp;</td>
    <td width="40%">&nbsp;</td>
    <td width="10%">&nbsp;</td>
    </tr>
<!--    <tr>
        <td></td>
    <td class="bborder"></td><td class="bborder">&nbsp;</td>
    </tr>-->
<!--    <tr>
        <td></td>
    <td>Authorised By</td><td>Date</td>
    </tr>-->
    </table>
</body>
</html>