<?php
if($xls == 1 ) {

header("Content-Disposition: attachment; filename=\"branch_po_credit.xls\"");
header("Content-Type: application/vnd.ms-excel");	

}
$this->load->view('includes/header.php');

			/* 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>
<?php
echo '<font class="title">'.$menu_path.'</font>';
?>
<br />
<?php
if($xls == 0 ) {
	?>
<input type="button" class="no-print" value="Print this Page" onclick="window.print();">
<form name="form1" method="post" action="<?php echo $form_action ?>">
  
</form>
<?php } ?>

<table width="91%" border="1">
  <tr>
    <th width="3%">No.</th>
    <th width="7%">ID SAP</th>
    <th width="27%">Cabang</th>
    <th width="27%">Vendor</th>
  </tr>
 <?php 
$no = 0;
$bg = 0;
$total_all = 0;
$total_vol = 0; 
foreach ($po as $row)
{ 
$tot_po = round((($row->quantity * $row->net_price) - $row->disc) + $row->tax);
if($bg==0)
											   {
											   echo '<tr style=background-color:#eeeeee;>';
											   $bg++;
											   }
											else
												{
												echo '<tr style=background-color:#;>';
												$bg--;
												}	
?>
    <td><?php echo ++$no; ?></td>
    <td><?php echo $row->ebeln; ?></td>
    <td><?php echo $row->cabname; ?></td>
    <td><?php echo $row->vendor_name; ?></td>
  </tr>
<?php
$total_all = $total  + $total_all ;
$total_vol = $total_vol  + $vol ;
}
?>
  <tr>
    <td bgcolor="#FFFF66">&nbsp;</td>
    <td bgcolor="#FFFF66">&nbsp;</td>
    <td bgcolor="#FFFF66">&nbsp;</td>
     <td bgcolor="#FFFF66">&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');
	?>
