@extends('layouts.location') @section('title', 'Short Picklist') @section('page-title', 'Short Picklist') @push('styles') @endpush @section('content')
Short Picklist (Hold Items)
@php $shortGroups = collect($shortPicklist ?? [])->groupBy('pic_id'); @endphp @if($shortGroups->isEmpty())
No short picklist items in hold status.
@else
{{-- --}} @foreach($shortGroups as $picId => $rows) @php $soList = $rows->pluck('sales_order_number')->unique()->implode(', '); $itemCount = $rows->count(); @endphp {{-- --}} @foreach($rows as $r) @endforeach @endforeach
PIC ID Sales Orders Items (Count)Bulk Actions
{{ $picId }} {{ $soList }} {{ $itemCount }}
SO: {{ $r->sales_order_number }}
SKU: {{ $r->sku }} | Rack: {{ $r->rack }}
Picked: {{ $r->picked_qty }} | Pick Qty: {{ $r->pick_qty ?? 0 }}
Status: {{ $r->status }}
{{--
--}}
@endif
{{--
Short Packlist (Hold SOs)
SO-level packing entries from so_packing with status = 'hold'.
@php $shortPackGroups = collect($shortPacklist ?? [])->groupBy('so_no'); @endphp @if($shortPackGroups->isEmpty())
No short packlist entries in hold status.
@else
@foreach($shortPackGroups as $soNo => $rows) @php $boxCount = $rows->count(); $totalQty = 0; foreach ($rows as $row) { try { $items = json_decode($row->items, true); if (is_array($items)) { foreach ($items as $it) { if (is_string($it)) { $it = json_decode($it, true); } if (is_array($it) && isset($it['qty'])) { $totalQty += (float)$it['qty']; } } } } catch (\Throwable $e) {} } $diffsForSo = collect($shortPackDiffs[$soNo] ?? []); @endphp @foreach($rows as $r) @php $boxVal = $r->box; $boxDecoded = null; try { $boxDecoded = json_decode($r->box, true); } catch (\Throwable $e) {} if (is_array($boxDecoded)) { $boxVal = implode(', ', $boxDecoded); } @endphp @endforeach @endforeach
SO No Boxes Items (Total Qty) Actions
{{ $soNo }} {{ $boxCount }} {{ $totalQty }}
Box: {{ $boxVal }}
Dimension: {{ $r->dimension }} | Weight: {{ $r->weight }}
Status: {{ $r->status }}
@if($diffsForSo->isNotEmpty())
Items:
@foreach($diffsForSo as $d) @endforeach
Item SO Qty Packed Qty Diff
{{ $d['item_name'] ?? '' }} {{ $d['so_qty'] ?? 0 }} {{ $d['packed_qty'] ?? 0 }} {{ $d['diff'] ?? 0 }}
@else
No quantity differences for this SO.
@endif
@endif
--}}
@endsection @push('scripts') @endpush