@extends('layouts.app') @section('title', 'Payment Details') @push('styles') @include('wuser.partials.delivery-badge-styles') @endpush @section('content')
Shipment payment
Payment details
Back to create
@include('wuser.partials.delivery-badges', ['badges' => $virtualAddress->deliveryBadges(), 'inline' => true, 'suiteLine' => $suiteNumber])
@csrf @php $baseNotax = round($shipments->sum(function ($shipment) { return (float) ($shipment->shippingFigures()['notax'] ?? 0); }), 2); $photoCount = $shipments->sum(function ($shipment) { return $shipment->photos->count(); }); $photoGallery = []; foreach ($shipments as $galleryShipment) { foreach ($galleryShipment->photos as $galleryPhoto) { if (!$galleryPhoto->photo_path) { continue; } $photoGallery[] = [ 'url' => \Illuminate\Support\Facades\Storage::disk('s3')->url($galleryPhoto->photo_path), 'name' => $galleryPhoto->photo_name ?: ($galleryShipment->tracking_number ?: 'Photo'), ]; } } @endphp

Selected shipments ({{ $shipments->count() }})

@foreach($shipments as $index => $shipment) @php $itemRows = $shipment->items; $itemCount = $itemRows->count() > 0 ? $itemRows->count() : ($shipment->item_name ? 1 : 0); $openShipment = $index === 0; @endphp @php $itemLabel = $itemRows->map(function ($item) { $name = trim((string) $item->item_name); if ($name === '') { return null; } $qty = (float) $item->unit_quantity; if ($qty > 1) { $qtyText = abs($qty - round($qty)) < 0.001 ? (string) (int) round($qty) : rtrim(rtrim(number_format($qty, 2, '.', ''), '0'), '.'); return $name . ' (' . $qtyText . ')'; } return $name; })->filter()->implode(', '); if ($itemLabel === '') { $itemLabel = $shipment->item_name ?: 'N/A'; } $arrived = $shipment->received_at ? ($shipment->received_at->isToday() ? 'Arrived Today, ' . $shipment->received_at->format('h:i A') : 'Arrived ' . $shipment->received_at->format('d M Y, h:i A')) : 'Arrival time unavailable'; $streamLabel = $shipment->customsShipmentStreamLabel(); $portBadge = $shipment->port_of_destination === 'male' ? 'Male' : ($shipment->port_of_destination === 'rest' ? 'Rest of Maldives' : ''); $cargoBadge = in_array($shipment->cargo_type, ['ecommerce', 'assisted', 'walkin'], true) ? $shipment->cargoTypeLabel() : ''; @endphp
{{ $shipment->sender_name ?: 'Shipment' }} {{ $shipment->tracking_number ?: 'N/A' }} • {{ $arrived }} @if($streamLabel !== 'N/A') {{ $streamLabel }} @endif @if($portBadge !== '') {{ $portBadge }} @endif @if($cargoBadge !== '') {{ $cargoBadge }} @endif {{ $itemLabel }} Items {{ $itemCount }} @if($shipment->weight)Dead Wt: {{ $shipment->weight }}@endif @if($shipment->dimensions){{ $shipment->dimensions }}@endif {{ $shipment->photos->count() }} {{ $shipment->photos->count() === 1 ? 'Photo' : 'Photos' }} Declared value ₹{{ number_format((float) $shipment->declared_value_inr, 2) }} ${{ number_format((float) $shipment->declared_value, 2) }}
@endforeach

Additional Services (Optional)

Service Type Service Details Amount (₹)
Total additional charge ₹ 0.00
@php $rateShipment = $shipments->first(); $calcDestination = $rateShipment->port_of_destination ?: 'male'; $calcCargo = $rateShipment->cargo_type ?: 'ecommerce'; $portText = $calcDestination === 'rest' ? 'Rest of Maldives' : 'Male'; $cargoText = ['ecommerce' => 'E-commerce', 'assisted' => 'Assisted Purchase', 'walkin' => 'Walk-in'][$calcCargo] ?? 'E-commerce'; $weightUnit = old('weight_unit', data_get($prefillMeasurements, 'weight_unit', 'kg')); $dimensionUnit = old('dimension_unit', data_get($prefillMeasurements, 'dimension_unit', 'cm')); @endphp
Shipping rate
{{ $portText }} · {{ $cargoText }}
Dead scale weight
× ×
Packed size for this payment
@if(!empty($assistedPurchase)) @else
Paid via
@error('paid_via')
{{ $message }}
@enderror
@endif
@include('admin.measurement-settings.partials.dimensional-weight-modal') @endsection @push('scripts') @endpush