@if(count($reportData) > 0)
Customer: {{ (isset($customer_id) && is_scalar($customer_id) && isset($customer[$customer_id])) ? $customer[$customer_id] : ($previousLedger->customer_name ?? 'N/A') }}
From: {{ date('d-M-Y', strtotime($start_date)) }} To: {{ date('d-M-Y', strtotime($end_date)) }}
| S/L | Date | Particulars | Branch-Ref NO | Sales/Pur. Payment (Debit) | Sales Return (Credit) | Collection / Purchase (Credit) | Due Balance |
|---|---|---|---|---|---|---|---|
| Previous Ledger ({{ date('d-M-Y', strtotime($start_date)) }}): | {{ number_format($previousTotalBill, 2) }} | 0.00 | {{ number_format($previousPaymentAmount, 2) }} | {{ number_format($previousDue, 2) }} | |||
| {{ $loop->iteration }} | {{ date('d-M-Y', strtotime($value->date)) }} | {{ ucwords(str_replace('_', ' ', $value->table_name)) }} | {{ $branchCode }}-{{ $value->code }} | {{ $row_debit > 0 ? number_format($row_debit, 2) : '' }} | {{ $row_return > 0 ? number_format($row_return, 2) : '' }} | {{ ($row_credit > 0 && $value->table_name != 'sale_return') ? number_format($row_credit, 2) : '' }} | {{ number_format($runningBalance, 2) }} |
| Final Ledger: | {{ number_format($totalDebit + $totalPurchasePayment + $previousTotalBill, 2) }} | {{ number_format($totalReturn, 2) }} | {{ number_format($totalCredit + $totalPurchase + $previousPaymentAmount, 2) }} | {{ number_format($runningBalance, 2) }} | |||
| MIS Snapshot (Summary) | |
|---|---|
| Total Sales (Invoice Amount) | {{ number_format($totalDebit, 2) }} |
| Total Collection (Cash/Bank) | {{ number_format($totalCredit, 2) }} |
| Total Sales Return | {{ number_format($totalReturn, 2) }} |
| Total Purchase (Combined) | {{ number_format($totalPurchase, 2) }} |
| Total Paid for Purchase | {{ number_format($totalPurchasePayment, 2) }} |
| Net Balance Status | @if($runningBalance > 0) Receivable: {{ number_format($runningBalance, 2) }} @else Payable: {{ number_format(abs($runningBalance), 2) }} @endif |