@push('header') @endpush {{-- Status Messages --}}
{{-- Validation Errors --}} @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif {{-- Filter Section --}}
{{-- Supplier --}}
{{-- Employee --}}
{{-- Customer --}}
{{-- Reference Number --}}
{{-- Posted Status --}}
{{-- Per Page --}}
{{-- Summary Card --}}
Total Opening Balances
{{ number_format($totalDebit, 2) }}
Total Entries
{{ $transactions->total() }}
@if ($selectedSupplier)
Supplier
{{ $selectedSupplier->short_name ?? $selectedSupplier->supplier_name }}
@endif
{{-- Main Report --}}
{{-- Report Header --}}

Moon Traders
Opening Customer Balance Report @if ($selectedSupplier)
{{ $selectedSupplier->supplier_name }} @endif

Printed by: {{ auth()->user()->name }} | {{ now()->format('d-M-Y h:i A') }}
{{-- Data Table --}}
@canany(['opening-customer-balance-edit', 'opening-customer-balance-delete', 'opening-customer-balance-post']) @endcanany @forelse ($transactions as $index => $transaction) @canany(['opening-customer-balance-edit', 'opening-customer-balance-delete', 'opening-customer-balance-post']) @endcanany @empty @if (isset($hasFilters) && !$hasFilters) @else @endif @endforelse {{-- Inline Add Form Row --}} @can('opening-customer-balance-create') @endcan {{-- Footer Totals --}}
Sr# Date Salesman Customer Opening Balance StatusActions
{{ $transactions->firstItem() + $index }} {{ $transaction->transaction_date->format('d.m.Y') }} {{ $transaction->account->employee->name ?? '-' }} ({{ $transaction->account->employee->employee_code ?? '' }}) {{ $transaction->account->customer->customer_name ?? '-' }} ({{ $transaction->account->account_number ?? '-' }}) @if ($transaction->account->customer->address) — {{ $transaction->account->customer->address }} @endif {{ number_format($transaction->debit, 2) }} @if ($transaction->isPosted()) @else Draft @endif @if (!$transaction->isPosted())
@can('opening-customer-balance-edit') @endcan @can('opening-customer-balance-post') @endcan @can('opening-customer-balance-delete') @endcan
@else @endif

Please select filters to view data

Choose a supplier, salesman, or customer from the filters above.

No opening customer balance entries found for the selected filters.
@csrf
+
Total ({{ $transactions->total() }} entries) {{ number_format($totalDebit, 2) }}
{{-- Add Entry Toggle Button & Export --}} @if (isset($hasFilters) && $hasFilters)
@can('opening-customer-balance-create') @endcan Export to Excel
@endif
{{-- Pagination --}} @if ($transactions->hasPages())
{{ $transactions->links() }}
@endif
{{-- Edit Modal with Backdrop Blur --}} @can('opening-customer-balance-edit') @endcan {{-- Delete Confirmation Modal --}} @can('opening-customer-balance-delete')

Are you sure you want to delete this opening balance? This action cannot be undone.

@endcan {{-- Post Confirmation Modal --}} @can('opening-customer-balance-post')

Are you sure you want to post this opening balance to the General Ledger? This action cannot be reversed.

@endcan @push('scripts') @endpush