@extends('layouts.app') @section('title', $client->name) @section('content') @php $balance = $client->balance(); $limit = (float) $client->credit_limit; $usePct = $limit > 0 ? min(100, round(max(0, $balance) / $limit * 100)) : 0; @endphp
| Order | Date | Delivery | Status | Total | Payment | Due |
|---|---|---|---|---|---|---|
| {{ $o->order_no }} | {{ $o->order_date->format('d M Y') }} | {{ $o->delivery_date?->format('d M Y') ?? '—' }} | {{ money($o->total) }} | {{ $o->isCancelled() ? '—' : money($o->due()) }} | ||
| Date | Against | Method | Reference | Amount |
|---|---|---|---|---|
| {{ $p->paid_on->format('d M Y') }} | @if ($p->order){{ $p->order->order_no }}@elseOn account@endif | {{ \App\Models\Payment::METHODS[$p->method] ?? $p->method }} | {{ $p->reference ?: '—' }} | +{{ money($p->amount) }} |
| Date | Entry | Reference | Description | Billed | Received | Balance |
|---|---|---|---|---|---|---|
| {{ $r['date']->format('d M Y') }} | {{ $r['entry'] }} | {{ $r['ref'] }} | {{ $r['desc'] }} | {{ $r['debit'] ? money($r['debit']) : '' }} | {{ $r['credit'] ? money($r['credit']) : '' }} | {{ money($r['balance']) }} |
| Balance due | {{ money($statement->last()['balance']) }} | |||||