{{-- Account Ledger Report - Data Table partial (loaded via AJAX) --}}
{{ $ledger->ledger_name }} @if($ledger->accountGroup) ({{ $ledger->accountGroup->a_group_name }}) @endif
{{ date('d-M-Y', strtotime($fromDate)) }} to {{ date('d-M-Y', strtotime($toDate)) }}
{{-- OPENING BALANCE ROW --}} @php $runningBalance = $openingBalance; $totalDebit = 0; $totalCredit = 0; @endphp @forelse ($transactionsWithParticulars as $index => $txn) @php $debit = $txn['debit'] ?? 0; $credit = $txn['credit'] ?? 0; $runningBalance += ($debit - $credit); $totalDebit += $debit; $totalCredit += $credit; @endphp @empty @endforelse {{-- CLOSING BALANCE / TOTALS ROW --}}
S. No. Date Particulars Supplier Invoice No. Narration Voucher Number Voucher Type Debit Credit Balance
Opening Balance {{ number_format(abs($openingBalance), 2) }} {{ $openingBalance >= 0 ? 'Dr' : 'Cr' }}
{{ $index + 1 }} {{ date('d-M-Y', strtotime($txn['date'])) }} {{ $txn['particulars'] }} {{ $txn['supplier_invoice_no'] }} {{ $txn['narration'] }} {{ $txn['voucher_no'] }} @if($txn['source_link']) {{ $txn['voucher_type'] }} @else {{ $txn['voucher_type'] }} @endif {{ $debit > 0 ? number_format($debit, 2) : '' }} {{ $credit > 0 ? number_format($credit, 2) : '' }} {{ number_format(abs($runningBalance), 2) }} {{ $runningBalance >= 0 ? 'Dr' : 'Cr' }}
No transactions found in this date range.
Total Balance {{ number_format($totalDebit, 2) }} {{ number_format($totalCredit, 2) }} {{ number_format(abs($runningBalance), 2) }} {{ $runningBalance >= 0 ? 'Dr' : 'Cr' }}