@extends('admin.layouts.wholesale-live')
@section('page-title', $currentPage)
@section('wholesale-actions')Payment History@endsection
@section('wholesale-content')
@if($review)
Review payment before saving
- Party
- {{ $review['party']->name }} · {{ $review['party']->phone }}
Payment against{{ $review['invoice']?->code() ?? 'Opening due' }}Outstanding (BDT){{ number_format($review['due'] / 100, 2) }}Received now (BDT){{ number_format($review['amount'] / 100, 2) }}Due after payment (BDT){{ number_format(($review['due'] - $review['amount']) / 100, 2) }}Date / Method{{ $payload['payment_date'] }} · {{ $payload['method'] }}Reference{{ $payload['reference'] ?? '—' }}Note{{ $payload['note'] ?? '—' }}
@else
@if($party){{ $party->name }} · {{ $party->phone }} · Current Party due: BDT {{ number_format($balance / 100, 2) }}
@endif
@if($party)
Up to 50 outstanding invoices shown; search by WH code for older invoices. Inactive Parties can pay existing dues.
@if($due > 0 && ($target === 'opening' || $selectedInvoice))
@elseif($target !== '')No outstanding due for this selection. Choose another invoice or opening due.
@endif
@endif
@endif
@endsection