@extends('layouts.app')
@php($isStudent = auth()->user()->isStudent())
@section('title', $isStudent ? 'My Payments' : 'Payments')
@section('subtitle', 'Invoices, collections and outstanding balances')
@section('content')
| Invoice | @unless ($isStudent)Student | @endunlessDescription | Total | Paid | Balance | Due date | Status | |
|---|---|---|---|---|---|---|---|---|
| {{ $payment->invoice_number }} | @unless ($isStudent){{ $payment->student?->user?->name ?? '—' }} {{ $payment->student?->student_number }} |
@endunless
{{ $payment->description }} | {{ money($payment->totalDue()) }} | {{ money($payment->amount_paid) }} | {{ money($payment->balance()) }} |
{{ $payment->due_date?->format('j M Y') }}
@if ($payment->status === 'overdue' && $payment->due_date)
{{ $payment->due_date->diffForHumans() }}
@endif
|
{{ $statuses[$payment->status] ?? ucfirst($payment->status) }} | |