@extends('dashboard.layouts.app') @section('content') @php $balanceLabel = optional($account)->account_nature === 'credit' ? 'Credit' : 'Debit'; $hasAccount = !empty($account); $filterOptions = $filterOptions ?? [ 'costCenters' => collect(), 'partyTypes' => collect(), ]; $selectedPartyType = request('party_type'); $selectedPartyId = request('party_id'); $selectedPartyName = request('party_name'); @endphp
Finance / General Ledger
Ledger View
Reset
@if ($accounts->isNotEmpty())
Closing Balance
{{ number_format($closingBalance, 2) }} {{ $balanceLabel }}
Total Credit
{{ number_format($totalCredit, 2) }}
Total Debit
{{ number_format($totalDebit, 2) }}
Opening Balance
{{ number_format($openingBalance, 2) }}
@forelse ($rows as $row) @empty @endforelse
Posting Date Account Debit Credit Balance Voucher Type Voucher No Against Account Party Type Party Cost Center Supplier Invoice No Remarks
- Opening Balance {{ $openingRow['debit'] ? number_format($openingRow['debit'], 2) : '-' }} {{ $openingRow['credit'] ? number_format($openingRow['credit'], 2) : '-' }} {{ number_format($openingRow['balance'], 2) }} - - - - - - - Opening Balance
{{ optional($row['posting_date'] ?? $row['date'])->format('Y-m-d') ?: '-' }} @if (!empty($row['account_code']) && !empty($row['account_title'])) {{ $row['account_code'] }} - {{ $row['account_title'] }} @else {{ $row['account_title'] ?? $row['account_code'] ?? '-' }} @endif {{ $row['debit'] ? number_format($row['debit'], 2) : '-' }} {{ $row['credit'] ? number_format($row['credit'], 2) : '-' }} {{ number_format($row['balance'], 2) }} @php $voucherType = $row['voucher_type'] ?? '-'; $voucherClass = str_contains($voucherType, 'payment') ? 'is-payment' : (str_contains($voucherType, 'purchase') ? 'is-purchase' : (str_contains($voucherType, 'invoice') || str_contains($voucherType, 'sale') ? 'is-sale' : '')); @endphp {{ $voucherType !== '-' ? str($voucherType)->headline() : '-' }} {{ $row['voucher_no'] ?? '-' }} {{ $row['against_account'] ?? '-' }} {{ ($row['party_type'] ?? '-') !== '-' ? str($row['party_type'])->headline() : '-' }} {{ $row['party'] ?? '-' }} @if (($row['cost_center'] ?? '-') !== '-') {{ $row['cost_center'] }} @else - @endif {{ $row['supplier_invoice_no'] ?? '-' }} {{ $row['remarks'] ?? ($row['description'] ?? '-') }}
No transactions found for this account.
@if (method_exists($rows, 'links') && $rows->hasPages())
{{ $rows->withQueryString()->links() }}
@endif
@else
No accounts available.
@endif
@endsection