<?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();">
<table width="1263" border="1" cellpadding="1" cellspacing="1" bordercolor="#000000">
  <tr>
    <th width="145" height="41">ACC. DOC. NO</th>
    <th width="97">POST DATE</th>
    <th width="89">POST BY</th>
    <th width="107">TRANSFER TO</th>
    <th width="107">NO. CPV</th>
    <th width="122">NO. CPDU</th>
    <th width="145">AMOUNT</th>
    <th width="132">P.CASH TYPE</th>
    <th width="143">TRANS. TYPE</th>
    <th width="336">DESC</th>
  </tr>
<?php 
$total = 0;
foreach ($cpv_data as $cpv_datas)
{ 

if($bg==0)
											   {
											   echo '<tr style=background-color:#eeeeee;>';
											   $bg++;
											   }
											else
												{
												echo '<tr style=background-color:#;>';
												$bg--;
												}		


?>  
    <td><?php echo $cpv_datas->accglno; ?></td>
    <td><?php echo  date("d.m.Y", strtotime($cpv_datas->accglpostdate)) ; ?></td>
    <td><?php echo $cpv_datas->accglpostby; ?></td>
    <td><?php echo $cpv_datas->cabname; ?></td>
    <td><?php echo $cpv_datas->nocpvform; ?></td>
    <td><?php echo $cpv_datas->nocpdu; ?></td>
    <td align="right"><?php 
	if($this->session->userdata('uid')=='sugeng')
	{
		echo number_format($cpv_datas->amount_trf);
	}
	else
	{
	echo $this->fungsi->format_idr($cpv_datas->amount_trf); 
	}
	?></td>
    <td><?php echo $cpv_datas->desc2; ?></td>
    <td><?php echo $cpv_datas->desc3; ?></td>
    <td><?php echo $cpv_datas->desc; ?></td>
  </tr>
<?php 
$total = $cpv_datas->amount_trf + $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 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>
    <td bgcolor="#FFFF00">&nbsp;</td>
    <td bgcolor="#FFFF00">&nbsp;</td>
    <td bgcolor="#FFFF00">&nbsp;</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');
	?>
