Some checks failed
Tests / PHP 8.1 (push) Has been cancelled
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
27 lines
870 B
PHP
27 lines
870 B
PHP
@php
|
|
$totals = array_replace(
|
|
array_fill_keys($class->dates ?? [], 0),
|
|
$class->footer_totals[$table_key] ?? []
|
|
);
|
|
|
|
$grand_total = array_sum($totals);
|
|
@endphp
|
|
|
|
<tfoot>
|
|
<tr>
|
|
<td class="{{ $class->column_name_width }} w-24 py-4 ltr:text-left rtl:text-right text-black-400 font-bold uppercase">
|
|
{{ trans('reports.total_' . $table_key) }}
|
|
</td>
|
|
|
|
@foreach($totals as $total)
|
|
<td class="{{ $class->column_value_width }} py-4 ltr:text-right rtl:text-left text-black-400 font-medium text-xs print-alignment">
|
|
<x-money :amount="$total" />
|
|
</td>
|
|
@endforeach
|
|
|
|
<td class="{{ $class->column_name_width }} py-4 ltr:text-right rtl:text-left text-black-400 font-medium text-xs print-alignment">
|
|
<x-money :amount="$grand_total" />
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|