{{ date('d - M - Y', strtotime($invoice_detail->shipment->invoice_date)) }} |
{{ $invoice_detail->shipment->invoice_number }} |
{{ $invoice_detail->shipment->consignor->name }} |
{{ $invoice_detail->contract->consignee->name }} |
{{ $invoice_detail->bank_gross }} - {{ optional($invoice_detail->contract->sales_advice->base)->name }}
{{ $invoice_detail->payable_handling_charge }} |
@if ($invoice_detail->shipment->multi_status != 'yes')
{{ $invoice_detail->contract->number }} |
{{ $invoice_detail->contract->contract_date }} |
@else
@php
$ch_mk_num = [];
foreach ($all_contracts as $ic) {
$ch_mk_num[] = $ic->contract->mk_number;
$ch_type[] = $ic->type;
}
$allValuesAreTheSame = count(array_unique($ch_mk_num)) === 1;
// dd(collect($ch_type)->search('range'));
@endphp
@if ($allValuesAreTheSame)
@php
$fc = $all_contracts->where('type', 'range')->first();
$lc = $all_contracts->where('type', 'range')->last();
@endphp
@if (collect($ch_type)->search('range') !== false)
{{ $fc->contract->number }} - {{ $lc->contract->number }}
@endif
@if (collect($ch_type)->search('single') !== false)
@foreach ($all_contracts->where('type', 'single') as $ic)
{{ strtoupper($ic->contract->number) }}
@endforeach
@endif
@endif
|
@foreach ($invoice_detail->shipment->multi_contracts as $ic)
@if ($loop->last)
{{ $ic->contract->contract_date }} |
@endif
@endforeach
|
@endif
{{ $invoice_detail->shipment->multi_contracts->sum('tonnage_shipped') }} |
{{ optional($invoice_detail->shipment->vessel)->name }} |
{{ $invoice_detail->contract->destinationport->name }} |