<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Journal <?php echo $menu_label ?></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 />
<div style="width:100%; height:500px; overflow:auto">
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
		<?php foreach($list as $row):?>
			<tr>
				<td colspan="6" class="s0 " align="center"><span class="normal_bold">PT. <?php echo $company->CompanyName;?></span></td>
			</tr>
	        <tr>
				<td colspan="6" class="s0" align="center"><span class="normal_bold"><?php echo $row->BranchName;?></span></td>
			</tr>
			<tr>
				<td colspan="6" class="s1" align="center"><span class="normal_bold">Journal Transfer To Petty Cash</span></td>
			</tr>
			<tr>
				<td width="150" class="s4 "><span class="normal_bold">Account No</span></td>
				<td width="180" class="s4 "><span class="normal_bold">Account Name</span></td>
				<td width="160" class="s4 " ><span class="normal_bold">Debet (Base)</span></td>
				<td width="160" class="s4 " ><span class="normal_bold">Credit (Base)</span></td>
				<td width="160" class="s4 " ><span class="normal_bold">Debet (Prime)</span></td>
				<td width="160" class="s4 " ><span class="normal_bold">Credit (Prime)</span></td>
			</tr>
			
			<tr>
				 <td height="23" class="s3" colspan="6"> <?php echo 'Transaksi Number : ';?> <?php echo $row->TCashNumber; ?> <?php echo 'Description : ';?> <?php echo $row->TCashDesc; ?></td>
			</tr>
		<?php endforeach;?>

		<?php foreach($list_detail as $row_jurnal):?>

			<?php if($row_jurnal->TCashSaldoDebet > 0):?>

				<tr>
					<td class="s3 text-left"><span class="normal_bold"><?php echo $row_jurnal->AccountNumber; ?></span></td>
					<td class="s5 text-left"><span class="normal_bold"><?php echo $row_jurnal->AccountName; ?></span></td>
					<td class="s5 text-right"><span class="normal_bold"><?php echo number_format($row_jurnal->TCashSaldoDebet,"2",",","."); ?></span></td>
					<td class="s5 text-right"><span class="normal_bold"><?php echo number_format($row_jurnal->TCashSaldoCredit,"2",",","."); ?></span></td>
					<td class="s5 text-right"><span class="normal_bold"><?php echo number_format($row_jurnal->AmountCurrency,"2",",","."); ?></span></td>
					<td class="s5 text-right"><span class="normal_bold"><?php echo number_format(0,"2",",","."); ?></span></td>
				</tr> 
			<?php else:?>

				<?php 
					$acc_number 	= $row_jurnal->AccountNumber;
					$acc_name 		= $row_jurnal->AccountName;
					$debet 			= number_format($row_jurnal->TCashSaldoDebet,"2",",",".");
					$kredit 		= number_format($row_jurnal->TCashSaldoCredit,"2",",",".");
					$AmountCurrency = number_format($row_jurnal->AmountCurrency,"2",",",".");
				?>
			<?php endif;?>
		<?php endforeach;?>

	  	<tr>
			<td class="s3 text-left"><span class="normal_bold"><?php echo $acc_number;  ?></span></td>
			<td class="s5 text-left"><span class="normal_bold"><?php echo $acc_name; ?></span></td>
			<td class="s5 text-right"><span class="normal_bold"><?php echo $debet; ?></span></td>
			<td class="s5 text-right"><span class="normal_bold"><?php echo $kredit;?></span></td>
			<td class="s5 text-right"><span class="normal_bold"><?php echo number_format(0,"2",",","."); ?></span></td>
			<td class="s5 text-right"><span class="normal_bold"><?php echo $AmountCurrency;?></span></td>
		</tr> 
    <tr>
		<td class="s5" align="right" colspan="4">&nbsp;</td>
	</td>
	</tr>
</table>
</div>
</body></html>

