@extends('layouts.app') @section('title', 'Edit Arrival & Item Intake') @push('styles') @include('wuser.shipments.partials.intake-layout-styles') @include('wuser.partials.delivery-badge-styles') @endpush @section('content') @php $selectedSuite = old('suite_number', $shipment->suite_number); $weightUnit = old('weight_unit', $parsedMeasurements['weight_unit'] ?? 'kg'); $dimensionUnit = old('dimension_unit', $parsedMeasurements['dimension_unit'] ?? 'cm'); $stream = old('customs_shipment_stream', $shipment->customs_shipment_stream ?: 'csb_iv'); $port = old('port_of_destination', $shipment->port_of_destination ?: 'male'); $cargo = old('cargo_type', $shipment->cargo_type ?: 'ecommerce'); $weightValue = old('weight', $parsedMeasurements['weight'] ?? ''); $lengthValue = old('length', $parsedMeasurements['length'] ?? ''); $widthValue = old('width', $parsedMeasurements['width'] ?? ''); $heightValue = old('height', $parsedMeasurements['height'] ?? ''); $oldItems = old('items'); if (!is_array($oldItems) || count($oldItems) === 0) { $oldItems = []; if ($shipment->items && $shipment->items->count() > 0) { foreach ($shipment->items as $savedItem) { $oldItems[] = [ 'item_name' => $savedItem->item_name, 'item_description' => $savedItem->item_description, 'hscode' => $savedItem->hscode, 'uom_id' => $savedItem->uom_id, 'unit_quantity' => $savedItem->unit_quantity, 'unit_price' => $savedItem->unit_price, 'declared_value_inr' => $savedItem->declared_value_inr, 'declared_value_usd' => $savedItem->declared_value_usd, ]; } } if (count($oldItems) === 0) { $oldItems = [[ 'item_name' => $shipment->item_name, 'item_description' => $shipment->item_description, ]]; } } $storedFigures = $shipment->shippingFigures(); $savedNotax = old('notax_shipping_amount', $storedFigures['notax']); $savedGst = old('gst_amount', $storedFigures['gst']); $savedShippingTotal = old('shipping_amount', $storedFigures['shipping']); $savedNotaxValue = ($savedNotax === null || $savedNotax === '') ? null : (float) $savedNotax; $savedGstValue = ($savedGst === null || $savedGst === '') ? null : (float) $savedGst; $savedShippingValue = ($savedShippingTotal === null || $savedShippingTotal === '') ? null : (float) $savedShippingTotal; $showSavedRate = $savedNotaxValue !== null || $savedShippingValue !== null; $openPhotos = false; if ($errors->any()) { foreach ($errors->keys() as $errorKey) { if (strpos((string) $errorKey, 'photos') === 0) { $openPhotos = true; break; } } } $photoCount = $shipment->photos ? $shipment->photos->count() : 0; $summaryWeight = ($weightValue !== '' && $weightValue !== null) ? $weightValue.' '.$weightUnit : '—'; $summaryDims = ($lengthValue !== '' && $widthValue !== '' && $heightValue !== '') ? $lengthValue.' × '.$widthValue.' × '.$heightValue.' '.$dimensionUnit : '—'; $backUrl = route('wuser.shipments.show', \Illuminate\Support\Facades\Crypt::encrypt($shipment->id)); @endphp
Arrival & Item Intake
Edit arrival & item intake
Back
@if(session('success')) @endif @if($errors->any()) @endif
@csrf @method('PUT')
1
Customer Suite & Sender Details
Suite, sender name, and sender address.
@include('wuser.partials.delivery-badges', ['idPrefix' => 'kuser', 'popId' => 'kuser_details_card'])
@error('suite_number')
{{ $message }}
@enderror
@error('sender_name')
{{ $message }}
@enderror
@error('sender_address')
{{ $message }}
@enderror
Customs Filing Stream *
Port of Destination *
Cargo Type *
@error('HAWBNumber')
{{ $message }}
@enderror
2
Items
{{ count($oldItems) }} {{ count($oldItems) === 1 ? 'line' : 'lines' }}
@if(!empty($usdToInrRate))
FX Benchmark: 1 USD = ₹{{ number_format((float) $usdToInrRate, 2) }}
@endif
@foreach($oldItems as $itemIndex => $item) @endforeach
# Item Name HS Code (opt) Description UOM Unit Qty Unit Price (INR) Declared Value
{{ $loop->iteration }} @error('items.'.$itemIndex.'.item_name')
{{ $message }}
@enderror
₹ 0.00
$ 0.00 USD
0
₹ 0.00
$0.00 USD
Press Enter in Unit Price to add the next row. Declared value is unit price × quantity.
@error('items')
{{ $message }}
@enderror
3
Package
Dead scale weight
@error('weight')
{{ $message }}
@enderror
× ×
Pre-repack size
has('notes')) hidden @endif> @error('notes')
{{ $message }}
@enderror
Cancel
@endsection @push('scripts') @include('wuser.shipments.partials.declared-value-script') @endpush @include('admin.measurement-settings.partials.dimensional-weight-modal')