@php
$th_label = ["No","No Registrasi","Nama","Saldo Awal","Masuk","Keluar","Saldo Akhir"];
$th_col = ["no", "no_reg", "nama", "so_awal", "debet", "kredit", "so_akhir"];
$th_width = ["4%","18%","30%","12%","12%","12%","12%"];
@endphp
@for ($c=0; $c < count($th_col); $c++)
@php
$col = $th_label[$c];
@endphp
@endfor
@php
$no=$start + 1;
$idx_num = [3,4,5,6];
$tot = [];
foreach($idx_num as $idx){
$tot[$th_col[$idx]] = 0;
}
@endphp
@for($x=0; $x < count($data); $x++)
@php
$line2 = $data[$x];
@endphp
@for ($c=0; $c < count($th_col); $c++)
@php
if($c >= 3){
$tot[$th_col[$c]] += floatval($line2[$th_col[$c]]);
}
@endphp
@if($export_type == "excel")
{{ $line2[$th_col[$c]] }}
@else
@if($c >= 3)
{{ number_format($line2[$th_col[$c]],0,",",".") }}
@else
{{ $line2[$th_col[$c]] }}
@endif
@endif
|
@endfor
@php
$no++;
@endphp
@endfor
Total |
@for ($c=3; $c < count($th_col); $c++)
@if(in_array($c, $idx_num))
{{ App\Helper\SaiHelpers::number_format_decimal($tot[$th_col[$c]],$export_type) }} |
@else
|
@endif
@endfor