@extends('layouts.inspinia') @section('title', 'Supplier Statement — ' . $supplier->name) @section('content_header', 'Supplier Statement — ' . $supplier->name) @section('breadcrumb') @endsection @section('content') {{-- Supplier Summary --}}
{{ $supplier->name }} Balance: {{ number_format($currentBalance, 2) }}
Back @can('supplier_statement.view') Print Statement @endcan
Name{{ $supplier->name }}
Phone{{ $supplier->phone ?? '—' }}
Email{{ $supplier->email ?? '—' }}
TIN{{ $supplier->tin ?? '—' }}
VRN{{ $supplier->vrn ?? '—' }}
Credit Days{{ $supplier->credit_days ?? '—' }}
Current Balance {{ number_format($currentBalance, 2) }}
Total Debits {{ number_format($totalDebit, 2) }} Payments posted (balance reduces)
Total Credits {{ number_format($totalCredit, 2) }} Invoices posted (balance increases)
{{-- Filters --}}
Filters
{{-- Debit/Credit Legend --}}
How to read this statement:   Credit = Supplier Invoice posted → payable increases.    Debit = Supplier Payment posted → payable decreases.    A positive balance means this company owes the supplier.
{{-- Ledger Entries --}}
Ledger Entries
@forelse($ledgerEntries as $entry) @empty @endforelse @if($ledgerEntries->isNotEmpty()) @endif
Date Document Description Type Credit (Invoice) Debit (Payment) Balance After Actions
{{ $entry->entry_date?->format('d-m-Y') }} {{ $entry->document_number }} {{ $entry->description }} {{ $entry->entry_type === 'supplier_invoice_posting' ? 'Invoice' : 'Payment' }} {{ $entry->credit_amount > 0 ? number_format($entry->credit_amount, 2) : '—' }} {{ $entry->debit_amount > 0 ? number_format($entry->debit_amount, 2) : '—' }} {{ number_format($entry->balance_after, 2) }} @if($entry->supplierInvoice) @endif
No ledger entries found for the selected period.
Totals {{ number_format($totalCredit, 2) }} {{ number_format($totalDebit, 2) }} {{ number_format($closingBalance, 2) }}
@if($ledgerEntries->hasPages())
{{ $ledgerEntries->links() }}
@endif
@endsection