<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Journal Loan Payment</title>
</head>
<body style="width:auto; margin:auto">
<style type="text/css">
@media print {
.noPrint { display: none; }
}
</style>
<div style="padding:2px">
	<a href="#" class="easyui-linkbutton noPrint" data-options="plain:true,iconCls:'icon-print'" onClick="window.print()">Print</a>
</div><br />
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
  <?php	   
  	$payment=json_decode($date_journal);
	foreach($payment as $row_data){		   
  ?>
    <tr>
		<td colspan="6" class="s0"><?= $row_data->CompanyName; ?></td>
    </tr>
     <tr>
		<td colspan="6" class="s0"><?= $row_data->BranchName; ?></td>
    </tr>
  <?php
	}
  ?>
    <tr>
		<td colspan="6" class="s1">Journal Loan Payment</td>
    </tr>
	<tr>
		<td colspan="6" class="s1">&nbsp;</td>
    </tr>
    <tr>
		<td width="20" class="s4">Account No</td>
		<td width="43" class="s4">Account Name</td>
		<td width="118" class="s4" align="right">Debit(Base)</td>
		<td width="85" class="s4" align="right">Credit(Base)</td>
		<td width="118" class="s4" align="right">Debit(Prime)</td>
		<td width="85" class="s4" align="right">Credit(Prime)</td>
    </tr>
  <?php	   
	$payment_date=json_decode($date_journal);
	foreach($payment_date as $rows){		   
  ?>
    <tr>
		 <td height="23" class="s3" colspan="6"> <?= 'Transaksi Number : ';?> <?= $rows->LJNumber; ?> <?= 'Description : ';?> <?= $rows->LJDesc; ?></td>
	</tr>
  <?php
	}	   
  ?>
  
  <?php	   
	$payment_jurnal=json_decode($list_jurnal);
	foreach($payment_jurnal as $row){		   
  ?>
	<tr>
	    <td class="s3"><?= $row->AccountNumber; ?></td>
		<td class="s5"><?= $row->AccountName; ?></td>
		<td class="s5" align="right"><?= number_format($row->LJSaldoDebet,"2",",","."); ?></td>
		<td class="s5" align="right"><?= number_format($row->LJSaldoCredit,"2",",","."); ?></td>
		<td class="s5" align="right"><?= $row->LJSaldoDebet == 0 ? number_format(0,"2",",","."):number_format($row->AmountCurrency,"2",",","."); ?></td>
		<td class="s5" align="right"><?= $row->LJSaldoCredit == 0 ? number_format(0,"2",",","."):number_format($row->AmountCurrency,"2",",","."); ?></td>
    </tr> 
  <?php
	}	   
  ?>
    <tr>
		<td class="s5" align="right" colspan="6">&nbsp;</td>
	</td>
</table>
</body></html>

