@extends('layouts.app') @section('title', __('Installments')) @section('content')

💰 {{ __('Installments') }}

{{-- Outstanding-balance widgets --}}
@foreach([ [__('Due today'), $widgets['due_today'], '#0EA5E9'], [__('Due this week'), $widgets['due_week'], '#8B5CF6'], [__('Overdue'), $widgets['overdue'], '#EF4444', $widgets['overdue_count'].' '.__('installments')], [__('Total outstanding'), $widgets['total_outstanding'], '#F5A524'], ] as $w)
{{ $w[0] }}
{{ number_format($w[1]) }} IQD
@isset($w[3])
{{ $w[3] }}
@endisset
@endforeach
@if($overdue->isNotEmpty())

âš  {{ __('Overdue') }} ({{ $overdue->count() }})

@foreach($overdue as $inst) @endforeach
{{ $inst->invoice->patient->full_name }}
{{ $inst->invoice->patient->phone }} · {{ $inst->invoice->number }}
{{ $inst->due_date->format('d M Y') }}
{{ $inst->due_date->diffForHumans() }}
{{ number_format($inst->remaining()) }} IQD @can('installments.manage') @include('invoices._quickpay', ['invoice' => $inst->invoice, 'installment' => $inst, 'methods' => $methods]) @endcan
@endif

{{ __('Due in the next 30 days') }}

@forelse($upcoming as $inst) @empty @endforelse
{{ $inst->invoice->patient->full_name }}
{{ $inst->invoice->number }}
{{ $inst->due_date->format('d M Y') }} @if($inst->due_date->isToday()){{ __('Today') }}@endif {{ number_format($inst->remaining()) }} IQD @can('installments.manage') @include('invoices._quickpay', ['invoice' => $inst->invoice, 'installment' => $inst, 'methods' => $methods]) @endcan
{{ __('Nothing due in the next 30 days.') }}
{{ $upcoming->links() }} @endsection