orie

view

Sep 3rd, 2018
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.28 KB | None | 0 0
  1. <div class="row">
  2. <div class="col-lg-12">
  3. <ol class="breadcrumb">
  4. <li>
  5. <a href="<?php echo site_url('') ?>"><i class="icon-home"></i></a>
  6. </li>
  7. <li>
  8. <a href="<?php echo site_url('page/quotation') ?>">Quotation</a>
  9. </li>
  10. <li class="active">Detail</li>
  11. </ol>
  12. </div>
  13. </div>
  14.  
  15. <div class="row">
  16. <div class="col-lg-12">
  17.  
  18. <section class="panel">
  19. <header class="panel-heading">
  20. <dl class="dl-horizontal">
  21. <dt>Nama Proyek</dt>
  22. <dd><?php echo ucwords($quotation['judul']) ?></dd>
  23. <dt>No Quotation</dt>
  24. <dd><?php echo ucwords($quotation['no_quo']) ?></dd>
  25. <dt>Customer</dt>
  26. <dd><?php echo ucwords($quotation['nama_lengkap']) ?></dd>
  27. </dl>
  28. <!-- <ul class="list-unstyled" style="font-weight: 600">
  29. <li>Nama Proyek: <?php // echo ucwords($quotation['judul']) ?></li>
  30. <li>No Quotation: <?php // echo ucwords($quotation['no_quo']) ?></li>
  31. <li>Customer: <?php // echo ucwords($quotation['nama_lengkap']) ?></li>
  32. </ul> -->
  33. </header>
  34. <div class="panel-body">
  35. <div class="adv-table">
  36. <table cellpadding="0" cellspacing="0" border="0" class="display table table-bordered">
  37. <thead style="background:aqua">
  38. <tr>
  39. <th class="text-center">NO</th>
  40. <th>URAIAN ITEM SESUAI DESAIN</th>
  41. <th>MATERIAL & FINISHING</th>
  42. <th>MERK MATERIAL</th>
  43. <th>UNIT</th>
  44. <th>SAT</th>
  45. <th>HARGA @</th>
  46. <th>HARGA </th>
  47. </tr>
  48. </thead>
  49. <tbody>
  50. <?php
  51. $i = 0;
  52. $total = 0;
  53. $atoz = range('A','Z');
  54.  
  55. ?>
  56.  
  57.  
  58. <?php foreach($quotation['detail'] as $id_ruangan => $ruangan): ?>
  59. <?php
  60. $lantai = $ruangan['lantai'];
  61. if($lantai == 1 ){
  62.  
  63. $color = "#ff6666";
  64. }elseif($lantai == 2 ){
  65. $color = "#33adff";
  66. }elseif($lantai == 3){
  67. $color = "#b3b300";
  68. }elseif($lantai == 4){
  69. $color = " #8cff66";
  70. }elseif($lantai == 5){
  71. $color = "#d98cd9";
  72. }
  73.  
  74. ?>
  75. <tr style="background:<?php echo $color ;?>">
  76. <td colspan="8" style="border:2px solid;"><?php echo '<strong style="color:#333"> Lantai '.$ruangan['lantai'].' &nbsp;-&nbsp; '. ucwords($ruangan['nama_ruangan']) .'</strong>' ?></td>
  77. </tr>
  78.  
  79. <?php foreach ($ruangan['daftar_barang'] as $id_barang => $barang): ?>
  80. <?php $i++; ?>
  81. <?php
  82. $harga_per_barang = 0;
  83. if ($ket != 'belum') {
  84. $harga_per_barang = $barang['total_harga_barang'];
  85. }
  86. else {
  87. foreach ($barang['daftar_bahan'] as $id_bahan => $bahan) {
  88. $harga_per_barang += ($bahan['jumlah'] * $bahan['harga_bahan']);
  89. }
  90. }
  91.  
  92. $harga_per_barang += $barang['transportasi'] + $barang['tukang'] + $barang['lain_lain'];
  93. $harga_per_barang += $harga_per_barang * ($barang['margin']/100);
  94.  
  95. $total_per_barang = $harga_per_barang * $barang['jumlah_barang'];
  96. $total += $harga_per_barang * $barang['jumlah_barang'];
  97. ?>
  98. <?php
  99. $j = 0;
  100. $spek = $ket != 'belum' ? json_decode($barang['spesifikasi']) : $barang['spesifikasi'];
  101. foreach ($spek as $value):
  102. $exp = explode('-',$value);
  103. ?>
  104. <tr>
  105. <td class="text-center"><?php echo $j === 0 ? $i : '' ?></td>
  106. <td>
  107.  
  108. <em><?php echo $j === 0 ? "$barang[nama_barang] $barang[model] ($barang[kode_barang])" : ''; ?></em>
  109. </td>
  110. <td>
  111. -&nbsp;<?php echo $exp[0]; ?>
  112. </td>
  113. <td>
  114. -&nbsp;
  115. <?php
  116. if(isset($exp[1])){
  117. echo $exp[1] ;
  118. }
  119. ?>
  120. </td>
  121.  
  122. <td class="text-center">
  123. <?php echo $j === 0 ? $barang['jumlah_barang'] : ''; ?>
  124. </td>
  125. <td>
  126. <?php echo $j === 0 ? $barang['satuan_barang'] : ''; ?>
  127. </td>
  128.  
  129. <td><?php echo $j === 0 ? 'Rp<span style="float: right; font-weight: 600">' .number_format($harga_per_barang, 0, ',', '.') . '</span>' : ''; ?></td>
  130. <td><?php echo $j === 0 ? 'Rp<span style="float: right; font-weight: 600">' .number_format($total_per_barang, 0, ',', '.') . '</span>' : ''; ?></td>
  131. </tr>
  132. <?php $j++; ?>
  133. <?php endforeach ?>
  134. <?php endforeach ?>
  135. <?php endforeach ?>
  136.  
  137. <tr class="success">
  138. <td colspan="7"><strong>Total Harga</strong></td>
  139. <td><?php echo 'Rp<span style="float: right; font-weight: 800">' .number_format($total, 0, ',', '.') . '</span>' ?></td>
  140. </tr>
  141. </tbody>
  142. </table>
  143. </div>
  144. </div>
  145. </section>
  146. </div>
  147. </div>
Advertisement
Add Comment
Please, Sign In to add comment