<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Supplier Statement List From <?php echo date(element('dtFormat', $this->session->userdata('logged_in')),strtotime($dateFrom)).' To '.date(element('dtFormat', $this->session->userdata('logged_in')),strtotime($dateTo)) ?></title>
<link rel="stylesheet" href="<?php echo base_url()?>css/stylesheets.css" type="text/css" />
<style media="print" type="text/css">
	/*body{FONT-SIZE: 14px;FONT-FAMILY: Arial;COLOR: #000000}*/
	.printButton { display: none; }
</style>
<script language="javascript" type="text/javascript">	
function do_print(){
	window.print();
}
</script>
</head>
<div class="printButton" align="center">
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
    <tr>
        <td align="center" colspan="2">
        	<?php 
			$js = 'onClick="do_print()" class="btn btn-primary Print" title="Print"';
			echo form_button('Print','<span class="i-printer">',$js);?>&nbsp;&nbsp; <?php
			$js = 'onClick="do_printexcel()" class="btn btn-primary EXCEL" title="Download"';
			echo form_button('EXCEL','<span class="i-download">',$js);?>&nbsp;&nbsp; <?php
			$js = 'onClick="javascript:window.close();" class="btn btn-warning Close" title="Close"';
			echo form_button('Close','<span class="i-switch">',$js);?>
        </td>
    </tr>
</table>
</div>
<div>
	<table border="1" cellpadding="1" cellspacing="0" width="100%">
		<thead>
		<tr>
			<th style="display:none"></th>
            <th>#</th>
            <th class="tal">&nbsp;<?php echo $this->lang->line('formNo') ?></th>
            <th class="tal">&nbsp;<?php echo $this->lang->line('supplierName') ?></th>
            <th class="tal">&nbsp;<?php echo $this->lang->line('suppliercode') ?></th>
            <th><?php echo $this->lang->line('transDate') ?></th>
            <th class="tal">&nbsp;<?php echo $this->lang->line('refNo') ?></th>
            <th class="tar"><?php echo $this->lang->line('debit') ?>&nbsp;</th>
            <th class="tar"><?php echo $this->lang->line('credit') ?>&nbsp;</th>             
		</tr>
		</thead>
		<tbody>
	<?php $bil = 0; 
				if($datatbls){
				foreach($datatbls as $datatbl):
				$bil++?>
            	<tr>
                	<td style="display:none" ><?php echo $datatbl->ID; ?></td>
                	<td class="tac"><?php echo $bil; ?></td>
                    <td>&nbsp;<?php echo $datatbl->formNo.'['.$this->FormSetup_model->getFormSerialNo_zeroLeading($datatbl->ID).']'; ?></td>
                	<td>&nbsp;<?php echo $datatbl->supplierName; ?></td>
                    <td>&nbsp;<?php echo $datatbl->supplierCode; ?></td>
                    <td class="tac"><?php echo date(element('dtFormat', $this->session->userdata('logged_in')),strtotime($datatbl->transDate)); ?></td>
                    <td>&nbsp;<?php echo $datatbl->refNo; ?></td>
                    <td class="tar"><?php echo number_format($datatbl->dr, 2, ".", ","); ?>&nbsp;</td>
                    <td class="tar"><?php echo number_format($datatbl->cr, 2, ".", ","); ?>&nbsp;</td>
                </tr>
            <?php endforeach; }?>
		</tbody>
	</table>                                         
</div>
<div style="page-break-after:always"></div>
</html>
