Advertisement
gundambison

solusi 001

Jul 5th, 2020
1,121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.16 KB | None | 0 0
  1. @foreach($reportShow as $rpt)
  2.                         <tr>
  3.                           <td>{{ $rpt->tahun_tanam }}</td>
  4.                           <td>{{ $rpt->company->name }}</td>
  5.                           @if($rpt->divisi_id == 0)
  6.                           <td></td>
  7.                           @else
  8.                           <td>{{ $rpt->divisi->name }}</td>
  9.                           @endif
  10.                           <td>{{ $rpt->realisasi_luastm }}</td>
  11.                           <td>{{ $rpt->anggaran_luastm }}</td>
  12.                           <td>{{ $rpt->realisasi_bi_produksi }}</td>
  13.                           <td>{{ $rpt->anggaran_bi_produksi }}</td>
  14.                           <td>{{ $rpt->realisasi_sdbi_produksi }}</td>
  15.                           <td>{{ $rpt->anggaran_sdbi_produksi }}</td>
  16.                           <td>{{ $rpt->anggaran_th_produksi }}</td>
  17.                           <td>{{ $rpt->kgha_bi }}</td>
  18.                           <td>{{ $rpt->kgha_sdbi }}</td>
  19.                           <td>{{ $rpt->anggaran_th_kgha }}</td>
  20.                         </tr>
  21.                         <!--tr>
  22.                           <th colspan="3" class="align-middle">Subtol Total</th>
  23.                           <th class="align-middle">{{ $realisasi_luastm }}</th>
  24.                           <th class="align-middle">{{ $anggaran_luastm }}</th>
  25.                           <th class="align-middle">{{ $realisasi_bi_produksi }}</th>
  26.                           <th class="align-middle">{{ $anggaran_bi_produksi }}</th>
  27.                           <th class="align-middle">{{ $realisasi_sdbi_produksi }}</th>
  28.                           <th class="align-middle">{{ $anggaran_sdbi_produksi }}</th>
  29.                           <th class="align-middle">{{ $anggaran_th_produksi }}</th>
  30.                           <th class="align-middle">{{ $kgha_bi }}</th>
  31.                           <th class="align-middle">{{ $kgha_sdbi }}</th>
  32.                           <th class="align-middle">{{ $anggaran_th_kgha }}</th>
  33.                         </tr-->
  34. <?php
  35.  
  36. if(!isset($thn)){
  37.     $tahun=$rpt->tahun_tanam;
  38.     $sub_realisasi_luastm=0;
  39.     $null = 'on progress';
  40. }
  41.  
  42. if($thn == $rpt->tahun_tanam){
  43.     $sub_realisasi_luastm+=$rpt->realisasi_luastm; //maaf sesuaikan aja
  44. }
  45. else{
  46. ?>
  47.  
  48.                         <tr>
  49.                           <td>{{ $tahun }}</td>
  50.                           <td>{{ $rpt->company->name }}</td>
  51.                           @if($rpt->divisi_id == 0)
  52.                           <td></td>
  53.                           @else
  54.                           <td>{{ $rpt->divisi->name }}</td>
  55.                           @endif
  56.                           <td>{{ $sub_realisasi_luastm }}</td>
  57.                           <td>{{ $null }}</td>
  58.                           <td>{{ $null }}</td>
  59.                           <td>{{ $null }}</td>
  60.                           <td>{{ $null }}</td>
  61.                           <td>{{ $null }}</td>
  62.                           <td>{{ $null }}</td>
  63.                           <td>{{ $null }}</td>
  64.                           <td>{{ $null }}</td>
  65.                           <td>{{ $null }}</td>
  66.                         </tr>
  67. <?php
  68.     $sub_realisasi_luastm=0;//reset
  69. }                      
  70. @endforeach
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement