Advertisement
jamboljack

Kalkulasi Text

May 27th, 2014
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.36 KB | None | 0 0
  1.  <!-- Start Tabel Detail Order -->     
  2.         <div class="panel-body">
  3.             <div class="table-responsive">
  4.             <table width="100%" align="center" class="table table-striped table-bordered table-hover">
  5.             <thead>
  6.                 <tr>
  7.                 <th width="7%">No</th>
  8.                 <th width="35%">Nama Paket</th>
  9.                 <th width="35%">Nama Kategori</th>
  10.                 <th width="23%">Harga</th>
  11.                 </tr>
  12.             </thead>
  13.             <tbody>
  14.                 <?
  15.                 $no         = 1;
  16.                 $subtotal  = 0;
  17.                 foreach($detail as $row) {
  18.                     $harga = $row->harga;
  19.                     $subtotal = ($subtotal+$harga);        
  20.                 ?>
  21.                 <tr>
  22.                 <td><? echo $no; ?></td>
  23.                 <td><? echo $row->nama_paket; ?></td>
  24.                 <td><? echo $row->nama_kategori; ?></td>
  25.                 <td align="right">Rp. <? echo number_format($row->harga,0,",","."); ?></td>
  26.                 </tr>
  27.                 <?
  28.                 $no++;
  29.                 }
  30.                 ?>
  31.             </tbody>
  32.        
  33.         <!-- Perhitungannya Mulai dari Sini Mas -->
  34.             <tbody>
  35.                 <tr>
  36.                   <td align="right" colspan="3"><b>Sub Total : </b></td>
  37.                   <td align="right">
  38.                   <input name="jumlah" type="text" class="form-control" value="<?php echo $order->jumlah; ?>" size="10" maxlength="10" disabled="true" />
  39.                   <!-- <b>Rp. <?php echo number_format($subtotal,0,",","."); ?></b>--></td>
  40.               </tr>
  41.                 <tr>
  42.                   <td align="right" colspan="3"><b>Biaya Lain-Lain : </b></td>
  43.                   <td align="right"><input name="biaya" type="text" class="form-control" value="<?php echo $order->biaya_lain; ?>" size="10" maxlength="10" />
  44.                   <!--<b>Rp. <?php echo number_format($order->biaya_lain,0,",","."); ?></b>-->
  45.                   </td>
  46.               </tr>
  47.                 <tr>
  48.                 <td align="right" colspan="3"><b>TOTAL : </b></td>
  49.                 <td align="right"><input name="total" type="text" class="form-control" value="<?php echo $order->total; ?>" size="10" maxlength="10" disabled="true" />
  50.                 <!--<b>Rp. <?php $total = ($subtotal+$order->biaya_lain); echo number_format($total,0,",","."); ?></b>--></td>
  51.                 </tr>            
  52.             </tbody>
  53.             </table>
  54.           </div>
  55.         </div>
  56.         <!-- End Tabel Detail Order -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement