<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head><title>Payment Afiliasi</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 />
		
		<!--// Company Transfer //-->
		<table width="80%" border="0" cellspacing="0" cellpadding="0" style="margin-left:100px; margin-top:10px;">
			<?php foreach($detail_to_journal as $row_from):?>
			<tr>
				<td colspan="8" class="s0"><?php echo $row_from->FromCompany;?></td>
			</tr>
			<tr>
				<td colspan="8" class="s1">Journal Payment Afiliasi</td>
			</tr>
			<tr>
				<td width="" class="s4">Account No</td>
				<td width="" class="s4">Account Name</td>
				<td width="" class="s4" align="right">Debet(Base)</td>
				<td width="" class="s4" align="right">Credit(Base)</td>
				<td width="" class="s4" align="right">Debet(Prime)</td>
				<td width="" class="s4" align="right">Credit(Prime)</td>
			</tr>
			<tr>
				<td class="s5"><b><?php echo $row_from->AInsDate;?></b></td>
				<td class="s3"><b><?php echo "Payment Afiliasi";?></b></td>
				<td class="s5" align="left">
					<b><?php echo $branch_by_company_to->BranchCode;?></b>
				</td>
				<td class="s5"></td>
				<td class="s5"></td>
				<td class="s5"></td>
			</tr>
			<?php endforeach;?>
			<tr>
				<td class="s3"><?php echo $akun_payment_from->AccountNumber; ?></td>
				<td class="s5"><?php echo $akun_payment_from->AccountName; ?></td>
				<td class="s5" align="right">
					<?php 
						foreach($detail_to_journal as $detail){
							echo number_format($detail->val_amount,"2",",",".");
						}
					?>
				</td>
				<td class="s5" align="right"><?php echo number_format(0,"2",",",".");?></td>
				<td class="s5" align="right">
					<?php 
						foreach($detail_to_journal as $detail){
							echo number_format($detail->val_amount,"2",",",".");
						}
					?>
				</td>
				<td class="s5" align="right"><?php echo number_format(0,"2",",",".");?></td>
			</tr>
			
			<?php foreach($detail_to_journal as $detail):?>
			<tr>
				<td class="s3"><?php echo $detail->akun_from; ?></td>
				<td class="s5"><?php echo $detail->AccountTrasfer; ?></td>
				<td class="s5" align="right"><?php echo number_format(0,"2",",",".");	?></td>
				<td class="s5" align="right"><?php echo number_format($detail->val_amount,"2",",",".");	?></td>
				<td class="s5" align="right"><?php echo number_format(0,"2",",",".");	?></td>
				<td class="s5" align="right"><?php echo number_format($detail->val_amount,"2",",",".");	?></td>
			</tr>
			<?php endforeach;?>
			<tr>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
		</table>
		
		<!--// Company Receipt //-->
		<table width="80%" border="0" cellspacing="0" cellpadding="0" style="margin-left:100px; margin-top:10px;">
			<?php foreach($detail_to_journal as $row_to):?>
			<tr>
				<td colspan="8" class="s0"><?php echo $row_to->ToCompany;?></td>
			</tr>
			<tr>
				<td colspan="8" class="s1">Journal Penerimaan Afiliasi</td>
			</tr>
			<tr>
				<td width="" class="s4">Account No</td>
				<td width="" class="s4">Account Name</td>
				<td width="" class="s4" align="right">Debet(Base)</td>
				<td width="" class="s4" align="right">Credit(Base)</td>
				<td width="" class="s4" align="right">Debet(Prime)</td>
				<td width="" class="s4" align="right">Credit(Prime)</td>
			</tr>
			<tr>
				<td class="s5"><b><?php echo $row_to->AInsDate;?></b></td>
				<td class="s3"><b><?php echo "Penerimaan Afiliasi";?></b></td>
				<td class="s5" align="left">
					<b><?php echo $branch_by_company_from->BranchCode;?></b>
				</td>
				<td class="s5"></td>
				<td class="s5"></td>
				<td class="s5"></td>
			</tr>
			<?php endforeach;?>
			
			<?php foreach($detail_to_journal as $detail):?>
			<tr>
				<td class="s3"><?php echo $detail->akun_to; ?></td>
				<td class="s5"><?php echo $detail->AccountReceipt; ?></td>
				<td class="s5" align="right"><?php echo number_format($detail->val_amount,"2",",",".");	?></td>
				<td class="s5" align="right"><?php echo number_format(0,"2",",",".");	?></td>
				<td class="s5" align="right"><?php echo number_format($detail->val_amount,"2",",",".");	?></td>
				<td class="s5" align="right"><?php echo number_format(0,"2",",",".");?></td>
			</tr>
			<?php endforeach; ?>
			
			<tr>
				<td class="s3"><?php echo $akun_payment_to->AccountNumber; ?></td>
				<td class="s5"><?php echo $akun_payment_to->AccountName; ?></td>
				<td class="s5" align="right"><?php echo number_format(0,"2",",",".");?></td>
				<td class="s5" align="right">
					<?php 
						foreach($detail_to_journal as $detail){
							echo number_format($detail->val_amount,"2",",",".");
						}
					?>
				</td>
				<td class="s5" align="right"><?php echo number_format(0,"2",",",".");?></td>
				<td class="s5" align="right">
					<?php 
						foreach($detail_to_journal as $detail){
							echo number_format($detail->val_amount,"2",",",".");
						}
					?>
				</td>
			</tr>
			
			<tr>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
		</table>
	</body>
</html>