@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
|
Type
|
Product ID
|
Description
|
Brand
|
Warehouse | Location |
Qty
|
Unit |
Unit Price
|
Total
|
|---|---|---|---|---|---|---|---|---|---|
|
Return
Purchase
|
{{-- Product ID --}}
{{-- Description --}} | {{-- Brand --}} | {{-- Warehouse --}} | {{-- Location --}} | {{-- Quantity --}} | {{-- Unit --}} | {{-- Unit Price --}} | {{-- Total --}} | |
No items foundTry adjusting your search or filters |
|||||||||