@extends('layouts.admin') @section('title', setting('school_name', 'ShulePoint') . ' | Receipt #' . $payment->id) @section('page-title', 'Fee Receipt') @push('styles') @endpush @section('content') @php $schoolName = $school->name ?? setting('school_name', 'ShulePoint Academy'); $schoolTag = $school->tagline ?? setting('school_tagline', 'Kenyan CBE School Management System'); $schoolContact = trim((($school->address ?? setting('school_address', '')) ?? '').((($school->phone ?? setting('school_phone', '')) ? ' · '.($school->phone ?? setting('school_phone', '')) : '')).((($school->email ?? setting('school_email', '')) ? ' · '.($school->email ?? setting('school_email', '')) : '')), ' ·'); $logoFile = $school->logo ?? setting('school_logo'); $logoUrl = ($logoFile && file_exists(public_path('storage/'.$logoFile))) ? asset('storage/'.$logoFile) : null; $learner = $payment->invoice->learner ?? null; $invoice = $payment->invoice; @endphp

Official Fee Receipt #{{ $payment->id }}

PDF Invoices
@if($logoUrl) @else {{ strtoupper(substr($schoolName, 0, 1)) }} @endif

{{ $schoolName }}

{{ $schoolTag }}

@if($schoolContact)

{{ $schoolContact }}

@endif
PAID

RECEIPT

BILL TO
{{ $learner->guardian_name ?? 'Parent/Guardian' }}
Parent of {{ $learner ? $learner->first_name.' '.$learner->last_name : 'Learner #'.$payment->learner_id }}
{{ $learner->guardian_phone ?? '' }}
STUDENT
{{ $learner ? $learner->first_name.' '.$learner->last_name : 'Learner #'.$payment->learner_id }}
Adm: {{ $learner->admission_no ?? '—' }}
Class: {{ $learner?->schoolClass->name ?? '—' }}
Receipt # {{ $payment->id }}
Receipt Date {{ $payment->paid_at ? $payment->paid_at->format('d/m/Y') : '' }}
Invoice # {{ $invoice->invoice_no ?? '—' }}
Due Date {{ $invoice->due_date ? $invoice->due_date->format('d/m/Y') : '—' }}
@forelse($breakdown['lines'] as $i => $line) @empty @endforelse @if($breakdown['adjustment'] != 0) @endif
QTYDESCRIPTIONUNIT PRICEAMOUNT
{{ $i + 1 }} {{ $line['label'] }}
{{ $line['detail'] }}
{{ number_format($line['amount'], 0) }} {{ number_format($line['amount'], 0) }}
1 Fee payment — {{ $payment->method }}
Ref: {{ $payment->reference ?? '—' }}@if($payment->notes)
{{ $payment->notes }}@endif
{{ number_format($payment->amount, 0) }} {{ number_format($payment->amount, 0) }}
– Other charges / adjustments {{ number_format($breakdown['adjustment'], 0) }} {{ number_format($breakdown['adjustment'], 0) }}
Subtotal (billed) {{ number_format($invoice->total ?? 0, 0) }}
Less: paid to date {{ number_format($invoice->paid ?? 0, 0) }}
THIS RECEIPT ({{ $payment->method }}) KES {{ number_format($payment->amount, 0) }}

Invoice {{ $invoice->invoice_no ?? '' }} balance after this payment: KES {{ number_format($invoice->balance ?? 0, 0) }} · Ref: {{ $payment->reference ?? '—' }}

Received by: {{ $receiverName }}
Signature / Stamp: ____________
{{ $schoolName }}
@if(!empty($qrBase64))
Verify QR

Scan to verify this receipt online

@endif

Thank you for your payment!

@endsection