@php $brand = $company['company_name'] ?? config('app.name'); $items = (int) collect($order->items_json)->sum('quantity'); // Cash on delivery until it is marked paid: the rider collects the total. Anything paid already collects nothing. $isCod = $order->payment_gateway === 'cod' && $order->payment_status !== 'Paid'; @endphp Label {{ $order->order_number }} — {{ $brand }} {{-- A self-contained print page: one 80mm x 80mm label, black on white, nothing else on the sheet. --}}

Sales Order
{{ $brand }}
@if ($barcode)
{!! $barcode !!}
@endif
Tracking Number {{ $order->order_number }}
{{ $brand }} {{ $order->delivery_district ?: 'Bangladesh' }}
STANDARD
{{ $items }} {{ Str::plural('ITEM', $items) }}
{{ \App\Services\CheckoutService::DELIVERY_ZONES[$order->delivery_zone] ?? 'Delivery' }}
{{ $isCod ? 'COD' : 'Non-COD' }}
BDT {{ $isCod ? number_format((float) $order->total_amount, 2) : '0' }}
Order Number: {{ $order->order_number }}
Order Date {{ $order->created_at->format('d M Y') }}
Print Date {{ now()->format('Y-m-d') }}
{!! $qr !!}
Recipient {{ $order->customer_name }}
{{ $order->shipping_address }}
@if ($order->delivery_area)
{{ $order->delivery_area }} - {{ $order->delivery_district }}
@endif
Phone {{ $order->customer_phone ?: '—' }}
Sender {{ $brand }}
{{ $company['address'] ?? '' }}
Phone {{ $company['phone'] ?? '' }}