sigd/resources/views/modules/reports/worksheet/tables/1A1a.blade.php

80 lines
3.7 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></th>
<th colspan="3">Energy Consumption</th>
<th colspan="2">CO<sub>2</sub></th>
<th colspan="2">CH<sub>4</sub></th>
<th colspan="2">N<sub>2</sub>O</th>
</tr>
<tr>
<th rowspan="3">Bahan Bakar</th>
<th>A</th>
<th>B</th>
<th>C = A x B</th>
<th>D</th>
<th>E = C x D / 10<sup>6</sup></th>
<th>F</th>
<th>G = C x F / 10<sup>6</sup></th>
<th>H</th>
<th>I = C x H / 10<sup>6</sup></th>
</tr>
<tr>
<th>Consumption</th>
<th>Conversion Factor</th>
<th>Consumption</th>
<th>CO<sub>2</sub> Emission Factor</th>
<th>CO<sub>2</sub> Emissions</th>
<th>CH<sub>4</sub> Emission Factor</th>
<th>CH<sub>4</sub> Emissions</th>
<th>N<sub>2</sub>O Emission Factor</th>
<th>N<sub>2</sub>O Emissions</th>
</tr>
<tr>
<th>(Mass, Volume, or Energy Unit)</th>
<th>TJ / Unit</th>
<th>TJ</th>
<th>kg CO<sub>2</sub> / TJ</th>
<th>Gg CO<sub>2</sub></th>
<th>kg CH<sub>4</sub> / TJ</th>
<th>Gg CH<sub>4</sub></th>
<th>kg N<sub>2</sub>O / TJ</th>
<th>Gg N<sub>2</sub>O</th>
</tr>
</thead>
<tbody>
@php
$total_co2 = $total_ch4 = $total_n2o = 0;
@endphp
@foreach ($emisiData as $data)
@php
$total_co2 += $data->emission_co2;
$total_ch4 += $data->emission_ch4;
$total_n2o += $data->emission_n2o;
@endphp
<tr class="text-right">
<td class="text-left">{{ $data->activity->name }}</td>
<td>{{ $isExport ? $data->value : getFormattedValue($data->value, 3) }}</td>
<td>{{ $isExport ? $data->ef_cf : getFormattedValue($data->ef_cf) }}</td>
<td>{{ $isExport ? $data->consumption_tj : getFormattedValue($data->consumption_tj, 2) }}</td>
<td>{{ $isExport ? $data->ef_co2 : getFormattedValue($data->ef_co2) }}</td>
<td>{{ $isExport ? $data->emission_co2 : getFormattedValue($data->emission_co2, 4) }}</td>
<td>{{ $isExport ? $data->ef_ch4 : getFormattedValue($data->ef_ch4) }}</td>
<td>{{ $isExport ? $data->emission_ch4 : getFormattedValue($data->emission_ch4, 4) }}</td>
<td>{{ $isExport ? $data->ef_n2o : getFormattedValue($data->ef_n2o) }}</td>
<td>{{ $isExport ? $data->emission_n2o : getFormattedValue($data->emission_n2o, 4) }}</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr class="text-right font-weight-bold">
<td class="text-center" colspan="4">Total</td>
<td colspan="2">{{ $isExport ? $total_co2 : getFormattedValue($total_co2, 4) }}</td>
<td colspan="2">{{ $isExport ? $total_ch4 : getFormattedValue($total_ch4, 4) }}</td>
<td colspan="2">{{ $isExport ? $total_n2o : getFormattedValue($total_n2o, 4) }}</td>
</tr>
</tfoot>
</table>
</div>