@extends('layouts.app') @section('title', 'Edit Shipment') @push('styles') @include('wuser.shipments.partials.receive-form-styles') @endpush @section('content') @php $selectedSuite = old('suite_number', $shipment->suite_number); $oldItems = old('items'); if (!is_array($oldItems) || count($oldItems) === 0) { if ($shipment->items && $shipment->items->count() > 0) { $oldItems = []; foreach ($shipment->items as $savedItem) { $oldItems[] = [ 'item_name' => $savedItem->item_name, 'item_description' => $savedItem->item_description, ]; } } else { $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; $selectedDestination = old('port_of_destination', $shipment->port_of_destination ?: 'male'); $selectedCargo = old('cargo_type', $shipment->cargo_type ?: 'ecommerce'); $openPhotos = $shipment->photos && $shipment->photos->count() > 0; if (!$openPhotos && $errors->any()) { foreach ($errors->keys() as $errorKey) { if (strpos((string) $errorKey, 'photos') === 0) { $openPhotos = true; break; } } } @endphp

Edit receiving shipment

Update {{ $shipment->tracking_number ?: 'this package' }}.

Back
@if(session('success')) @endif @if($errors->any()) @endif
@csrf @method('PUT')
1

Customer

Select the suite number. Customer details appear once a suite is chosen.

@error('suite_number')
{{ $message }}
@enderror
Port of Destination *
Cargo Type *
@error('HAWBNumber')
{{ $message }}
@enderror
2

Items

Add each item in this shipment.

@foreach($oldItems as $itemIndex => $item) @endforeach
Item Name * Item Description
@error('items.'.$itemIndex.'.item_name')
{{ $message }}
@enderror
@error('items')
{{ $message }}
@enderror
3

Sender

Who sent this package. Both fields are optional.

4

Package

Declared value is for the whole shipment. Enter USD or INR and the other amount fills in. Size and weight are optional.

@include('wuser.shipments.partials.declared-value-fields', [ 'declaredValueUsd' => $shipment->declared_value, 'declaredValueInr' => $shipment->declared_value_inr, ])
6

Notes

Anything else the team should know about this package.

Cancel
@endsection @push('scripts') @include('wuser.shipments.partials.declared-value-script') @endpush @include('admin.measurement-settings.partials.dimensional-weight-modal')