@if(!empty($data)) @php $ttl_credit = 0; $ttl_jml_dana = 0; $ttl_tax = 0; $ttl_voucher = 0; $ttl_setor = 0; @endphp @foreach($data as $key => $transaction) @php $tabungan_transaksi = $transaction->tabungan_transaksi; $credit = 0; $jml_dana = 0; $tax_percent = 0; $tax_nominal = 0; $voucher_code = 0; $voucher_nominal = 0; $total_dana_setor = 0; if(count($tabungan_transaksi) > 0) { $credit = $tabungan_transaksi[0]->credit; $jml_dana = $tabungan_transaksi[0]->jumlah_dana; $tax_percent = $tabungan_transaksi[0]->pajak_terhitung; $tax_nominal = $tabungan_transaksi[0]->pajak_asli; $voucher = $tabungan_transaksi[0]->transaksi_voucher_lakuemasbeli; if($voucher) { $voucher_code = $voucher->voucher_code; $voucher_nominal = $voucher->voucher_nominal; } $total_dana_setor = $tabungan_transaksi[0]->total_dana_setor; } $ttl_credit += $credit; $ttl_jml_dana += $jml_dana; $ttl_tax += $tax_nominal; $ttl_voucher += $voucher_nominal; $ttl_setor += $total_dana_setor; @endphp @endforeach @endif
No Code Tipe Transaksi Date Approve Credit Jumlah Dana Tax (%) Tax Nominal Voucher Code Voucher Nominal Total Setor Dana
{{ $key + 1 }} {{ $transaction->code }} {{ $transaction->transaksi_type->type }} {{ date('d M Y', strtotime($transaction->date_approved)) }} {{ $credit }} {{ $jml_dana }} {{ $tax_percent }} {{ $tax_nominal }} {{ $voucher_code }} {{ $voucher_nominal }} {{ $total_dana_setor }}
TOTAL {{ $ttl_credit }} {{ $ttl_jml_dana }} {{ $ttl_tax }} {{ $ttl_voucher }} {{ $ttl_setor }}