
<style>
body {
font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
font-size: 14px;
}
h1 {
font-size: 20px;
vertical-align: top;
}

table.pagehead {
  width: 100%;

}

table.pagebody {
  width: 100%;

}

table.pagebody td, table.pagebody th
{
  border:1px solid #000;
}

</style>

</head>
<body>
<div align="center"><img src="<?php echo base_url() ?>assets/img/shared/printimage.jpg"  align="center" valign="top" alt="Posics Technologies" width="220" height="60"/><br>
             <?php echo $companyinfo->COMPANYNAME.', '.$companyinfo->ADDRESS1.', '; ?><br>
               <?php echo $companyinfo->ADDRESS2.', '.$companyinfo->CITY.', '.$companyinfo->REGION ; ?>
                    <br>
                    Phone: <?php echo $companyinfo->PHONE1.', '.$companyinfo->PHONE2.', Fax: '.$companyinfo->FAX ?>
                    <br>
                     Email: <?php echo $companyinfo->EMAIL.', Web: '.$companyinfo->WEBSITE?>
<h3><u><big>Tariff sales</big></u></h3></div>
<table class="pagehead" cellspacing="0">
<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='pagebody' cellspacing='0' cellpadding='5'>";
echo "<tbody>";
echo "<thead><tr>
<th width='50%' align='center' class='bborder'>Tariff</th><th width='25%' align='center' class='bborder'>Date</th><th width='25%' align='center' class='bborder'>Total</th></tr></thead>";
$totallines=0;
 $LINETOTAL=0;
if($tariffsales != null){
foreach ($tariffsales as $item) {
    $totallines=$totallines+1;
echo "
<tr>
    <td class='rborder' align='left'>".$item['TARIFF']."</td>
<td class='rborder' align='left'>".$item['DATESTART']."</td>
<td class='rborder' align='right'>".  $this->formatslist->formatCurrencywithHash($item['TOTAL'])."</td>
  </tr>";

$LINETOTAL = $LINETOTAL+($item['TOTAL']);

}}

echo "<tr>
    <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>
    <?php
    echo "<table  align='right'>";
echo "<tbody>";
echo "<tr>

         <td><b>Grand Total:".$this->formatslist->formatCurrencywithHash($LINETOTAL)."</b></td>
    </tr>";
  echo "</tbody>";
echo "</table>";
?>

