@extends('account.layout') @section('account_content')
{{ $invoice?->invoice_number ?? ('INV-' . ($booking->id ?? '')) }}

Invoiced To:
{{ $invoice?->billing_address['name'] ?? ($booking->devotee_details['name'] ?? '') }}
{{ $booking->devotee_details['phone'] ?? '' }}
{{ $invoice?->billing_address['email'] ?? ($booking->devotee_details['email'] ?? '') }}
{{ $invoice?->billing_address['street_address'] ?? '' }}
{{ ($invoice?->billing_address['city'] ?? '') }}@if(isset($invoice) && isset($invoice->billing_address['state'])), {{ $invoice->billing_address['state'] }}@endif {{ $invoice?->billing_address['postal_code'] ?? '' }}
Gothram: {{ $booking->devotee_details['gotram'] ?? '' }}

INVOICE

Invoice #: {{ $invoice?->invoice_number ?? ('INV-' . ($booking->id ?? '')) }}
Date: {{ optional($invoice?->invoice_date)->format('M d, Y') ?? $booking->created_at->format('M d, Y') }}
Status: {{ ucfirst($invoice?->status ?? 'paid') }}
Payment: {{ strtoupper($order?->payment_method ?? 'online') }}
Txn: {{ $order?->transaction_id ?? '-' }}
@foreach(($booking->cart_data ?? []) as $i => $item) @endforeach
# DESCRIPTION SLOTS RATE SUBTOTAL
{{ $loop->iteration }}
{{ ucwords($item['name'] ?? 'Seva') }}
{{ isset($item['date']) ? 'Date: ' . \Carbon\Carbon::parse($item['date'])->format('D, d M Y') : '' }} {{ isset($item['time_slot']) ? ' | Time: ' . $item['time_slot'] : '' }}
{{ $item['slots'] ?? 1 }} ₹{{ number_format(($item['price'] ?? 0), 2) }} ₹{{ number_format((($item['price'] ?? 0) * ($item['slots'] ?? 1)), 2) }}
Subtotal : ₹{{ number_format(collect($booking->cart_data)->sum(function($item) { return $item['price'] * $item['slots']; }), 2) }}
Online Fee : ₹{{ number_format(collect($booking->cart_data)->sum('slots') * 10, 2) }}
Total: ₹{{ number_format($booking->total_amount, 2) }}

Thank you for your trust and choice of Seva at Sri Vidya Saraswathi Sri Shani Temples

@endsection