@php $n = 0; use \Milon\Barcode\DNS1D; $d = new DNS1D(); $cash_payment = 'cash_payment'; @endphp @foreach ($shipments as $shipment) @php $n++; @endphp
@php $system_logo = App\Models\Settings::where('group', 'general')->where('name','system_logo')->first(); @endphp
{{ get_general_setting('company_name', config('app.name')) }} {{$shipment->code}}
{{$shipment->reciver_address}}
@if($shipment->payment_type == Modules\Cargo\Entities\Shipment::POSTPAID && $shipment->payment_method_id != $cash_payment ) {{ __('cargo::view.POSTPAID') }}: @elseif($shipment->payment_type == Modules\Cargo\Entities\Shipment::PREPAID) {{ __('cargo::view.PREPAID') }}: @elseif($shipment->payment_type == Modules\Cargo\Entities\Shipment::POSTPAID && $shipment->payment_method_id == $cash_payment ) {{ __('cargo::view.cod') }}: @endif @if ($shipment->amount_to_be_collected && $shipment->amount_to_be_collected > 0) @if($shipment->payment_type == Modules\Cargo\Entities\Shipment::POSTPAID ) {{format_price($shipment->amount_to_be_collected + $shipment->tax + $shipment->shipping_cost + $shipment->insurance)}} @else {{format_price($shipment->amount_to_be_collected)}} @endif @else @if($shipment->payment_type == Modules\Cargo\Entities\Shipment::POSTPAID ) {{format_price($shipment->tax + $shipment->shipping_cost + $shipment->insurance)}} @else 0 @endif @endif
{{ __('cargo::view.total_weight') }}: {{$shipment->total_weight}} {{ __('cargo::view.KG') }}

@if($shipment->barcode != null) @php echo 'barcode'; @endphp @endif

@if($shipment->order_id != null) {{ __('cargo::view.order_id') }}: {{$shipment->order_id}} / @endif {{$shipment->code}} / {{$shipment->total_weight}} {{ __('cargo::view.KG') }} / {{\Carbon\Carbon::parse($shipment->shipping_date)->format('d-m-Y')}}
{{ __('cargo::view.from') }}: {{$shipment->client->name}}
{{$shipment->client_phone}}
{{$shipment->from_address->address}}
{{ __('cargo::view.to') }}: {{$shipment->reciver_name}}
{{$shipment->reciver_phone}}
{{$shipment->reciver_address}}
{{ __('cargo::view.contains') }}: @php $i=0; @endphp @foreach(Modules\Cargo\Entities\PackageShipment::where('shipment_id',$shipment->id)->get() as $package) @if ($i != 0 ), @endif{{$package->description}} @php $i++; @endphp @endforeach
@php $system_logo = App\Models\Settings::where('group', 'general')->where('name','system_logo')->first(); @endphp
{{ get_general_setting('company_name', config('app.name')) }} {{$shipment->code}}
{{$shipment->reciver_address}}
@if($shipment->payment_type == Modules\Cargo\Entities\Shipment::POSTPAID && $shipment->payment_method_id != $cash_payment ) {{ __('cargo::view.POSTPAID') }}: @elseif($shipment->payment_type == Modules\Cargo\Entities\Shipment::PREPAID) {{ __('cargo::view.PREPAID') }}: @elseif($shipment->payment_type == Modules\Cargo\Entities\Shipment::POSTPAID && $shipment->payment_method_id == $cash_payment ) {{ __('cargo::view.cod') }}: @endif @if ($shipment->amount_to_be_collected && $shipment->amount_to_be_collected > 0) @if($shipment->payment_type == Modules\Cargo\Entities\Shipment::POSTPAID ) {{format_price($shipment->amount_to_be_collected + $shipment->tax + $shipment->shipping_cost + $shipment->insurance)}} @else {{format_price($shipment->amount_to_be_collected)}} @endif @else @if($shipment->payment_type == Modules\Cargo\Entities\Shipment::POSTPAID ) {{format_price($shipment->tax + $shipment->shipping_cost + $shipment->insurance)}} @else 0 @endif @endif
{{ __('cargo::view.total_weight') }}: {{$shipment->total_weight}} {{ __('cargo::view.KG') }}

@if($shipment->barcode != null) @php echo 'barcode'; @endphp @endif

@if($shipment->order_id != null) {{ __('cargo::view.order_id') }}: {{$shipment->order_id}} / @endif {{$shipment->code}} / {{$shipment->total_weight}} {{ __('cargo::view.KG') }} / {{\Carbon\Carbon::parse($shipment->shipping_date)->format('d-m-Y')}}
{{ __('cargo::view.from') }}: {{$shipment->client->name}}
{{$shipment->client_phone}}
{{$shipment->from_address->address}}
{{ __('cargo::view.to') }}: {{$shipment->reciver_name}}
{{$shipment->reciver_phone}}
{{$shipment->reciver_address}}
{{ __('cargo::view.contains') }}: @php $i=0; @endphp @foreach(Modules\Cargo\Entities\PackageShipment::where('shipment_id',$shipment->id)->get() as $package) @if ($i != 0 ), @endif{{$package->description}} @php $i++; @endphp @endforeach
{{ __('cargo::view.shipment_code') }}: {{$shipment->code}}
{{ __('cargo::view.shipment_code') }}: {{\Carbon\Carbon::parse($shipment->shipping_date)->format('d-m-Y')}}
@if($shipment->collection_time != null)
{{ __('cargo::view.collection_time') }}: {{$shipment->collection_time}} /
@endif
@foreach(Modules\Cargo\Entities\PackageShipment::where('shipment_id',$shipment->id)->get() as $package)
{{$package->description}}
{{ __('cargo::view.qty') }}: {{$package->qty}}
@if(isset($package->package->name))
{{ __('cargo::view.package_type') }}: {{json_decode($package->package->name, true)[app()->getLocale()]}}
@endif
{{ __('cargo::view.weigh_length_width_height') }}: {{$package->weight." ".__('cargo::view.KG')." x ".$package->length." ".__('cargo::view.CM')." x ".$package->width." ".__('cargo::view.CM')." x ".$package->height." ".__('cargo::view.CM')}}

@endforeach
@if($shipment->barcode != null)
@php echo 'barcode'; @endphp
@endif
@if(count($shipments) > $n)
@endif
@endforeach