@extends("general_base") @section("title", "Order Invoice") @section("style") @endsection @section("content")

Order Invoice

@if($orderData['show_success'])
Thank you! Your order has been placed successfully.
@endif @if($orderData['is_in_progress'])
@if($orderData['payment_method'] === 'cod') Payment Status: Pending (Cash on Delivery) @else Payment Status: @php $ps = strtolower($orderData['payment_status'] ?? 'pending'); @endphp @if($ps === 'pending' || $ps === 'unpaid' || empty($ps)) Awaiting Confirmation @elseif($ps === 'paid') Paid Successfully @elseif($ps === 'failed') Payment Failed Try again @elseif($ps === 'cancelled') Payment Cancelled Try again @else {{ ucfirst($ps) }} @endif @if(!empty($orderData['payment_note']))
{{ $orderData['payment_note'] }} @endif
@endif
@endif

Order Invoice

ORDER ID {{ $orderData['order_id'] }}
ORDER DATE {{ $orderData['order_date'] }}
PAYMENT METHOD {{ $orderData['payment_method'] === 'cod' ? 'Cash on Delivery' : 'Digital Payment' }}

Shipping Information

Contact Information

Name {{ $orderData['shipping']['contact_name'] }}

Phone {{ $orderData['shipping']['contact_phone'] }}

@if($orderData['shipping']['whatsapp'])

WhatsApp {{ $orderData['shipping']['whatsapp'] }}

@endif @if($orderData['shipping']['contact_email'])

Email {{ $orderData['shipping']['contact_email'] }}

@endif

Delivery Address

Address {{ $orderData['shipping']['address'] }}

City {{ $orderData['shipping']['city'] }}

State {{ $orderData['shipping']['state'] }}

Postal Code {{ $orderData['shipping']['postal_code'] }}

Ordered Items

@php $groupedItems = collect($orderData['cart_items'])->groupBy('id'); @endphp @foreach($groupedItems as $productId => $variants)
{{ $variants->first()['title'] }} {{ $variants->first()['title'] }}
@foreach($variants as $item)
{{ $item['unit'] }}
৳{{ number_format($item['price']) }}
{{ $item['quantity'] }} ×
৳{{ number_format($item['total']) }}
@endforeach
@endforeach
Subtotal ৳{{ number_format($orderData['totals']['subtotal']) }}
Delivery Charge ৳{{ number_format($orderData['totals']['delivery']) }}
@if($orderData['coupon'])
Discount @if($orderData['coupon']['type'] === 'percentage') ({{ $orderData['coupon']['value'] }}%) @endif -৳{{ number_format($orderData['totals']['discount']) }}
@endif
Total Amount ৳{{ number_format($orderData['totals']['total']) }}
@if($orderData['payment_method'] !== 'cod')

Payment Details

Payment Method {{ $orderData['payment_method'] === 'cod' ? 'Cash on Delivery' : 'Digital Payment' }}
Sender Number {{ $orderData['payment_sender'] }}
Transaction ID {{ $orderData['payment_trxid'] }}
Amount Paid ৳{{ number_format($orderData['totals']['total']) }}
Status @php $ps = strtolower($orderData['payment_status'] ?? 'pending'); @endphp @if($ps === 'paid') Paid @elseif($ps === 'failed') Failed @elseif($ps === 'cancelled') Cancelled @elseif($ps === 'verified') Verified @elseif($ps === 'rejected') Rejected @else Pending @endif
@endif
Continue Shopping My Orders Track Your Order
@endsection @section("script") @endsection