@props([ 'ledgers' => null, 'showDateColumn' => false, 'showBranchColumn' => false, ])
{{ __('general.ledger_journal') }}
@if($showDateColumn) @endif @if($showBranchColumn) @endif @php /** * @var \App\Models\Ledger $ledger */ @endphp @foreach($ledgers as $key => $ledger) @if($showDateColumn) @endif @if($showBranchColumn) @endif @endforeach
{{ __('validation.attributes.date') }}{{ __('general.branch') }}{{ __('general.coa') }} {{ __('validation.attributes.name') }} {{ __('validation.attributes.debit_amount') }} {{ __('validation.attributes.credit_amount') }}
{{ $ledger->date_display }} {{ $ledger->branch->name }} {{ $ledger->coa->code }} {{ $ledger->coa->name }} {{ accounting_format($ledger->debit_amount, 2) }} {{ accounting_format($ledger->credit_amount, 2) }}
{{ __('general.total') }} {{ accounting_format($ledgers->sum('debit_amount'), 2) }} {{ accounting_format($ledgers->sum('credit_amount'), 2) }}