<?php
$this->load->view('includes/header.php');
echo '<font class="title">'.$menu_path.'</font>';
echo '<br>';
echo '<br>';
			/* Display system message */
			$this->fungsi->disp_sys_msg();
			echo validation_errors('<p class="field_error">', '</p>');
			
			//foreach ($cpv_pus  as $cpv_puss)
?>
<style type="text/css" media="print">
.no-print		{ display:none; }
</style>
<script language="Javascript1.2">
  <!--
  function printpage() {
  window.print();
  }
  //-->
</script>

<input type="button" class="no-print" value="Print this Page" onclick="window.print();">
<br />
<table width="461" border="1" cellpadding="1" cellspacing="1" bordercolor="#000000">
  <tr>
    <th width="97" height="41">POST DATE</th>
    <th width="89">POST BY</th>
    <th width="107">REFERENCE</th>
    <th width="145">QUANTITY</th>
  </tr>
  <?php 
$total = 0;
$bg = 0;
foreach ($stock_hist as $stock_hists)
{ 
											if($bg==0)
											   {
											   echo '<tr style=background-color:#eeeeee;>';
											   $bg++;
											   }
											else
												{
												echo '<tr style=background-color:#;>';
												$bg--;
												}		
?>
    <td><?php echo  date("d.m.Y", strtotime($stock_hists->postdate)) ; ?></td>
    <td><?php echo $stock_hists->addby; ?></td>
    <td><?php echo $stock_hists->ref; ?></td>
    <td align="right"><?php echo number_format($stock_hists->qty); ?></td>
  </tr>
  <?php 
$total = $stock_hists->qty + $total;
}
?>
<tr>
      <td bgcolor="#FFFF00">&nbsp;</td>
    <td bgcolor="#FFFF00">&nbsp;</td>
      <td align="right" bgcolor="#FFFF00"><strong>Total :</strong></td>
    <td align="right" bgcolor="#FFFF00"><strong><?php echo number_format($total); ?></strong></td>
  </tr>
</table>
<?php
if ( ! empty($link))
	{
		echo '<p id="bottom_link" class="no-print">';
		foreach($link as $links)
		{
			echo $links . ' ';
		}
		echo '</p>';
	}
$this->load->view('includes/footer.php');
	?>
