@include('admin.header') @section('title', $buyer->company_name . ' - Payment Ledger') Back to Ledger Add Payment Export PDF
Ledger Summary
Buyer: {{ $buyer->contact_person }}
Total Payments In: ${{ number_format($ledger->total_in, 2) }}
Total Allocations Out: ${{ number_format($ledger->total_out, 2) }}
Current Balance: ${{ number_format($ledger->current_balance, 2) }}
Last Updated: {{ $ledger->last_updated->format('M d, Y H:i') }}
Buyer Information
  • Contact: {{ $buyer->contact_person }}
  • Email: {{ $buyer->email }}
  • Phone: {{ $buyer->phone }}
  • Address: {{ $buyer->address }}
Payment History
@foreach($advancePayments as $payment) @endforeach
Date Reference Order Amount Allocated Balance Status Actions
{{ $payment->payment_date->format('M d, Y') }} {{ $payment->reference_number }} {{ $payment->orderConfirmation->order_number ?? 'N/A' }} ${{ number_format($payment->amount, 2) }} ${{ number_format($payment->allocated_amount, 2) }} ${{ number_format($payment->remaining_amount, 2) }} {{ ucfirst($payment->status) }}
Allocation History
@php $allocations = \App\Models\PaymentAllocation::whereHas('advancePayment', function($q) use ($buyer) { $q->where('buyer_id', $buyer->id); })->with(['factory', 'orderConfirmation'])->latest()->get(); @endphp @foreach($allocations as $allocation) @endforeach @if($allocations->isEmpty()) @endif
Date Reference Factory Order Amount Purpose Actions
{{ $allocation->allocation_date->format('M d, Y') }} {{ $allocation->reference_number }} {{ $allocation->factory->name }} {{ $allocation->orderConfirmation->order_number }} ${{ number_format($allocation->amount, 2) }} {{ Str::limit($allocation->purpose, 50) }}
No allocations found
@include('admin.footer')