<!DOCTYPE html>
<html>
<head>
	<title>Cetak</title>
	<style type="text/css">
		body {
			font-family: 'Tahoma';
			font-size: 14px;
			width: 21cm;
		}
		@media print {
			body {
				width: auto;
			}
		}

		.separate {
			border-bottom: 1px dashed #000;
		}
	</style>
</head>
<body onload="window.print();">



<h3>TOKO PUTRI MELATI</h3>
NOTA PIUTANG	
	<form class="form-horizontal" id="form_debt">
		<table>
			<tr>
				<td>Tanggal</td>
				<td>&nbsp;:&nbsp;</td>
				<td><?php echo $data['date'];?></td>
				<td width="200px"></td>
				<td>Pelanggan</td>
				<td>&nbsp;:&nbsp;</td>
				<td><?php echo $data['customer'];?></td>
			</tr>
			<tr>
				<td>Kode</td>
				<td>&nbsp;:&nbsp;</td>
				<td><?php echo $data['code'];?></td>
				<td width="200px"></td>
				<td>Total</td>
				<td>&nbsp;:&nbsp;</td>
				<td class="txt-total"><?php echo az_thousand_separator_decimal($data['total']);?></td>
			</tr>
		</table>

		<div class="container-credit" style="margin-top:20px;">
			<div class="separate" style="margin-top:10px;margin-bottom:3px;"></div>
			<div class="separate"></div>
			<table width="100%">
				<thead>
					<tr>
						<td style="width: 150px;font-weight: bold;">Tgl Pembayaran</td>
						<td style="text-align:right;font-weight: bold;">Jumlah Pembayaran</td>
					</tr>
					<tr colspan="2">
						<td colspan="2"><div class="separate"></div></td>
					</tr>
				</thead>
				<tbody>
					<?php 
						foreach ($data['payment']->result() as $key => $value) {
					?>
					<tr>
						<td>
							<?php echo Date('d-m-Y H:i:s', strtotime($value->installment_payment_date));?>
						</td>
						<td align="right"><?php echo az_thousand_separator_decimal($value->installment_payment);?></td>
					</tr>
					<?php
						}
					?>
				</tbody>
			</table>
		</div>






		<div class="separate"></div>

		<div style="margin-top:30px;">
			<table>
				<tr>
					<td>Jumlah Pembayaran</td>
					<td align="center" width="20px">&nbsp;:&nbsp;</td>
					<td class="txt-pay"><?php echo az_thousand_separator_decimal($data['total_pay']);?></td>
				</tr>
				<tr>
					<td>Sisa Hutang</td>
					<td align="center">&nbsp;:&nbsp;</td>
					<td class="txt-lack"><?php echo az_thousand_separator_decimal($data['lack']);?></td>
				</tr>
				<tr>
					<td>Status Pembayaran</td>
					<td align="center">&nbsp;:&nbsp;</td>
					<td class="txt-lack"><?php echo $data['payment_status'];?></td>
				</tr>
			</table>
		</div>
		
		
			<table width="100%">
		<tr>
			<td valign="top" width="70%">
				<div>Brg yg dibeli tdk dpt dikembalikan, kecuali dg perjanjian.</div>
				<table width="100%">
					<tr>
						<td>Hormat Kami,</td>
						<td>Yang Menerima,</td>
					
					</tr>
				</table>
		
		
	</form>
</body>
</html>

<script type="text/javascript">
        document.body.onkeydown = function(e){
            location.href = "<?php echo app_url();?>" + "credit";
        };
</script>
