37 lines
1.5 KiB
PHP
37 lines
1.5 KiB
PHP
@php
|
|
$isExport = $isExport ?? false;
|
|
$totalCo2 = $totalCh4 = $totalN2o = $totalCo2eq = 0;
|
|
foreach ($crfData as $data) {
|
|
$totalCo2 += $data->co2 ?? 0;
|
|
$totalCh4 += $data->ch4 ?? 0;
|
|
$totalN2o += $data->n2o ?? 0;
|
|
$totalCo2eq += $data->co2eq ?? 0;
|
|
}
|
|
@endphp
|
|
<div class="table-responsive" style="overflow-x: auto;">
|
|
<table class="table table-bordered table-striped" style="min-width: 1095px;width: 700px;">
|
|
<thead class="table-info text-white text-center">
|
|
<tr>
|
|
<th class="align-middle" width="50%">Kategori</th>
|
|
<th width="120">CO<sub>2</sub><br>(Gg)</th>
|
|
<th width="120">CH<sub>4</sub><br>(Gg)</th>
|
|
<th width="120">N<sub>2</sub>O<br>(Gg)</th>
|
|
<th width="120">CO<sub>2</sub> Eq<br>(Gg)</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($worksheets as $main)
|
|
@include('modules.reports.crf.row', ['worksheet' => $main, 'level' => 0])
|
|
@endforeach
|
|
|
|
<tr class="text-right font-weight-bold">
|
|
<td class="text-left" style="padding-left: 20px">TOTAL</td>
|
|
<td>{{ $isExport ? $totalCo2 : getFormattedValue($totalCo2, 2) }}</td>
|
|
<td>{{ $isExport ? $totalCh4 : getFormattedValue($totalCh4, 2) }}</td>
|
|
<td>{{ $isExport ? $totalN2o : getFormattedValue($totalN2o, 2) }}</td>
|
|
<td>{{ $isExport ? $totalCo2eq : getFormattedValue($totalCo2eq, 2) }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|