<?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="1581" border="1" cellpadding="1" cellspacing="1" bordercolor="#000000">
  <tr>
    <th width="97">POST DATE</th>
    <th width="97">ADD BY</th>
    <th width="97">MIRO NO</th>
    <th width="97">ACC NO</th>
    <th width="97" height="41">PO NO</th>
    <th width="89">VENDOR</th>
    <th width="107">BRANCH</th>
    <th width="107">PRICE/LITER</th>
    <th width="145">TOTAL LITER</th>
    <th width="145">R. DISC</th>
    <th width="145">TOTAL BEFORE PPN</th>
    <th width="145">PPN</th>
    <th width="145">TOTAL AFTER PPN</th>
  </tr>
  <?php 
$total = 0;
$bg = 0;
foreach ($miro as $miros)
{ 
											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($miros->miradddate)); ?></td>
      <td><?php echo $miros->miraddby; ?></td>
      <td><?php echo $miros->miro; ?></td>
      <td><?php echo $this->fungsi_sap->fm_accno_miro($miros->miro.$miros->year); ?></td>
      <td><?php echo $miros->ebeln; ?></td>
    <td><?php echo $miros->vendor; ?></td>
    <td><?php echo $miros->cabname; ?></td>
    <td><?php echo $this->fungsi->format_idr($miros->net_price); ?></td>
    <td align="right"><?php echo number_format($miros->quantity); ?></td>
    <td align="right"><?php echo $this->fungsi->format_idr($miros->disc); ?></td>
    <td align="right"><?php echo $this->fungsi->format_idr(($miros->net_price*$miros->quantity) - $miros->disc); ?></td>
    <td align="right"><?php echo $this->fungsi->format_idr($miros->tax); ?></td>
    <td align="right"><?php echo $this->fungsi->format_idr( (($miros->net_price*$miros->quantity) - $miros->disc) + $miros->tax); ?></td>
  </tr>
  <?php 
$total = (($miros->net_price*$miros->quantity) - $miros->disc) + $miros->tax + $total;
}
?>
  <tr>
    <td bgcolor="#FFFF00">&nbsp;</td>
    <td bgcolor="#FFFF00">&nbsp;</td>
    <td bgcolor="#FFFF00">&nbsp;</td>
    <td bgcolor="#FFFF00">&nbsp;</td>
    <td bgcolor="#FFFF00">&nbsp;</td>
    <td bgcolor="#FFFF00">&nbsp;</td>
    <td bgcolor="#FFFF00">&nbsp;</td>
    <td align="right" bgcolor="#FFFF00">&nbsp;</td>
    <td align="right" bgcolor="#FFFF00">&nbsp;</td>
    <td align="right" bgcolor="#FFFF00">&nbsp;</td>
    <td align="right" bgcolor="#FFFF00">&nbsp;</td>
    <td align="right" bgcolor="#FFFF00"><strong>Total :</strong></td>
    <td align="right" bgcolor="#FFFF00"><strong><?php echo $this->fungsi->format_idr($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');
	?>
