{{ __('app.fees.invoices.back') }} / {{ $invoice->invoice_no }} {{ $invoice->status->label() }}

{{ __('app.fees.invoices.detail_title', ['invoice' => $invoice->invoice_no]) }}

{{ $invoice->kind->label() }} · {{ $invoice->billing_period }} · {{ $invoice->academicYear?->name }} @if ($invoice->exam) · {{ $invoice->exam->localizedName() }} @endif

@if ($notice) {{ $notice }} @endif @if ($errors->any())
    @foreach ($errors->all() as $message)
  • {{ $message }}
  • @endforeach
@endif

{{ $invoice->student?->localizedName() }}

{{ $invoice->student?->name_en }}

{{ __('app.students.uid') }}
{{ $invoice->student?->student_uid }}
{{ __('app.admissions.roll') }}
{{ $invoice->student?->roll ?? '—' }}
{{ __('app.fees.fields.phone') }}
{{ $invoice->student?->phone ?? '—' }}
{{ __('app.fees.fields.class') }}
{{ $invoice->academicClass?->localizedName() }}
{{ __('app.fees.fields.section') }}
{{ $invoice->section?->localizedName() ?? '—' }}
{{ __('app.fees.fields.division') }}
{{ $invoice->division?->localizedName() }}
{{ __('app.fees.fields.issue_date') }}
{{ $invoice->issue_date->translatedFormat('d M Y') }}
{{ __('app.fees.fields.due_date') }}
{{ $invoice->due_date->translatedFormat('d M Y') }}
@if ($invoice->isOverdue())
{{ __('app.fees.invoices.days_overdue', ['days' => $invoice->daysOverdue()]) }}
@endif
{{ __('app.fees.fields.created_by') }}
{{ $invoice->creator?->name ?? '—' }}
@if ($invoice->isCancelled())

{{ __('app.fees.invoices.cancelled_at', ['date' => $invoice->cancelled_at?->translatedFormat('d M Y, H:i') ?? '—']) }}

{{ $invoice->cancel_reason }}

@endif @if ($invoice->notes)

{{ $invoice->notes }}

@endif
{{ __('app.fees.fields.subtotal') }}
{{ number_format((float) $invoice->subtotal, 2) }}
{{ __('app.fees.fields.discount') }}
− {{ number_format((float) $invoice->discount_total, 2) }}
{{ __('app.fees.fields.total') }}
{{ number_format((float) $invoice->total, 2) }}
{{ __('app.fees.fields.paid') }}
{{ number_format((float) $invoice->paid_total, 2) }}
{{ __('app.fees.fields.refunded') }}
{{ number_format((float) $invoice->refund_total, 2) }}
{{ __('app.fees.fields.balance') }}
{{ number_format((float) $invoice->balance, 2) }}
@if ($pendingTotal > 0)

{{ __('app.fees.payments.pending_note', ['amount' => number_format($pendingTotal, 2)]) }}

@endif
@foreach ($invoice->items as $index => $item) @endforeach
# {{ __('app.fees.fields.head') }} {{ __('app.fees.fields.description') }} {{ __('app.fees.fields.amount') }} {{ __('app.fees.fields.discount') }} {{ __('app.fees.fields.net') }}
{{ $index + 1 }} {{ $item->head?->localizedName() ?? '—' }} {{ $item->localizedDescription() }} {{ number_format((float) $item->amount, 2) }} {{ number_format((float) $item->discount_amount, 2) }} {{ number_format((float) $item->net_amount, 2) }}
@can('fees.collect') @unless ($invoice->isCancelled()) @if ($payable > 0)
@foreach ($methods as $option) @endforeach

{{ __('app.fees.payments.verify_hint') }}

{{ __('app.fees.payments.record') }}
@endif @endunless @endcan
@forelse ($invoice->payments as $payment) @empty @endforelse
{{ __('app.fees.fields.receipt_no') }} {{ __('app.fees.fields.method') }} {{ __('app.fees.fields.amount') }} {{ __('app.fees.fields.paid_at') }} {{ __('app.fees.fields.status') }} {{ __('app.actions.view') }}
{{ $payment->receipt_no }} {{ $payment->method->label() }} {{ $payment->reference_no ?? $payment->bank_name ?? '—' }} {{ number_format((float) $payment->amount, 2) }} {{ $payment->paid_at->translatedFormat('d M Y, H:i') }} {{ $payment->status->label() }} @if ($payment->isVerified() && $payment->refundedAmount() > 0) {{ __('app.fees.payments.refunded_note', ['amount' => number_format($payment->refundedAmount(), 2)]) }} @endif
@can('fees.print') @if ($payment->isVerified()) {{ __('app.fees.payments.receipt') }} @endif @endcan @can('fees.verify') @if ($payment->isPending()) {{ __('app.fees.payments.verify') }} {{ __('app.fees.payments.reject') }} @endif @endcan @can('fees.refund') @if ($payment->isVerified() && $payment->refundableAmount() > 0) {{ __('app.fees.refunds.refund') }} @endif @endcan
@if ($rejectingPaymentId === $payment->id)
@error('rejection_reason')

{{ $message }}

@enderror
{{ __('app.actions.cancel') }} {{ __('app.fees.payments.confirm_reject') }}
@endif
{{ __('app.fees.payments.empty') }}
@if ($refundingPayment !== null)
@foreach ($methods as $option) @endforeach
{{ __('app.actions.cancel') }} {{ __('app.fees.refunds.process') }}
@endif
@forelse ($invoice->refunds as $refund) @empty @endforelse
{{ __('app.fees.fields.refund_no') }} {{ __('app.fees.fields.receipt_no') }} {{ __('app.fees.fields.amount') }} {{ __('app.fees.fields.refund_reason') }} {{ __('app.fees.fields.refunded_at') }} {{ __('app.fees.fields.processed_by') }}
{{ $refund->refund_no }} {{ $refund->payment?->receipt_no }} {{ number_format((float) $refund->amount, 2) }} {{ $refund->reason }} {{ $refund->refunded_at->translatedFormat('d M Y, H:i') }} {{ $refund->processor?->name ?? '—' }}
{{ __('app.fees.refunds.empty') }}
@can('fees.delete') @unless ($invoice->isCancelled()) @if ($invoice->payments->isEmpty()) @if ($showCancel)
{{ __('app.actions.cancel') }} {{ __('app.fees.invoices.cancel_action') }}
@else

{{ __('app.fees.invoices.cancel_hint') }}

{{ __('app.fees.invoices.cancel_action') }}
@endif
@endif @endunless @endcan