<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Expense Peyment Cashbon</title>
</head>
<body style="width:auto; margin:auto">

<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
		<td colspan="4" class="s0"><?php echo $this->session->userdata('company_name'); ?></td>
    </tr>
    <tr>
		<td colspan="4" class="s1">List Expense Payment Cashbon</td>
    </tr>
	<tr>
		<td colspan="4" class="s1">&nbsp;</td>
    </tr>
    <tr>
		<td width="20" class="s4">No</td>
		<td width="43" class="s4">Number Payment</td>
		<td width="118" class="s4">Department Name</td>
		<td width="85" class="s4">Employee Name</td>
		<td width="45" class="s4">Amount</td>
    </tr>
  <?php	   
	$expense_payment=json_decode($list);
	$no=0; $total=0;
	foreach($expense_payment as $row){		   
  ?>
	<tr>
	    <td class="s3"><?php echo ++$no; ?></td>
		<td class="s5"><?php echo $row->EPayNumber; ?></td>
		<td class="s3"><span class="s5"><?php echo $row->DepartmentName; ?></span></td>
		<td class="s5"><?php echo $row->EmployeeName; ?></td>
		<td class="s5" align="right"><?php echo number_format($row->amountPayment,"0",",","."); ?><?php $total += $row->amountPayment; ?></td>
    </tr> 
  <?php
	}	   
  ?>
    <tr>
		<td class="s5" align="right" colspan="6">&nbsp;</td>
	</td>
	<tr>
		<td class="s5" align="right" colspan="4"><b>Total</b></td><td class="s5" align="right"><b><?php echo number_format($total,"0",",","."); ?></b></td>
	</td>
</table>
</body>
</html>

