<!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	   
			$sweep_date=json_decode($date_journal);
			foreach($sweep_date as $rows):		   
		  ?>
		<tr>
			<td colspan="6" class="s0 " align="center"><span class="normal_bold"><?php echo $rows->CompanyName;?></span></td>
		</tr>
        <tr>
			<td colspan="6" class="s0" align="center"><span class="normal_bold"><?php echo $rows->BranchName;?></span></td>
		</tr>
		<tr>
			<td colspan="6" class="s1" align="center"><span class="normal_bold">JOURNAL SWEEP BANK</span></td>
		</tr>
		<tr>
			<td width="120" class="s4 "><span class="normal_bold">Account No</span></td>
			<td width="200" 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 $rows->BSweepNumber; ?> <?php echo 'Description : ';?> <?php echo $rows->BSweepDesc; ?></td>
		</tr>
		<?php endforeach;?>
 		<?php	   
				$sweep_jurnal=json_decode($list_jurnal);
				foreach($sweep_jurnal as $row_jurnal){	
					if($row_jurnal->BSweepSaldoDebet > 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.' - '.$row_jurnal->BranchName; ?></span></td>
				<td class="s5 text-right"><span class="normal_bold"><?php echo number_format($row_jurnal->BSweepSaldoDebet,"2",",","."); ?></span></td>
				<td class="s5 text-right"><span class="normal_bold"><?php echo number_format($row_jurnal->BSweepSaldoCredit,"2",",","."); ?></span></td>
				<td class="s5 text-right"><span class="normal_bold"><?php echo number_format($row_jurnal->BSweepSaldoDebet,"2",",","."); ?></span></td>
				<td class="s5 text-right"><span class="normal_bold"><?php echo number_format($row_jurnal->BSweepSaldoCredit,"2",",","."); ?></span></td>
			</tr> 
		<?php 
			}else{

				$acc_number 	= $row_jurnal->AccountNumber;
				$acc_name 		= $row_jurnal->AccountName;
				$BranchName 	= $row_jurnal->BranchName;
				$debet 			= number_format($row_jurnal->BSweepSaldoDebet,"2",",",".");
				$kredit 		= number_format($row_jurnal->BSweepSaldoCredit,"2",",",".");
			}
		?>
	  <?php
		}	   
	  ?>
	  	<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.' - '.$BranchName; ?></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 $debet; ?></span></td>
			<td class="s5 text-right"><span class="normal_bold"><?php echo $kredit;?></span></td>
		</tr> 
    <tr>
		<td class="s5" align="right" colspan="4">&nbsp;</td>
	</td>
	</tr>
</table>
</div>
</body></html>

