sigd/resources/views/modules/reports/worksheet/tables/3C1a.blade.php

97 lines
4.5 KiB
PHP

<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 rowspan="4"></th>
<th>Area Burnt</th>
<th>Fraction are Burnt</th>
<th>Mass of fuel available for combustion</th>
<th>Combustion factor</th>
<th>Emission factor for each GHG</th>
<th>CH<sub>4</sub> emissions from fire</th>
<th>CO emissions from fire</th>
<th>N<sub>2</sub>O emissions from fire</th>
<th>NO<sub>x</sub> emissions from fire</th>
</tr>
<tr>
<th>(ha)</th>
<th>%</th>
<th>(tonnes ha-1)</th>
<th>(-)</th>
<th>[g GHG (kg dm burnt)<sup>-1</sup>]</th>
<th>(tonnes CH<sub>4</sub>)</th>
<th>(tonnes CO)</th>
<th>(tonnes N<sub>2</sub>O)</th>
<th>(tonnes NO<sub>x</sub>)</th>
</tr>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th>L<sub>fire</sub>-CH<sub>4</sub> = A * M<sub>B</sub> * C<sub>f</sub> * G<sub>ef</sub> *
10<sup>-3</sup></th>
<th>L<sub>fire</sub>-CO = A * M<sub>B</sub> * C<sub>f</sub> * G<sub>ef</sub> * 10<sup>-3</sup></th>
<th>L<sub>fire</sub>-N<sub>2</sub>O = A * M<sub>B</sub> * C<sub>f</sub> * G<sub>ef</sub> *
10<sup>-3</sup></th>
<th>L<sub>fire</sub>-NO<sub>x</sub> = A * M<sub>B</sub> * C<sub>f</sub> * G<sub>ef</sub> *
10<sup>-3</sup></th>
</tr>
<tr>
<th>A</th>
<th></th>
<th>M<sub>B</sub></th>
<th>C<sub>f</sub></th>
<th>G<sub>ef</sub></th>
<th>L<sub>fire</sub>-CH<sub>4</sub></th>
<th>L<sub>fire</sub>-CO</th>
<th>L<sub>fire</sub>-N<sub>2</sub>O</th>
<th>L<sub>fire</sub>-NO<sub>x</sub></th>
</tr>
</thead>
<tbody>
@php
$total_ch4 = $total_n2o = 0;
@endphp
@foreach ($emisiData as $data)
@php
$total_ch4 += $data->l_fire_ch4;
$total_n2o += $data->l_fire_n2o;
@endphp
<tr class="text-right">
<td class="text-left">{{ $data->activity->name }}</td>
<td>{{ $isExport ? $data->luas_panen : getFormattedValue($data->luas_panen) }}</td>
<td>{{ $isExport ? $data->ef_burnt_fraction : getFormattedValue($data->ef_burnt_fraction) }}</td>
<td>{{ $isExport ? $data->m_b : getFormattedValue($data->m_b) }}</td>
<td>{{ $isExport ? $data->ef_combustion_factor : getFormattedValue($data->ef_combustion_factor) }}</td>
<td>
{{ $isExport ? $data->ef_ch4 : getFormattedValue($data->ef_ch4) }}<br />
{{ $isExport ? $data->ef_co : getFormattedValue($data->ef_co) }}<br />
{{ $isExport ? $data->ef_n2o : getFormattedValue($data->ef_n2o) }}<br />
{{ $isExport ? $data->ef_nox : getFormattedValue($data->ef_nox) }}
</td>
<td>{{ $isExport ? $data->l_fire_ch4 : getFormattedValue($data->l_fire_ch4) }}</td>
<td>{{ $isExport ? $data->l_fire_co : getFormattedValue($data->l_fire_co) }}</td>
<td>{{ $isExport ? $data->l_fire_n2o : getFormattedValue($data->l_fire_n2o) }}</td>
<td>{{ $isExport ? $data->l_fire_nox : getFormattedValue($data->l_fire_nox) }}</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr class="text-right font-weight-bold">
<td class="text-center">Total</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>{{ $isExport ? $total_ch4 : getFormattedValue($total_ch4) }}</td>
<td></td>
<td>{{ $isExport ? $total_n2o : getFormattedValue($total_n2o) }}</td>
<td></td>
</tr>
</tfoot>
</table>
</div>