Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="row">
- <div class="col-lg-12">
- <ol class="breadcrumb">
- <li>
- <a href="<?php echo site_url('') ?>"><i class="icon-home"></i></a>
- </li>
- <li>
- <a href="<?php echo site_url('page/quotation') ?>">Quotation</a>
- </li>
- <li class="active">Detail</li>
- </ol>
- </div>
- </div>
- <div class="row">
- <div class="col-lg-12">
- <section class="panel">
- <header class="panel-heading">
- <dl class="dl-horizontal">
- <dt>Nama Proyek</dt>
- <dd><?php echo ucwords($quotation['judul']) ?></dd>
- <dt>No Quotation</dt>
- <dd><?php echo ucwords($quotation['no_quo']) ?></dd>
- <dt>Customer</dt>
- <dd><?php echo ucwords($quotation['nama_lengkap']) ?></dd>
- </dl>
- <!-- <ul class="list-unstyled" style="font-weight: 600">
- <li>Nama Proyek: <?php // echo ucwords($quotation['judul']) ?></li>
- <li>No Quotation: <?php // echo ucwords($quotation['no_quo']) ?></li>
- <li>Customer: <?php // echo ucwords($quotation['nama_lengkap']) ?></li>
- </ul> -->
- </header>
- <div class="panel-body">
- <div class="adv-table">
- <table cellpadding="0" cellspacing="0" border="0" class="display table table-bordered">
- <thead style="background:aqua">
- <tr>
- <th class="text-center">NO</th>
- <th>URAIAN ITEM SESUAI DESAIN</th>
- <th>MATERIAL & FINISHING</th>
- <th>MERK MATERIAL</th>
- <th>UNIT</th>
- <th>SAT</th>
- <th>HARGA @</th>
- <th>HARGA </th>
- </tr>
- </thead>
- <tbody>
- <?php
- $i = 0;
- $total = 0;
- $atoz = range('A','Z');
- ?>
- <?php foreach($quotation['detail'] as $id_ruangan => $ruangan): ?>
- <?php
- $lantai = $ruangan['lantai'];
- if($lantai == 1 ){
- $color = "#ff6666";
- }elseif($lantai == 2 ){
- $color = "#33adff";
- }elseif($lantai == 3){
- $color = "#b3b300";
- }elseif($lantai == 4){
- $color = " #8cff66";
- }elseif($lantai == 5){
- $color = "#d98cd9";
- }
- ?>
- <tr style="background:<?php echo $color ;?>">
- <td colspan="8" style="border:2px solid;"><?php echo '<strong style="color:#333"> Lantai '.$ruangan['lantai'].' - '. ucwords($ruangan['nama_ruangan']) .'</strong>' ?></td>
- </tr>
- <?php foreach ($ruangan['daftar_barang'] as $id_barang => $barang): ?>
- <?php $i++; ?>
- <?php
- $harga_per_barang = 0;
- if ($ket != 'belum') {
- $harga_per_barang = $barang['total_harga_barang'];
- }
- else {
- foreach ($barang['daftar_bahan'] as $id_bahan => $bahan) {
- $harga_per_barang += ($bahan['jumlah'] * $bahan['harga_bahan']);
- }
- }
- $harga_per_barang += $barang['transportasi'] + $barang['tukang'] + $barang['lain_lain'];
- $harga_per_barang += $harga_per_barang * ($barang['margin']/100);
- $total_per_barang = $harga_per_barang * $barang['jumlah_barang'];
- $total += $harga_per_barang * $barang['jumlah_barang'];
- ?>
- <?php
- $j = 0;
- $spek = $ket != 'belum' ? json_decode($barang['spesifikasi']) : $barang['spesifikasi'];
- foreach ($spek as $value):
- $exp = explode('-',$value);
- ?>
- <tr>
- <td class="text-center"><?php echo $j === 0 ? $i : '' ?></td>
- <td>
- <em><?php echo $j === 0 ? "$barang[nama_barang] $barang[model] ($barang[kode_barang])" : ''; ?></em>
- </td>
- <td>
- - <?php echo $exp[0]; ?>
- </td>
- <td>
- -
- <?php
- if(isset($exp[1])){
- echo $exp[1] ;
- }
- ?>
- </td>
- <td class="text-center">
- <?php echo $j === 0 ? $barang['jumlah_barang'] : ''; ?>
- </td>
- <td>
- <?php echo $j === 0 ? $barang['satuan_barang'] : ''; ?>
- </td>
- <td><?php echo $j === 0 ? 'Rp<span style="float: right; font-weight: 600">' .number_format($harga_per_barang, 0, ',', '.') . '</span>' : ''; ?></td>
- <td><?php echo $j === 0 ? 'Rp<span style="float: right; font-weight: 600">' .number_format($total_per_barang, 0, ',', '.') . '</span>' : ''; ?></td>
- </tr>
- <?php $j++; ?>
- <?php endforeach ?>
- <?php endforeach ?>
- <?php endforeach ?>
- <tr class="success">
- <td colspan="7"><strong>Total Harga</strong></td>
- <td><?php echo 'Rp<span style="float: right; font-weight: 800">' .number_format($total, 0, ',', '.') . '</span>' ?></td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </section>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment