Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 30th, 2012  |  syntax: PHP  |  size: 5.46 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4.  
  5. <style type="text/css">
  6. html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{border:0;margin:0;outline:0;padding:0;vertical-align:baseline}
  7. ol,ul{list-style:none}
  8. table{border-collapse:collapse;border-spacing:0;width:100%}
  9. body{font-size:12px !important;padding:15px 15px 15px 25px}
  10. th,td{border:1px solid #000;padding:2px}
  11. th{align:center;vertical-align:middle}
  12. .header{border-bottom:1px solid #000;margin-bottom:10px;padding-bottom:3px}
  13. .header .title{font-size:14px}
  14. </style>
  15.  
  16. </head>
  17.  
  18. <body>
  19.     <div class="header">
  20.         <p class="title">Laporan Pembiayaan Kendaraan Bermotor</p>
  21.         <?php if ($unit): ?>
  22.         <p class="period">Unit : <?php echo $unit ?></p>
  23.         <?php endif ?>
  24.         <p class="period">Periode Laporan : <?php echo $start ?> s/d <?php echo $end ?></p>
  25.     </div>
  26.     <table>
  27.         <thead>
  28.             <tr>
  29.                 <th>No</th>
  30.                 <th width="6%">Tanggal</th>
  31.                 <th width="7%">Nama</th>
  32.                 <th>No. SP</th>
  33.                 <th>Merek</th>
  34.                 <th width="6%">Tipe</th>
  35.                 <th width="8%">No. Polisi</th>
  36.                 <th width="9%">No. BPKB</th>
  37.                 <th>DP</th>
  38.                 <th>Saldo Piutang</th>
  39.                 <th>JW</th>
  40.                 <th>Ang/Bln</th>
  41.                 <th>S.P. Pokok</th>
  42.                 <th>S. Bunga</th>
  43.                 <th>Harga Netto</th>
  44.                 <th>Harga Total</th>
  45.                 <th>Harga Beli</th>
  46.                 <th>Pembiayaan</th>
  47.             </tr>
  48.         </thead>
  49.         <tbody>
  50.             <?php $total_advance = 0; $total_receivable = 0; $total_installment = 0; $total_principal = 0; $total_interest = 0; $total_net_price = 0; $total_purchase_price = 0; $total_financing = 0; $grand_total = 0; ?>
  51.             <?php foreach ($transactions as $index => $transaction): ?>
  52.             <tr>
  53.                 <td align="center"><?php echo $index + 1 ?></td>
  54.                 <td align="center"><?php echo date('d/m/y', $transaction['date']) ?></td>
  55.                 <td><?php echo $transaction['customer_name'] ?></td>
  56.                 <td align="center"><?php echo $transaction['transaction_number'] ?></td>
  57.                 <td><?php echo $transaction['brand'] ?></td>
  58.                 <td><?php echo $transaction['type'] ?></td>
  59.                 <td align="center"><?php echo $transaction['vehicle_number'] ?></td>
  60.                 <td align="center"><?php echo $transaction['vehicle_owner_number'] ?></td>
  61.                 <td align="right"><?php echo number_format($transaction['advance']) ?></td>
  62.                 <td align="right"><?php echo number_format($transaction['receivable']) ?></td>
  63.                 <td align="center"><?php echo $transaction['term'] ?></td>
  64.                 <td align="right"><?php echo number_format($transaction['installment']) ?></td>
  65.                 <td align="right"><?php echo number_format($transaction['principal']) ?></td>
  66.                                 <?php $interest = $transaction['receivable'] - $transaction['principal'] ?>
  67.                                 <td align="right"><?php echo number_format($interest) ?></td>
  68.                 <td align="right"><?php echo number_format($transaction['net_price']) ?></td>
  69.                 <td align="right"><?php echo number_format($transaction['total_price']) ?></td>
  70.                 <?php $financing = ($transaction['purchase_price'] - $transaction['advance']) < 0 ? 0 : ($transaction['purchase_price'] - $transaction['advance']) ?>
  71.                 <td align="right"><?php echo number_format($transaction['purchase_price']) ?></td>
  72.                 <td align="right"><?php echo number_format($financing) ?></td>
  73.                 <?php $total_advance += $transaction['advance'] ?>
  74.                 <?php $total_receivable += $transaction['receivable'] ?>
  75.                 <?php $total_installment += $transaction['installment'] ?>
  76.                 <?php $total_principal += $transaction['principal'] ?>
  77.                 <?php $total_interest += $interest ?>
  78.                 <?php $total_net_price += $transaction['net_price'] ?>
  79.                 <?php $total_purchase_price += $transaction['purchase_price'] ?>
  80.                 <?php $total_financing += $financing ?>
  81.                 <?php $grand_total += $transaction['total_price'] ?>
  82.             </tr>
  83.             <?php endforeach ?>
  84.             <tr>
  85.                 <td colspan="8"></td>
  86.                 <td align="right"><?php echo number_format($total_advance) ?></td>
  87.                 <td align="right"><?php echo number_format($total_receivable) ?></td>
  88.                 <td></td>
  89.                 <td align="right"><?php echo number_format($total_installment) ?></td>
  90.                 <td align="right"><?php echo number_format($total_principal) ?></td>
  91.                 <td align="right"><?php echo number_format($total_net_price) ?></td>
  92.                 <td align="right"><?php echo number_format($grand_total) ?></td>
  93. <!-- -->
  94.                 <td align="right"><?php echo number_format($total_purchase_price) ?></td>
  95.                 <td align="right"><?php echo number_format($total_financing) ?></td>
  96.             </tr>
  97.         </tbody>
  98.     </table>
  99. </body>
  100. </html>