@extends('layouts.dashboard') @section('title', 'Sales Orders') @section('page-title', 'Sales Orders') @section('breadcrumb') @endsection @section('content')
Sales Orders List
Export to CSV Upload New PDF
{{-- Filter form --}}
@if($soGroups->count() > 0)
@foreach($soGroups as $row) @php $packingDate = optional(\App\Models\Picking::where('so_no', $row->so_no)->orderBy('updated_at')->first())->updated_at; $pickings = $pickingsBySo[$row->so_no] ?? collect(); $salesOrders = $salesOrdersBySo[$row->so_no] ?? collect(); @endphp @endforeach
SO No Uploaded Date Packing Date Actions
{{ $row->so_no }} {{ $row->uploaded_at ? \Carbon\Carbon::parse($row->uploaded_at)->format('M d, Y') : '' }} {{ $packingDate ? \Carbon\Carbon::parse($packingDate)->format('M d, Y') : '' }}
{{-- Sales Order Items --}}
Sales Order Items
@if($salesOrdersBySo[$row->so_no] ?? false) @foreach($salesOrdersBySo[$row->so_no] as $so) @endforeach
Item Name Category HSN Qty Rate
{{ $so->item_name }} {{ $so->category }} {{ $so->hsn }} {{ $so->qty }} {{ $so->rate }}
@else
No sales order items found.
@endif
{{-- Picking Items --}}
Picking Details
@if($pickingsBySo[$row->so_no] ?? false) @foreach($pickingsBySo[$row->so_no] ?? [] as $picking) @endforeach
Item Dimension Weight Status
    @foreach($picking->items ?? [] as $itemJson) @php $item = json_decode($itemJson, true) ?? []; @endphp
  • {{ $item['item'] ?? '' }} (Qty: {{ $item['qty'] ?? 0 }})
  • @endforeach
{{ $picking->dimension }} {{ $picking->weight }} {{ ucfirst($picking->status) }}
@else
No picking data found.
@endif
{!! $soGroups->onEachSide(1)->links('pagination::bootstrap-4') !!}
@else
No sales orders found. Please upload a CSV file to add sales orders.
@endif
@endsection