@if ($errors->any())
Errors:
@foreach ($errors->all() as $error)
- {{ $error }}
@endforeach
@endif
{{-- ════════ LEDGER RESULT ════════ --}}
@if($ledgerData !== null)
@if(count($ledgerData) <= 1)
اس کھاتے کے لیے کوئی اندراج نہیں ملا۔
@else
{{-- Summary row --}}
کل ڈیبٹ (Total Debit)
{{ number_format($totalDebit, 0) }}
کل کریڈٹ (Total Credit)
{{ number_format($totalCredit, 0) }}
بقایا (Balance)
{{ number_format(abs($totalCredit - $totalDebit), 0) }}
@if($totalCredit != $totalDebit)
{{ ($totalCredit - $totalDebit) > 0 ? 'Cr' : 'Dr' }}
@endif
{{-- Ledger Table (exact image layout) --}}
{{-- Company Header --}}
{{-- Khata Info Row --}}
کھاتہ {{ $supplierList[$selectedKhata] ?? 'سپلائر #'.$selectedKhata }}
کھا تہ رجسٹر
کھاتہ کوڈ {{ $selectedKhata }}
| تاریخ |
تفصیل |
ڈ یبٹ رقم |
کریڈٹ رقم |
میزان |
@foreach($ledgerData as $row)
@if($row['is_opening'])
{{--
| {{ $row['date'] }} |
Opening Balance
|
0 |
|
--}}
@else
| {{ $row['date'] }} |
{{ $row['detail'] }} |
{{ $row['debit'] ? number_format($row['debit'], 0) : '' }}
|
{{ $row['credit'] ? number_format($row['credit'], 0) : '' }}
|
{{ number_format($row['balance'], 0) }}
|
{{ $row['dr_cr'] }} |
@endif
@endforeach
{{-- Total Row --}}
| کُل |
{{ number_format($totalDebit, 0) }} |
{{ number_format($totalCredit, 0) }} |
|
{{-- .ledger-wrap --}}
@endif
@endif
{{-- end results --}}