@extends('layouts.app') @section('title', 'Aged receivables') @section('content')

Aged receivable orders

Search by Record ID (from the API). Pay uses Record ID when present; otherwise Order ID.

@if(!empty($recordIdSearch)) Show all @endif
@if($error)
{{ $error }}
@endif @if(!empty($recordIdSearch) && count($clients) === 0 && !$error)
No orders with a matching Record ID. Try another value or click Show all.
@endif @forelse($clients as $client)
{{ $client['clientName'] ?? '—' }}
@foreach($client['orders'] ?? [] as $order) @if(!empty($order['propertyInfo'])) @endif @endforeach
Record ID Order ID Invoice # Invoiced Days Balance
@if(!empty($order['recordID'])) {{ $order['recordID'] }} @else — @endif {{ $order['orderID'] ?? '—' }} {{ $order['InvoiceNumber'] ?? $order['invoiceNumber'] ?? '—' }} {{ $order['dateInvoiced'] ?? '—' }} {{ $order['daysOld'] ?? '—' }} @if(isset($order['balanceAmount'])) ${{ number_format((float) $order['balanceAmount'], 2) }} @else — @endif @if(!empty($order['recordID'])) Pay @elseif(!empty($order['orderID'])) Pay @else — @endif
{{ \Illuminate\Support\Str::limit($order['propertyInfo'], 200) }}
@empty @unless($error)

No clients returned.

@endunless @endforelse @endsection