{{ __('accounting::filament/clusters/reporting.pages.partner-ledger.navigation.title') }}

From {{ \Carbon\Carbon::parse($data['date_from'])->format('F j, Y') }} to {{ \Carbon\Carbon::parse($data['date_to'])->format('F j, Y') }}

@php $totalDebit = 0; $totalCredit = 0; @endphp @foreach($data['partners'] as $partner) @php $totalDebit += $partner->period_debit; $totalCredit += $partner->period_credit; $isExpanded = in_array($partner->id, $expandedPartners ?? []); $runningBalance = $partner->opening_balance; @endphp {{-- Partner Header --}} {{-- Opening Balance --}} @if($partner->opening_balance != 0 && $isExpanded) @endif {{-- Move Lines --}} @if($isExpanded) @foreach($getPartnerMoves($partner->id) as $move) @php $runningBalance += ($move['debit'] - $move['credit']); @endphp @endforeach @endif @endforeach {{-- Totals --}}
{{ __('accounting::filament/clusters/reporting.common.partner') }} {{ __('accounting::filament/clusters/reporting.common.journal') }} {{ __('accounting::filament/clusters/reporting.common.account') }} {{ __('accounting::filament/clusters/reporting.common.invoice-date') }} {{ __('accounting::filament/clusters/reporting.common.due-date') }} {{ __('accounting::filament/clusters/reporting.common.debit') }} {{ __('accounting::filament/clusters/reporting.common.credit') }} {{ __('accounting::filament/clusters/reporting.common.balance') }}
{{ $partner->name }} {{ number_format($partner->period_debit, 2) }} {{ number_format($partner->period_credit, 2) }} {{ number_format($partner->ending_balance, 2) }}
{{ __('accounting::filament/clusters/reporting.common.opening-balance') }} {{ \Carbon\Carbon::parse($data['date_from'])->format('m/d/Y') }} {{ number_format($partner->opening_balance, 2) }}
{{ $move['move_name'] }}@if($move['ref']) ({{ $move['ref'] }})@endif {{ $move['journal_name'] ?? '' }} @if($move['account_code']){{ $move['account_code'] }} @endif{{ $move['account_name'] ?? '' }} {{ \Carbon\Carbon::parse($move['invoice_date'])->format('m/d/Y') }} {{ \Carbon\Carbon::parse($move['invoice_date_due'])->format('m/d/Y') }} {{ $move['debit'] > 0 ? number_format($move['debit'], 2) : '' }} {{ $move['credit'] > 0 ? number_format($move['credit'], 2) : '' }} {{ number_format($runningBalance, 2) }}
{{ __('accounting::filament/clusters/reporting.common.total') }} {{ number_format($totalDebit, 2) }} {{ number_format($totalCredit, 2) }}