{{-- ICTHospital - who owes money, and for how long. Copyright (c) DEVtrust Part of ICTHospital Licensed under the GNU General Public License v3.0. --}} @extends('layouts.master') @section('style') @stop @section('content')

Debtors {{ number_format($total, 2) }} outstanding across {{ $rows->count() }} patient(s)

@if ($rows->isEmpty())

Nothing outstanding. Every invoice is settled in full.

@else @foreach ($buckets as $label => $amount) @endforeach
AgeAmount
{{ $label }} {{ number_format($amount, 2) }}

Age is taken from the oldest unsettled invoice for that patient, not from the most recent one, so a long standing balance does not look fresh because something new was added to it.

@foreach ($rows as $row) @endforeach
Patient Phone Invoices Owed Oldest Days
@if ($row['patient']) {{ $row['patient']->name }} {{ $row['patient']->patient_id }} @else Patient removed @endif {{ $row['patient']->phone ?? '' }} {{ $row['invoices'] }} {{ number_format($row['owed'], 2) }} {{ $row['oldest'] }} {{ $row['days'] }}
@endif
@stop @section('script') @stop