@extends('layouts.school') @section('title', 'Refund Payment') @section('header', 'Refund Payment') @section('content')
Receipt
{{ $payment->receipt_no ?? '—' }}
Invoice
{{ optional($payment->invoice)->invoice_no }}
Student
{{ optional($payment->invoice?->student)->full_name }}
Paid
₦{{ number_format($payment->amount, 2) }}
Already refunded
₦{{ number_format($payment->refunded_amount, 2) }}
Refundable now
₦{{ number_format($payment->refundableAmount(), 2) }}
@if ($payment->refundableAmount() <= 0)

Nothing left to refund on this payment.

@else
@csrf
Cancel
@endif
@endsection