@extends('frontend.layouts.app') @section('title', 'Invoice ' . $order->reference . ' - MyFamily Moments') @push('style') @endpush @section('content')
{{-- Actions --}}

Invoice Management

Download, email, or print your invoice

Back to Billing
{{-- Document --}}
@php $symbol = $order->plan->currencySymbol(); $amount = number_format($order->amount_cents / 100, 2); $status = strtolower($order->status); // pending|paid|approved|failed|rejected|refunded $statusClass = match ($status) { 'paid', 'refunded' => 'status-paid', 'pending', 'approved' => 'status-pending', default => 'status-failed', }; $user = $order->user ?? auth()->user(); @endphp @if (in_array($status, ['paid', 'approved', 'refunded']))
{{ strtoupper($status) }}
@endif
{{-- Header --}}

MyFamily Moments

Preserving Your Precious Memories

123 Memory Lane
San Francisco, CA 94105
United States
Phone: +1 (555) 123-4567
Email: billing@myfamilymoments.com

INVOICE

#{{ $order->reference }}

{{ strtoupper($status) }}
{{-- Body --}}
{{-- Bill To + Details --}}
Bill To
{{ trim(($user->first_name ?? '') . ' ' . ($user->last_name ?? '')) ?: $user->name }}
{{ $user->family_name ?? '' }}
{{ $user->email }}
@if (!empty($user->phone)) Phone: {{ $user->phone }} @endif
Invoice Details
Invoice Date:
{{ optional($order->created_at)->format('F d, Y') }}
Due Date:
{{ optional($order->created_at)->addDays(0)->format('F d, Y') }}
Payment Method:
{{ ucfirst($order->gateway ?? '—') }}
Payment Date:
{{ optional($order->paid_at)->format('F d, Y') ?? '—' }}
@if (!empty($order->payment_reference))
Transaction ID:
{{ $order->payment_reference }}
@endif
{{-- Items --}}
Description Quantity Unit Price Total
{{ $order->plan->name }} Plan
{{ ucfirst(data_get($order->meta, 'billing', 'monthly')) }} subscription
Billing Period: @php $start = optional( $order->paid_at ?? $order->created_at, )->format('M d, Y'); $end = data_get($order->meta, 'billing') === 'yearly' ? optional($order->paid_at ?? $order->created_at) ->addYear() ->format('M d, Y') : optional($order->paid_at ?? $order->created_at) ->addMonth() ->format('M d, Y'); @endphp {{ $start }} - {{ $end }}
1 {{ $symbol }}{{ $amount }} {{ $symbol }}{{ $amount }}
{{-- Totals --}}
@php $subtotal = $order->amount_cents / 100; $tax = 0.0; // apply if you implement tax $discount = 0.0; // apply if you implement coupons $total = max($subtotal + $tax - $discount, 0); @endphp
Subtotal: {{ $symbol }}{{ number_format($subtotal, 2) }}
Tax: {{ $symbol }}{{ number_format($tax, 2) }}
@if ($discount > 0)
Discount: -{{ $symbol }}{{ number_format($discount, 2) }}
@endif
Total Amount: {{ $symbol }}{{ number_format($total, 2) }}
{{-- Payment Info --}}
Payment Information
{{ strtoupper(substr($order->payment_brand ?? ($order->gateway ?? 'PAY'), 0, 4)) }}
@if ($order->payment_brand && $order->payment_last4) {{ strtoupper($order->payment_brand) }} ending in ****{{ $order->payment_last4 }} @elseif($order->gateway) Paid via {{ ucfirst($order->gateway) }} @else — @endif
@if ($order->paid_at) Payment processed on {{ $order->paid_at->format('F d, Y \a\t g:i A T') }} @else Awaiting payment @endif
@if ($order->payment_reference)
Transaction ID: {{ $order->payment_reference }}
@endif
{{-- Notes --}}
Important Notes
  • @if ($status === 'paid' || $status === 'approved' || $status === 'refunded') This invoice has been {{ $status }}. Thank you! @else This invoice is {{ $status }}. Please complete payment to activate your subscription. @endif
  • Your subscription will auto-renew on {{ optional($subscription->next_billing_at)->format('F d, Y') ?? '—' }}.
  • For billing questions: billing@myfamilymoments.com
  • Manage your subscription in your account dashboard.
{{-- Footer --}}
{{-- invoice-content --}}
{{-- invoice-document --}}
{{-- invoice-container --}} @endsection @push('script') @endpush