@php $items = $record->items()->with(['product', 'warehouse', 'location'])->get(); $isEditable = $editable ?? false; $itemsData = $items->map(function($item) { return [ 'id' => $item->id, 'is_return' => $item->is_return, 'product_id_raw' => $item->product_id_raw, 'description' => $item->description, 'brand' => $item->brand, 'warehouse_name' => $item->warehouse->name ?? 'Go-Parts GA', 'location_name' => $item->location->location ?? 'Default', 'quantity' => $item->quantity, 'unit' => $item->unit, 'unit_price' => floatval($item->unit_price), 'total_price' => floatval($item->total_price), 'type' => $item->is_return ? 'return' : 'purchase', ]; })->toArray(); @endphp
{{-- Search and Filters --}}
{{-- Results Count --}}
Showing of items
{{-- Table --}}
Type
Product ID
Description
Brand
Warehouse Location
Qty
Unit
Unit Price
Total
{{-- Pagination --}}
Showing to of results