Account Ledger Report

@php $balance = 0; $totalDebit = 0; $totalCredit = 0; @endphp @foreach($data as $row) @php $amount = floatval($row->Amount); $balance += $amount; if ($amount > 0) $totalDebit += $amount; if ($amount < 0) $totalCredit += abs($amount); @endphp @endforeach
Voucher Date Debit Credit Balance Remarks Site
{{ $row->Voucher }} {{ $row->Voucher_Date }} {{ $amount > 0 ? number_format($amount, 2) : '' }} {{ $amount < 0 ? number_format(abs($amount), 2) : '' }} {{ number_format($balance, 2) }} {{ $row->Remarks }} {{ $row->Cheque_No }}
Total: {{ number_format($totalDebit, 2) }} {{ number_format($totalCredit, 2) }} {{ number_format($balance, 2) }}