@php $siteName = \App\Models\Setting::getVal('site_name', 'SwiftCart Online Store'); $siteLogo = \App\Models\Setting::getVal('site_logo', ''); $companyAddress = \App\Models\Setting::getVal('company_address', '123 Commerce Tower, Tech Zone, Dhaka 1212'); $companyPhone = \App\Models\Setting::getVal('company_phone', '+880 1700-000000'); $footerNote = \App\Models\Setting::getVal('pos_receipt_note', 'Thank you for shopping with us! Please come again.'); $trackUrl = route('shop.track-order', ['order_number' => $order->order_number, 'phone' => $order->phone]); $qrApiUrl = "https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=" . urlencode($trackUrl); @endphp
@if($siteLogo) Logo @endif

{{ $siteName }}

{{ $companyAddress }}

Phone: {{ $companyPhone }}

INVOICE RECEIPT

Invoice #: {{ $order->order_number }}

Date: {{ $order->created_at->format('d M, Y - h:i A') }}

Scan QR Code SCAN TO TRACK
CUSTOMER DETAILS

{{ $order->customer_name }}

📞 {{ $order->phone }}

@if($order->shipping_address && !str_contains($order->shipping_address, 'Over The Counter POS Sale'))

{{ $order->formatted_address }}

@endif
PAYMENT TRANSACTION INFO

METHOD: {{ str_replace('_', ' ', strtoupper($order->payment_method)) }}

STATUS: {{ strtoupper($order->payment_status) }}
@if($order->trx_id)

TrxID: {{ $order->trx_id }}

@endif
@foreach($order->items as $item) @endforeach
Product Description Qty Unit Price Total
{{ $item->product->name ?? 'Product Item' }} @if($item->warranty || ($item->product && $item->product->warranty))
🛡️ Warranty: {{ $item->warranty ?? $item->product->warranty }} @if($item->warranty_start_date && $item->warranty_expiry_date) (Valid: {{ \Carbon\Carbon::parse($item->warranty_start_date)->format('d M Y') }} - {{ \Carbon\Carbon::parse($item->warranty_expiry_date)->format('d M Y') }}) @endif
@endif
{{ $item->quantity }} ৳{{ number_format((float)$item->price, 2) }} ৳{{ number_format(((float)$item->price) * ((int)$item->quantity), 2) }}
@php $invTotal = (float)$order->total_amount; $invPaid = (float)($order->advance_amount ?? 0); if (strtolower($order->payment_status) === 'paid') { $invPaid = $invTotal; } elseif ($order->delivery_charge_paid && $invPaid < (float)($order->shipping_charge ?? 0)) { $invPaid = (float)($order->shipping_charge ?? 0); } $invDue = max(0, $invTotal - $invPaid); @endphp
Subtotal Amount: ৳{{ number_format($order->total_amount - $order->shipping_charge, 2) }}
@if($order->shipping_charge > 0)
Shipping Charge: ৳{{ number_format($order->shipping_charge, 2) }}
@endif
Grand Total: ৳{{ number_format($order->total_amount, 2) }}
Amount Paid (পরিশোধিত): ৳{{ number_format($invPaid, 2) }}
Due / Payable Amount (বকেয়া): ৳{{ number_format($invDue, 2) }}
Payment Method / Status: {{ strtoupper($order->payment_method) }} ({{ $invDue == 0 ? 'PAID' : ($invPaid > 0 ? 'PARTIALLY PAID' : 'UNPAID') }})

{{ $footerNote }}

Computer Generated Official PDF Receipt • Zero Radius Format