<!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></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>
<table cellpadding="0" cellspacing="0" width="100%" id="test" class="editable" border="0">
	<tr>
    	<td class="tac"><strong><?php echo $this->lang->line('title') ?></strong></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
	</tr>
    <tr>
    	<td width="20%" class="tar"><strong><?php echo form_label($this->lang->line('jlnumber'),'journal_number');?></td>
        <td width="5%" class="tac">:</td>
        <td width="20%">&nbsp;<?php echo $journalHead->journalID; ?></td>
        <td width="10%">&nbsp;</td>
        <td width="20%"></td>
        <td width="5%"></td>
        <td width="20%"></td>
	</tr>
    <tr>
    	<td class="tar"><?php echo form_label('Description:','description');?></td>
        <td class="tac">:</td>
        <td>&nbsp;<?php echo $journalHead->description; ?></td>
        <td>&nbsp;</td>
        <td class="tar"><?php echo $this->lang->line('amount_cr_ttl');?></td>
        <td class="tac">:</td>
        <td><?php  echo number_format($journalHead->total_amount_dr,2); ?></td>
	</tr>
    <tr>
    	<td class="tar"><?php echo form_label($this->lang->line('effective_date'),'effdate');?></td>
        <td class="tac">:</td>
        <td>&nbsp;<?php echo date(element('dtFormat', $this->session->userdata('logged_in')),strtotime($journalHead->effective_date)); ?></td>
        <td>&nbsp;</td>
        <td class="tar"><?php echo $this->lang->line('amount_dr_ttl');?></td>
        <td class="tac">:</td>
        <td><?php echo number_format($journalHead->total_amount_cr,2); ?></td>
	</tr>
    <tr>
    	<td></td>
        <td></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td></td>
	</tr>
</table>
<table cellpadding="0" cellspacing="0" width="100%" id="test" class="editable" border="1">
                	<thead>
                    <tr>
            			<th style="display:none"></th>
            			<th class="tac">#</th>
                        <th class="tal">&nbsp;<?php echo $this->lang->line('acctCode')?></th>
						<th class="tal">&nbsp;<?php echo $this->lang->line('description')?></th>
            			<th class="tar"><?php echo $this->lang->line('amount_dr')?>&nbsp;</th>
                        <th class="tar"><?php echo $this->lang->line('amount_cr')?>&nbsp;</th>
            		</tr>
        			</thead>
       				 <tbody>
			<?php $bil = 0;
			//echo var_dump($datatbls); 
				if($datatbls){
				foreach($datatbls as $datatbl):
				$bil++?>
            	<tr>
                	<td style="display:none" ><?php echo $datatbl->ID; ?></td>	
                	<td class="tac"><?php echo $datatbl->sequence; ?></td>
                    <td>&nbsp;<?php echo substr($datatbl->acctcode,0, 4).'-'.substr($datatbl->acctcode,4, 3).'-'.substr($datatbl->acctcode,7, 2) . "  [" . $datatbl->acctname. "]"?></td>
                	<td>&nbsp;<?php echo $datatbl->description?></td>
                    <td class="tar"><?php echo number_format($datatbl->amount_dr,2); ?>&nbsp;</td>
                    <td class="tar"><?php echo number_format($datatbl->amount_cr,2); ?>&nbsp;</td>
                </tr>
            <?php endforeach; }?>
					</tbody>
			</table>
<div style="page-break-after:always"></div>
</html>