{{ $lokasi[0]['nama'] }}

LAPORAN SALDO PINJAMAN PER MITRA

{{ $periode }}
@php $th_col = ["no","kode_mitra","nama_mitra","total_pinjaman","bagi_hasil","pengembalian_pokok","total_angsuran","bayar_bagi_hasil","bayar_pokok","total_bayar","saldo"]; $th_width = ["30px","80px","170px","90px","90px","90px","90px","90px","90px","90px","90px"]; $idx_num = [3,4,5,6,7,8,9,10]; @endphp
@for ($c=0; $c < count($th_col); $c++) @php $col = str_replace("_"," ",$th_col[$c]); $col = ucwords($col); @endphp @endfor @php $no=$start + 1; $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++) @if(in_array($c, $idx_num)) @php $tot[$th_col[$c]] += floatval($line2[$th_col[$c]]); @endphp @else @endif @endfor @php $no++; @endphp @endfor @for ($c=3; $c < count($th_col); $c++) @if(in_array($c, $idx_num)) @else @endif @endfor
{{ $col }}
{{ App\Helper\SaiHelpers::number_format_decimal($line2[$th_col[$c]],$export_type) }} {{ $line2[$th_col[$c]] }}
Total{{ App\Helper\SaiHelpers::number_format_decimal($tot[$th_col[$c]],$export_type) }}