@php $voucherMode = old('voucher_type', request('mode', 'cash_receipt')); $voucherMode = in_array($voucherMode, ['cash_receipt', 'petty_cash', 'journal_voucher'], true) ? $voucherMode : 'cash_receipt'; $today = now()->format('Y-m-d'); $firstTreasury = $treasuries->first(); $firstAccount = $accounts->first(); $oldTreasuryAccountId = old('treasury_account_id'); $partyTypes = $partyTypes ?? []; $accountRequiresCostCenter = fn ($account) => str_contains(strtolower((string) $account->account_type), 'revenue') || str_contains(strtolower((string) $account->account_type), 'income') || str_contains(strtolower((string) $account->account_type), 'expense') || str_contains(strtolower((string) $account->account_type), 'cost') || str_contains(strtolower((string) ($account->account_subtype ?? '')), 'revenue') || str_contains(strtolower((string) ($account->account_subtype ?? '')), 'income') || str_contains(strtolower((string) ($account->account_subtype ?? '')), 'expense') || str_contains(strtolower((string) ($account->account_subtype ?? '')), 'cost'); @endphp
Transfer Between Accounts
@csrf
Current Balance: 0.00
@csrf
Current Balance: 0.00
@csrf
@for ($i = 0; $i < max(2, count(old('lines', []))); $i++) @php $oldLine = old("lines.$i", []); @endphp
@endfor
Debit 0.00 Credit 0.00 Difference 0.00
Registered Vouchers

Latest vouchers posted from this treasury screen.

All Cash Receipt Petty Cash Journal Voucher
@forelse ($voucherEntries as $entry) {{ $entry->reference_no }} {{ $entry->voucher_type_label }} {{ $entry->date?->format('Y-m-d') }} {{ $entry->description ?: '-' }} {{ $entry->party_type_label }} {{ $entry->party_label }} {{ $entry->treasury_label }} {{ $entry->display_debit_amount !== null ? number_format((float) $entry->display_debit_amount, 2) : '-' }} {{ $entry->display_credit_amount !== null ? number_format((float) $entry->display_credit_amount, 2) : '-' }} {{ $entry->status }} @empty
No vouchers yet. Add a voucher from the form above.
@endforelse
Showing {{ $voucherEntries->total() }} vouchers