76 lines
3.3 KiB
PHP
76 lines
3.3 KiB
PHP
@php
|
|
$activity = $activity ?? 'sisa_makanan';
|
|
@endphp
|
|
<div class="table-responsive" style="overflow-x: auto;">
|
|
<table class="table table-bordered table-striped" style="min-width: 1095px;">
|
|
<thead class="table-info text-white text-center">
|
|
<tr>
|
|
<th>Year</th>
|
|
<th>Amount deposited</th>
|
|
<th>Dry matter content</th>
|
|
<th>MCF</th>
|
|
<th>Decomposable DOC (DDOCm) deposited</th>
|
|
<th>DDOCm not reacted.<br>Deposition year</th>
|
|
<th>DDOCm decomposed.<br>Deposition year</th>
|
|
<th>DDOCm accumulated in SWDS end of year</th>
|
|
<th>DDOCm decomposed</th>
|
|
<th>CH<sub>4</sub> generated</th>
|
|
</tr>
|
|
<tr>
|
|
<th></th>
|
|
<th>W</th>
|
|
<th>dm</th>
|
|
<th>MCF</th>
|
|
<th>D = W * dm * DOC * DOCf * MCF</th>
|
|
<th>B = D * exp2</th>
|
|
<th>C = D * (1 - exp2)</th>
|
|
<th>H = B + (H<sub>lastyear</sub> * exp1)</th>
|
|
<th>E = C + H<sub>lastyear</sub> * (1 - exp1)</th>
|
|
<th>Q = E * 16 / 12 * F</th>
|
|
</tr>
|
|
<tr>
|
|
<th></th>
|
|
<th>Gg</th>
|
|
<th>fraction</th>
|
|
<th>fraction</th>
|
|
<th>Gg</th>
|
|
<th>Gg</th>
|
|
<th>Gg</th>
|
|
<th>Gg</th>
|
|
<th>Gg</th>
|
|
<th>Gg</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@php
|
|
$total = 0;
|
|
@endphp
|
|
@foreach ($emisiData as $data)
|
|
@if ($data->activity_code === $activity)
|
|
@php
|
|
$total += $data->ch4;
|
|
@endphp
|
|
<tr class="text-right">
|
|
<td class="text-left"></td>
|
|
<td>{{ $isExport ? $data->amount : getFormattedValue($data->amount) }}</td>
|
|
<td>{{ $isExport ? $data->dry_matter : getFormattedValue($data->dry_matter) }}</td>
|
|
<td>{{ $isExport ? $data->ef_mcf : getFormattedValue($data->ef_mcf) }}</td>
|
|
<td>{{ $isExport ? $data->ddocm_deposited : getFormattedValue($data->ddocm_deposited, 4) }}</td>
|
|
<td>{{ $isExport ? $data->ddocm_unreacted : getFormattedValue($data->ddocm_unreacted, 4) }}</td>
|
|
<td>{{ $isExport ? $data->ddocm_decomposed_1 : getFormattedValue($data->ddocm_decomposed_1, 4) }}</td>
|
|
<td>{{ $isExport ? $data->ddocm_accumulated : getFormattedValue($data->ddocm_accumulated, 4) }}</td>
|
|
<td>{{ $isExport ? $data->ddocm_decomposed_2 : getFormattedValue($data->ddocm_decomposed_2, 4) }}</td>
|
|
<td>{{ $isExport ? $data->ch4 : getFormattedValue($data->ch4, 4) }}</td>
|
|
</tr>
|
|
@endif
|
|
@endforeach
|
|
</tbody>
|
|
<tfoot>
|
|
<tr class="text-right font-weight-bold">
|
|
<td class="text-center" colspan="9">Total</td>
|
|
<td>{{ $isExport ? $total : getFormattedValue($total, 4) }}</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|