@extends('b2bportal::storefront.layouts.app') @php $primary = $orders->first(); $totals = [ 'subtotal' => $orders->sum('subtotal'), 'discount' => $orders->sum('discount_total'), 'tax' => $orders->sum('tax_total'), 'shipping' => $orders->sum('shipping_total'), 'grand' => $orders->sum('grand_total'), ]; @endphp @section('title', 'Order ' . ($primary->order_number ?? '') . ' — ' . ($business->name ?? 'B2B Portal')) @section('content')
✅

Order placed{{ $orders->count() > 1 ? ' — '.$orders->count().' shipments' : '' }}

Order #{{ $primary->order_number ?? substr($groupUid, 0, 8) }}

@foreach($orders as $order)
{{ $order->order_number ?? 'Shipment #'.$order->id }}
Ships from location #{{ $order->location_id }} · Payment: {{ strtoupper($order->payment_method_used) }} · Status: {{ strtoupper($order->status) }}
{{ config('constants.currency_symbol','₹') }}{{ number_format($order->grand_total, 2) }}
@if($order->transaction_id) Download invoice @endif
@foreach(($order->cart_snapshot ?? []) as $line) @endforeach
Item Qty Unit Subtotal
{{ $line['name'] ?? '—' }} {{ $line['quantity'] ?? 0 }} {{ config('constants.currency_symbol','₹') }}{{ number_format($line['unit_price'] ?? 0, 2) }} {{ config('constants.currency_symbol','₹') }}{{ number_format($line['subtotal'] ?? 0, 2) }}
Subtotal: {{ config('constants.currency_symbol','₹') }}{{ number_format($order->subtotal, 2) }}
@if($order->discount_total > 0)
Discount: −{{ config('constants.currency_symbol','₹') }}{{ number_format($order->discount_total, 2) }}
@endif
Tax: {{ config('constants.currency_symbol','₹') }}{{ number_format($order->tax_total, 2) }}
Shipping: {{ config('constants.currency_symbol','₹') }}{{ number_format($order->shipping_total, 2) }}
@endforeach
Order total {{ config('constants.currency_symbol','₹') }}{{ number_format($totals['grand'], 2) }}
← Continue shopping All orders
@endsection