@foreach($drops as $d=>$drop) @if(!isset($this->chunk[$d])) {{dd($this->chunk, $drops)}} @endif @if($this->chunk[$d]['is_first_in_shipment']) @endif @if($columns['Issue']) @endif {{$drop['id']}}
@if($columns['Season']) {{ $drop['customer_order_lines']['customer_orders']['seasons']['description'] }} @endif @if($columns['Factory']) {{ $drop['customer_order_lines']['colourways']['style_versions']['factories']['name'] }} @endif @if($columns['Customer']) {{ $drop['customer_order_lines']['customer_orders']['customers']['name'] }} @endif @if($columns['Order No']) {{ $drop['customer_order_lines']['customer_orders']['customer_po'] }}
{{ date("d-M", strtotime($drop['customer_order_lines']['customer_orders']['order_date'])) }} @endif @if($columns['Style']) {{ $drop['customer_order_lines']['colourways']['style_versions']['styles']['designs_id'] }} ({{$drop['customer_order_lines']['colourways']['style_versions']['name']}})
{{ $drop['customer_order_lines']['colourways']['style_versions']['styles']['customer_ref'] ?? "" }}

@endif @if($columns['Description']) {{ Str::title($drop['customer_order_lines']['colourways']['style_versions']['styles']['designs']['description']) }} @endif @if($columns['Colour']) {{ Str::title($drop['customer_order_lines']['colourways']['name']) }} @endif @if($columns['Image']) @if(!empty($drop['customer_order_lines']['colourways']['img_thumb'])) @endif @endif @if($columns['Sizes']) @if(!empty($drop['customer_order_lines']['customer_order_line_quantities'])) @foreach($drop['customer_order_lines']['customer_order_line_quantities'] as $size) @endforeach @if($columns['Sizes - Ordered']) @foreach($drop['shipment_line_sizes'] as $s=>$size) @endforeach {{-- --}} @endif @foreach($drop['shipment_line_sizes'] as $s => $size) @endforeach @if($columns['Sizes - Price']) @foreach($drop['customer_order_lines']['customer_order_line_quantities'] as $size) @endforeach @foreach($drop['customer_order_lines']['customer_order_line_quantities'] as $size) @endforeach @endif
{{ $size['sizes']['name'] }}
Ordered @if(Gate::check('order:update')) @else {{ $size['qty'] }}
@endif
{{ $drop['total_pieces'] }}
Shipped @if(Gate::check('order:update') || Gate::check('finance:update')) @else {{ $size['shipped_qty'] }}
@endif
{{$drop['total_pieces_shipped']}}
Price {{$drop['customer_order_lines']['customer_orders']['customers']['currency'] . number_format($size['price_model']['quote'] ?? 0, 2)}}
CMT {{$drop['customer_order_lines']['colourways']['style_versions']['factories']['currency'] . number_format($size['price_model']['cmt'] ?? 0, 2)}}
@endif @endif @if($columns['Total Qty']) {{ $drop['total_pieces'] }} @endif @if($columns['Total Shipped']) {{ $drop['total_pieces_shipped'] }} @endif @if($columns['Sealer Sample']) {{Illuminate\Support\Str::title($drop['sealer_sample']['status'])}}
@if($drop['sealer_sample']['date_sent']) {{date("d-M", strtotime($drop['sealer_sample']['date_sent']))}} @endif {{$drop['sealer_sample']['note']}}

{{$drop['sealer_sample']['comments']}}

@endif @if($columns['Shipment Sample']) {{Illuminate\Support\Str::title($drop['shipment_sample']['status'])}}
@if($drop['shipment_sample']['date_sent']) {{date("d-M", strtotime($drop['shipment_sample']['date_sent']))}} @endif {{$drop['shipment_sample']['note']}}

{{$drop['shipment_sample']['comments']}}

