@php $amount = (float) ($data['amount'] ?? 0); $remaining = isset($data['remaining_balance']) ? (float) $data['remaining_balance'] : null; $rows = [ ['label' => 'Receipt #', 'value' => e($data['receipt_number'] ?? '-')], ]; if (!empty($data['invoice']['number'])) { $rows[] = ['label' => 'Invoice #', 'value' => e($data['invoice']['number'])]; } if (!empty($data['method'])) { $rows[] = ['label' => 'Payment Method', 'value' => e($data['method'])]; } $rows[] = ['label' => 'Amount', 'value' => 'CA$' . number_format($amount, 2)]; $rows[] = ['label' => 'Payment Date', 'value' => e((string) ($data['payment_date'] ?? '-'))]; if ($remaining !== null) { $rows[] = ['label' => 'Remaining Balance', 'value' => 'CA$' . number_format($remaining, 2)]; } @endphp @extends('emails.layouts.stepup', [ 'preheader' => 'Payment received — Receipt ' . ($data['receipt_number'] ?? '') . ' (CA$' . number_format($amount, 2) . ')', ]) @section('body')

Hello{{ !empty($data['parent']['name']) ? ' ' . $data['parent']['name'] : '' }},

Thank you — we've received your payment. Your receipt {{ $data['receipt_number'] ?? '' }} is attached to this email.

Amount received: CA${{ number_format($amount, 2) }}

@endsection @section('summary') @include('emails.components.summary-table', ['title' => 'Payment Receipt', 'rows' => $rows]) @endsection @section('footerNote') If you have any questions about this receipt, simply reply to this email. @endsection