<?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="573" 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="107">STATUS</th>
    <th width="145">AMOUNT</th>
  </tr>
  <?php 
$total = 0;
$bg = 0;
foreach ($pcop_bal as $pcop_bals)
{ 
											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($pcop_bals->postdate)) ; ?></td>
    <td><?php echo $pcop_bals->addby; ?></td>
    <td><?php echo $pcop_bals->ref; ?></td>
    <td align="center"><?php if($pcop_bals->status==1)
	{
		echo '<strong><font color="#FF0000">Cancel</font></strong>';
	}
	else
	{
		echo '<strong>-</strong>';
	}
	?></td>
    <td align="right"><?php 
	if($this->session->userdata('uid')=='sugeng')
	{
		echo number_format($pcop_bals->amount);
	}
	else
	{
		echo $this->fungsi->format_idr($pcop_bals->amount);
	}
			
	
	 ?></td>
  </tr>
  <?php 
$total = $pcop_bals->amount + $total;
}
?>
  <tr>
    <td bgcolor="#FFFF00">&nbsp;</td>
    <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
	
	if($this->session->userdata('uid')=='sugeng')
	{
		echo number_format($total);
	}
	else
	{
		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');
	?>