@endif @if($columns['ExFty']) @if(!empty($drop['first_exfty'])){{ date_format(date_create($drop['first_exfty']), "d-M") }}@endif
@if(!empty($drop['first_exfty'])){{ date_format(date_create($drop['first_exfty']), "Y") }}@endif @endif @if($columns['Revised ExFty']) @if(!empty($drop['exfty'])){{ date_format(date_create($drop['exfty']), "d-M") }}@endif
@if(!empty($drop['exfty'])){{ date_format(date_create($drop['exfty']), "Y") }}@endif @endif @if($columns['Customer exFty']) @if(!empty($drop['customer_order_lines']['factory_cust_date'])){{ date_format(date_create($drop['customer_order_lines']['factory_cust_date']), "d-M") }}@endif
@if(!empty($drop['customer_order_lines']['factory_cust_date'])){{ date_format(date_create($drop['customer_order_lines']['factory_cust_date']), "Y") }}@endif @endif @if($columns['Customer Into w/h']) @if(!empty($drop['customer_order_lines']['wh_cust_date'])){{ date_format(date_create($drop['customer_order_lines']['wh_cust_date']), "d-M") }}@endif
@if(!empty($drop['customer_order_lines']['wh_cust_date'])){{ date_format(date_create($drop['customer_order_lines']['wh_cust_date']), "Y") }}@endif @endif @if($columns['Total CMT']) {{$drop['customer_order_lines']['colourways']['style_versions']['factories']['currency']}}{{$drop['total_prices']['subtotal']}} @endif @if($columns['Total Sale']) {{$drop['customer_order_lines']['customer_orders']['customers']['currency']}}{{$drop['total_prices']['quote']}} @endif @if($columns['Transport Budget']) £{{number_format($drop['total_prices']['transport_budget'], 2)}} @endif @if($columns['Incoterms']) {{$drop['customer_order_lines']['customer_orders']['incoterms']}} @endif @if($columns['Truck']) {{$drop['shipment_id'] ?? ""}}
{{$drop['shipments']['transporters']['name'] ?? ""}}
({{$drop['shipments']['organiser'] ?? ""}})
{{$drop['shipments']['transporters']['currency'] ?? ""}}{{$drop['shipments']['cost'] ?? ""}} @endif @if($columns['Collection']) @if(!empty($drop['collection_date'])){{ date_format(date_create($drop['collection_date']), "d-M") }}@endif
{{$drop['collection_date'] ? date_format(date_create($drop['collection_date']), "Y") : ""}}
@endif @if($columns['Customs ERN']) {{$drop['shipments']['customs_submitted_text'] ?? ""}} @endif @if($columns['Shipped']) {{$drop['complete'] ? 'Y' : 'N'}} {{-- ADD WEIGHTS ETC FIELDS HERE --}} @endif @if($columns['ASOS 3% Discount Price'])
@if($drop['customer_order_lines']['customer_orders']['customers_id'] == 6) {{$drop['customer_order_lines']['customer_orders']['customers']['currency']}}{{number_format($drop['customer_order_lines']['customer_order_line_quantities'][0]['price_model']['quote'] ?? 0 * 0.97,2)}} @endif
@endif @if($columns['RT Invoice']) @can('finance:update') @else @can('finance:read') {{$drop['rt_invoice']}} @endcan @endcan @endif @if($columns['Factory Invoice']) @can('finance:update') @else @can('finance:read') {{$drop['factory_invoice']}} @endcan @endcan @endif @if($columns['Customs Invoice']) @can('finance:update') @else @can('finance:read') {{$drop['customs_agency_invoice']}} @endcan @endcan @endif @if($columns['Transporter Invoice']) @if($drop['shipments']) @can('finance:update') @else @can('finance:read') {{$drop['shipments']['transporter_invoice']}} @endcan @endcan @endif @endif @if($columns['Finance Complete'])
@can('finance:update') @else @can('finance:read') {{$drop['invoiced']}} @endcan @endcan
@endif @if($this->notesColsCount() != 0) @if(Gate::check('style:update') || Gate::check('order:update')) @else

{{$drop['notes']}}

@endif @endif @if($this->fnNotesColsCount() != 0) @if(Gate::check('finance:update')) @else

{{$drop['fn_notes']}}

@endif @endif @endforeach