Description of Goods: | @php $desc = '' @endphp @if(strpos($shipment->description, 'PO No') === FALSE) @php $desc = $shipment->description @endphp @else @php $desc = trim(substr($shipment->description, 0, strpos($shipment->description, 'PO No'))) @endphp @endif {{$desc}} |
@if($shipment->poNumber !== null) PO NO: {{$shipment->poNumber}} @endif | |
@if($shipment->batch !== null) BATCH #: {{$shipment->batch}} @endif | |
@if($shipment->mopiNumber !== null) MOPI No: {{$shipment->mopiNumber}} @endif | |
@if($shipment->hsCode !== null) HS CODE: {{$shipment->hsCode}} @endif | |
@php $gname = '' @endphp @foreach($shipment->grades as $grade) @if($grade->pivot->type === 2) @php $gname = $grade->name @endphp @endif @endforeach @if($gname !== '') GRADE NAME: {{ $gname }} @endif | |
Total Net Weight: | @php $net = 0 @endphp @foreach($shipment->consignments as $consignment) @if(!empty($consignment->cartons)) @php $net += $consignment->cartons->sum('net') @endphp @endif @if(!empty($consignment->bales)) @php $net += $consignment->bales->sum('mass') @endphp @endif @endforeach {{number_format($net, 2, '.', ',')}} |
Grade/Lot: | @php $grades = array(); @endphp @foreach($shipment->consignments as $consignment) @foreach($consignment->grades as $grade) @if(!in_array($grade->name, $grades)) @php array_push($grades, $grade->name) @endphp @endif @endforeach @endforeach @if(count($grades) > 0) {{ implode(", ", $grades) }} @endif |
@php $lines = '' @endphp @php $last = '' @endphp @php $k = 0 @endphp @foreach($shipment->consignments as $consignment) @if(count($consignment->cartons) > 0) @for($i = 0; $i < count($consignment->cartons); $i++) @if($i === 0) @php $last = $consignment->cartons[$i]->shippingNumber @endphp @endif @if($i > 0) @if(($consignment->cartons[$i]->shippingNumber - $consignment->cartons[$i - 1]->shippingNumber) > 1) @php $lines = $lines.", ".$last."-".$consignment->cartons[$i - 1]->shippingNumber @endphp @php $last = $consignment->cartons[$i]->shippingNumber @endphp @endif @endif @php $k += 1 @endphp @endfor @if($last != $consignment->cartons[count($consignment->cartons) - 1]->shippingNumber) @php $lines = $lines.", ".$last."-".$consignment->cartons[count($consignment->cartons) - 1]->shippingNumber @endphp @else @php $lines = $lines.", ".$last @endphp @endif @endif @endforeach @php $lines = trim($lines, ", ") @endphp @if($lines == '') @if(!empty($consignment->bales)) @for($i = 0; $i < count($consignment->bales); $i++) @if($i == 0) @php $last = $consignment->bales[$i]->progno @endphp @endif @if($i > 0) @if(($consignment->bales[$i]->progno - $consignment->bales[$i - 1]->progno) > 1) @php $lines = $lines.", ".$last."-".$consignment->bales[$i - 1]->progno @endphp @php $last = $consignment->bales[$i]->progno @endphp @endif @endif @endfor @if($last != $consignment->bales[count($consignment->bales) - 1]->progno) @php $lines = $lines.", ".$last."-".$consignment->bales[count($consignment->bales) - 1]->progno @endphp @else @php $lines = $lines.", ".$last @endphp @endif @endif @php $lines = trim($lines, ", ") @endphp @endif CARTON RANGE: {{$lines}} | |
Consignee @if(stripos($consignee->name, 'jt') !== false) per SWB @endif |
{{ $consignee->name }} {{ $consignee->address }} |
__________________ Name |
__________________ Signature |