{{-- resources/views/exports/receipt-payments-pdf.blade.php
Rendered by ReportsController::exportReceiptPayments(), landscape.
$data holds accounts (one entry per bank/cash ledger), grand_totals,
from_date and to_date.
Each account carries account{name,code}, opening_balance, total_receipts,
total_payments, total_contra_in, total_contra_out and closing_balance —
the same columns ReceiptPaymentsSummarySheet writes. --}}
Receipt & Payments
@include('exports._report-styles')
{{ \Carbon\Carbon::parse($data['from_date'])->format('d/m/Y') }}
to
{{ \Carbon\Carbon::parse($data['to_date'])->format('d/m/Y') }}
@php $money = fn ($v) => number_format((float) $v, 2); @endphp
| Account |
Code |
Opening |
Receipts |
Payments |
Contra In |
Contra Out |
Closing |
@forelse ($data['accounts'] ?? [] as $account)
| {{ $account['account']['name'] ?? '' }} |
{{ $account['account']['code'] ?? '' }} |
{{ $money($account['opening_balance'] ?? 0) }} |
{{ $money($account['total_receipts'] ?? 0) }} |
{{ $money($account['total_payments'] ?? 0) }} |
{{ $money($account['total_contra_in'] ?? 0) }} |
{{ $money($account['total_contra_out'] ?? 0) }} |
{{ $money($account['closing_balance'] ?? 0) }} |
@empty
| No bank or cash accounts with activity in this period. |
@endforelse
@if (! empty($data['accounts']))
| GRAND TOTAL |
{{ $money($data['grand_totals']['opening_balance'] ?? 0) }} |
{{ $money($data['grand_totals']['total_receipts'] ?? 0) }} |
{{ $money($data['grand_totals']['total_payments'] ?? 0) }} |
{{ $money($data['grand_totals']['total_contra_in'] ?? 0) }} |
{{ $money($data['grand_totals']['total_contra_out'] ?? 0) }} |
{{ $money($data['grand_totals']['closing_balance'] ?? 0) }} |
@endif
{{-- Per-account transaction detail, mirroring ReceiptPaymentsAccountSheet.
Only rendered for accounts that actually moved, so a report over a quiet
period stays one page rather than a run of empty tables. --}}
@foreach ($data['accounts'] ?? [] as $account)
@php $transactions = $account['transactions'] ?? []; @endphp
@if (! empty($transactions))
{{ $account['account']['name'] ?? '' }}
({{ $account['account']['code'] ?? '' }})
| Date |
Entry |
Particulars |
Receipt |
Payment |
@foreach ($transactions as $txn)
| {{ ! empty($txn['date']) ? \Carbon\Carbon::parse($txn['date'])->format('d/m/Y') : '' }} |
{{ $txn['entry_code'] ?? ($txn['number'] ?? '') }} |
{{ $txn['narration'] ?? ($txn['details'] ?? '') }} |
{{ ($txn['receipt'] ?? 0) ? $money($txn['receipt']) : '' }} |
{{ ($txn['payment'] ?? 0) ? $money($txn['payment']) : '' }} |
@endforeach
@endif
@endforeach