@extends('admin.accounting._layout') @php $reportTitle = $config['title'] ?? 'Accounting'; $viewType = $config['view'] ?? 'party_balance'; @endphp @section('accounting_content')

{{ $config['title'] }}

@if(!empty($config['about']))

{{ $config['about'] }}

@endif
@if($viewType !== 'party_balance') @php $extraFilterHtml = ''; if (!empty($config['requires_item'])) { $extraFilterHtml .= view('admin.accounting.partials.filter-item', [ 'items' => $items, 'selectedItemId' => $filters['item_id'] ?? '', ])->render(); } if ($viewType === 'cash_book') { $extraFilterHtml .= view('admin.accounting.partials.filter-cash-book', [ 'filters' => $filters, 'paymentKinds' => $paymentKinds, ])->render(); } @endphp
{{ $config['date_label'] ?? 'Period' }}
to
{!! $extraFilterHtml !!}
@else
Live balances

Outstanding amounts are calculated from current ledger balances.

@endif
@if($viewType === 'item_ledger' && empty($filters['item_id'])) @include('partials.admin.module-hub.empty', [ 'icon' => 'ri-archive-line', 'title' => 'Select an item', 'text' => 'Choose an item and date range above, then click Apply to view the ledger and export.', ]) @elseif($viewType === 'item_ledger' && $item)
{{ \Carbon\Carbon::parse($date_from)->format('M j, Y') }} — {{ \Carbon\Carbon::parse($date_to)->format('M j, Y') }}
@include('admin.accounting.partials.item-detail', ['item' => $item]) @include('admin.accounting.partials.ledger-table', ['ledgerMode' => $ledger_mode ?? 'stock']) @elseif($viewType === 'cash_book') @include('admin.accounting.partials.cash-book-table') @elseif($viewType === 'profit_loss') @include('admin.accounting.partials.profit-loss-table') @elseif($viewType === 'inventory_book') @include('admin.accounting.partials.inventory-book-table') @else @include('admin.accounting.partials.party-balance-table') @endif
@endsection @push('scripts') @endpush