<html>
<head>
<style>
/* General */
table {
border-collapse:collapse;
}
.center {
text-align:center;
}
.right {
text-align : right;
}
.left {
text-align : left;
}
tr {
margin : 5px 0 ;
line-height : 18px;
}
th {
text-align : center;
padding : 10px 0;
}
td {
padding: 5px 0;
word-wrap: break-word;
}
tr td.label {
width : 100px;
}
.item-header {
margin : 15px 0;
}
table.item-detail,
table.item-detail th,
table.item-detail td {
border : 1px solid #000;
}
/* Header */
#header {
width : 755px;
padding-bottom : 5px;
border-bottom:3px solid #000;
}
#logo {
float:left;
display:inline;
width : 100px;
}
#kop-surat {
margin-top : -120px;
width : 600px;
display:inline-block;
text-align : center;
}
#separator {
padding : 2px 0;
border-bottom:1px solid #000;
}
/* Content */
#content {
width : 755px;
}
#report-title {
font-size : 16px;
text-align : center;
margin-bottom:10px;
}
table.item-summary {
margin : 15px 0;
}
.currency {
}
.space {
width:20px;
}
</style>
</head>
<body>
<div id="container">
<div id="header">
<div id="logo">
<?php echo CHtml::image(realpath(Yii::app()->basePath.'/../images/logo.jpg'),'LPS',array('style'=>'width:100px;')); ?>
</div>
<div id="kop-surat">
<h2>PT. LANGGENG PRANAMAS SENTOSA</h2>
GENERAL - SUPPLIER - EXPEDISI <br />
Jl. Serdang Baru Raya No 12 RT 004, RW 05, Kel. Serdang, Kec. Kemayoran, Jakarta Pusat <br />
Telp : 4248755,4221111,4265555 <br />
Fax : 4242477 <br />
Email : pitojo@cbn.net.id <br />
</div>
</div>
<div id="separator"></div>
<div id="content">
<div id="report-title">KWITANSI</div>
<table>
<tr>
<td class="label">No Kwitansi</td>
<td class="desc" style="width:455px;"><?php echo $model->receipt_print_no; ?></td>
<td class="label">Tgl Kwitansi</td>
<td class="desc" class="right"><?php echo CDate::getDateFormat($model->receipt_transaction_date,'/'); ?></td>
</tr>
</table>
<table>
<tr>
<td class="label">Kepada</td>
<td class="desc">
<?php echo $customer->customer_company_name; ?> <br />
<?php echo $customer->addressStr; ?> <br />
Telepon : <?php echo $customer->phoneStr; ?> <br />
</td>
</tr>
</table>
<br />
<!-- Max BAPB page 1 , berikut header + footer = 33, items : 28. Other page : 45 with H + F -->
<?php
$bapb = 0;
$page = 1;
$deliveryConfirmations = $model->deliveryConfirmations;
$totalBapbRecords = count($deliveryConfirmations);
$totalBapbPrinted = 0;
?>
<?php for($i = 1; $i <= 2; $i++): ?>
<?php foreach($deliveryConfirmations as $dc): ?>
<?php $bapb++; ?>
<table class="item-header">
<tr>
<td class="label"><strong>No BAPB</strong></td>
<td class="desc" style="width:180px;"><?php echo $dc->dc_print_no; ?></td>
<td class="label"><strong>Tgl BAPB</strong></td>
<td class="desc" style="width:100px;"><?php echo CDate::getDateFormat($dc->dc_transaction_date,'/'); ?></td>
<td class="label"><strong>Tujuan</strong></td>
<td class="desc" style="width:130px;"><?php echo $area->area_name; ?></td>
</tr>
<tr>
<td class="label"><strong>Nama Kapal</strong></td>
<td class="desc" style="width:180px;"><?php echo $dc->ship->ship_name; ?></td>
<td class="label"><strong>Tgl Berangkat</strong></td>
<td class="desc" style="width:100px;"><?php echo $dc->ship_depart_on; ?></td>
</tr>
</table>
<?php
$totalDeliveryConfirmations = 0;
$deliveryItems[$dc->primaryKey]['itemName'] = '';
$deliveryItems[$dc->primaryKey]['itemQty'] = '';
$deliveryItems[$dc->primaryKey]['itemUm'] = '';
$deliveryItems[$dc->primaryKey]['itemTotal'] = '';
$deliveryItems[$dc->primaryKey]['itemTotalPrice'] = '';
foreach($dc->items as $item) {
$deliveryItems[$dc->primaryKey]['itemName'] .= ($item->delivery_item_name.', ');
$deliveryItems[$dc->primaryKey]['itemQty'] += $item->delivery_item_quantity;
$deliveryItems[$dc->primaryKey]['itemUm'] = $item->um->unit_measurement_name;
$deliveryItems[$dc->primaryKey]['itemTotal'] += $item->delivery_item_total;
}
$deliveryItems[$dc->primaryKey]['itemTotalPrice'] = $dc->dc_unit_price * $deliveryItems[$dc->primaryKey]['itemTotal'];
$totalDeliveryConfirmations += $deliveryItems[$dc->primaryKey]['itemTotalPrice'];
?>
<table class="item-detail">
<tr>
<th style="width : 250px;">Nama Barang</th>
<th style="width : 50px;">Jumlah</th>
<th style="width : 80px;">Satuan</th>
<th style="width : 80px;">Total</th>
<th style="width : 120px;">Harga (Rp)</th>
<th style="width : 140px;">Total Harga (Rp)</th>
</tr>
<tr style="font-size : 11px;">
<td><span class="space"></span><?php echo $deliveryItems[$dc->primaryKey]['itemName']; ?></td>
<td class="center"><?php echo $deliveryItems[$dc->primaryKey]['itemQty']; ?></td>
<td class="center"><?php echo $deliveryItems[$dc->primaryKey]['itemUm']; ?></td>
<td class="center"><?php echo $deliveryItems[$dc->primaryKey]['itemTotal']; ?></td>
<td class="right"><?php echo CNumber::priceFormat($dc->dc_unit_price); ?> <span class="space"></span></td>
<td class="right"><?php echo CNumber::priceFormat($deliveryItems[$dc->primaryKey]['itemTotalPrice']); ?> <span class="space"></span></td>
</tr>
<tr style="font-size : 11px;">
<td colspan="5" class="center">Subtotal (Rp)</td>
<td class="right"><?php echo CNumber::priceFormat($deliveryItems[$dc->primaryKey]['itemTotalPrice']); ?> <span class="space"></span></td>
</tr>
</table>
<table><tr><td style="color:#FFF;">-</td></tr></table>
<?php $totalBapbPrinted++; ?>
<?php
if($totalBapbPrinted == $totalBapbRecords) { // Achieved total, now calculate summary
if($page == 1) {
$max = 2;
$div = '<table>
<tr><td style="color:#FFF;">-</td></tr><tr><td style="color:#FFF;">-</td></tr><tr><td style="color:#FFF;">-</td></tr>
<tr><td style="color:#FFF;">-</td></tr><tr><td style="color:#FFF;">-</td></tr><tr><td style="color:#FFF;">-</td></tr>
</table>';
} else {
$max = 4;
$div = '<table>
<tr><td style="color:#FFF;">-</td></tr><tr><td style="color:#FFF;">-</td></tr>
<tr><td style="color:#FFF;">-</td></tr><tr><td style="color:#FFF;">-</td></tr>
</table>';
}
if($bapb == $max) {
$page++; // Go to next page
// echo $div; // Add new empty lines
$bapb = 0;
}
} else {
if($page == 1) {
$max = 4;
$div = '<table>
<tr><td style="color:#FFF;">-</td></tr><tr><td style="color:#FFF;">-</td></tr>
<tr><td style="color:#FFF;">-</td></tr><tr><td style="color:#FFF;">-</td></tr>
</table>';
} else {
$max = 6;
$div = '<table>
<tr><td style="color:#FFF;">-</td></tr><tr><td style="color:#FFF;">-</td></tr>
</table>';
}
if($bapb == $max) {
$page++; // Go to next page
// echo $div; // Add new empty lines
$bapb = 0;
}
}
?>
<?php endforeach; ?>
<?php endfor; ?>
<table class="item-summary" style="font-size : 11px;">
<tr>
<td style="width:470px;border-right:1px solid #000;"></td>
<td class="center" style="width:120px;border:1px solid #000;font-weight:bold;">Total (Rp)</td>
<td class="right" style="width:120px;border:1px solid #000;font-weight:bold;">
<?php echo CNumber::priceFormat($totalDeliveryConfirmations); ?> <span class="space"></span>
</td>
</tr>
<tr>
<td style="width:470px;border-right:1px solid #000;"></td>
<td class="center" style="width:120px;border:1px solid #000;">Asuransi (Rp)</td>
<td class="right" style="width:120px;border:1px solid #000;">
<?php echo CNumber::priceFormat($model->receipt_insurance_cost); ?> <span class="space"></span>
</td>
</tr>
<tr>
<td style="width:470px;border-right:1px solid #000;"></td>
<td class="center" style="width:120px;border:1px solid #000;">Materai (Rp)</td>
<td class="right" style="width:120px;border:1px solid #000;">
<?php echo CNumber::priceFormat($model->receipt_stamp_cost); ?><span class="space"></span>
</td>
</tr>
<tr>
<td style="width:470px;border-right:1px solid #000;"></td>
<td class="center" style="width:120px;border:1px solid #000;">Lainnya (Rp)</td>
<td class="right" style="width:140px;border:1px solid #000;">
<?php echo CNumber::priceFormat($model->receipt_other_costs); ?> <span class="space"></span>
</td>
</tr>
<tr>
<td style="width:470px;border-right:1px solid #000;"></td>
<td class="center" style="width:120px;border:1px solid #000;">Diskon (Rp)</td>
<td class="right" style="width:140px;border:1px solid #000;">
<?php echo CNumber::priceFormat($model->receipt_discount); ?> <span class="space"></span>
</td>
</tr>
<tr>
<td style="width:470px;border-right:1px solid #000;"></td>
<td class="center" style="width:120px;border:1px solid #000;font-weight:bold;">Grand Total (Rp)</td>
<td class="right" style="width:140px;border:1px solid #000;font-weight:bold;">
<?php echo CNumber::priceFormat($model->receipt_grand_total - $model->receipt_vat_amount); ?> <span class="space"></span>
</td>
</tr>
<tr>
<td style="width:470px;border-right:1px solid #000;"></td>
<td class="center" style="width:120px;border:1px solid #000;">PPN (Rp)</td>
<td class="right" style="width:140px;border:1px solid #000;">
<?php echo CNumber::priceFormat($model->receipt_vat_amount); ?> <span class="space"></span>
</td>
</tr>
<tr>
<td style="width:470px;border-right:1px solid #000;"></td>
<td class="center" style="width:120px;border:1px solid #000;font-weight:bold;">Grand Total (Rp)</td>
<td class="right" style="width:140px;border:1px solid #000;font-weight:bold;">
<?php echo CNumber::priceFormat($model->receipt_grand_total); ?> <span class="space"></span>
</td>
</tr>
</table>
<br />
<table id="terbilang">
<tr>
<td class="label">Terbilang </td>
<td>
<?php echo strtoupper(CNumber::terbilang($model->receipt_grand_total).' rupiah'); ?>
</td>
</tr>
<tr style="width:625px;page-break-before: always;" >
<td class="label">Keterangan </td>
<td style="width:625px;" align="justify">
<?php echo $model->receipt_desc ?>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</td>
</tr>
</table>
<!--
<table id="signature">
<tr>
<td style="width:630px;"></td>
<td class="label">Hormat Kami </td>
</tr>
<tr>
<td style="width:630px;"></td>
<td class="label" style="color:#FFF;">-</td>
</tr>
<tr>
<td style="width:630px;"></td>
<td class="label" style="color:#FFF;">-</td>
</tr>
<tr>
<td style="width:630px;"></td>
<td class="label">Mochtar Pitojo</td>
</tr>
</table>
<div id="signature">
<div style="margin-left:590px;margin-bottom:75px;">Hormat Kami</div>
<div style="margin-left:590px">Mochtar Pitojo</div>
</div> -->
</div>
</div>
</body>
</html>