@extends('layouts.app') @section('title', 'Inventory Value Report') @section('content')

Inventory Value Report

{{ $reportPeriod }}

@if($warehouseBreakdown->count() > 0)

Warehouse Breakdown

@foreach($warehouseBreakdown as $warehouse)

{{ $warehouse->warehouse_name ?? 'Unassigned' }}

@if($warehouse->warehouse_code) {{ $warehouse->warehouse_code }} @endif
SKUs: {{ $warehouse->sku_count }}
Total Items: {{ number_format($warehouse->total_quantity) }}
Total Value: RM {{ number_format($warehouse->total_value, 2) }}
@endforeach
@endif
Total Items
{{ number_format($totalItems) }}
Total SKUs
{{ $inventory->count() }}
Total Inventory Value
RM {{ number_format($totalValue, 2) }}
@if($inventory->count() > 0)
@foreach($inventory as $item) @endforeach
SKU Product Name Quantity Warehouse Location Avg Cost Total Value
{{ $item->sku }}
{{ $item->product_name }}
{{ $item->quantity }} @if($item->warehouse_name)
{{ $item->warehouse_name }}
{{ $item->warehouse_code }}
@else - @endif
{{ $item->location ?? '-' }} @if($item->avg_cost > 0) RM {{ number_format($item->avg_cost, 2) }} @else - @endif @if($item->total_value > 0) RM {{ number_format($item->total_value, 2) }} @else RM 0.00 @endif
TOTAL INVENTORY VALUE: RM {{ number_format($totalValue, 2) }}
@else

No inventory items found

Start by creating a purchase order to add inventory.

@endif

Stock Out Summary ({{ $reportPeriod }})

@if($stockOutSummary->count() > 0) Export CSV @endif
@if($stockOutSummary->count() > 0)
@foreach($stockOutSummary as $item) @endforeach
SKU Product Name Warehouse Qty Out Transactions Type
{{ $item->sku }}
{{ $item->product_name ?? '-' }}
@if($item->warehouse_name)
{{ $item->warehouse_name }}
{{ $item->warehouse_code }}
@else - @endif
{{ number_format($item->total_out) }} {{ $item->transaction_count }} @php $types = explode(', ', $item->out_types ?? ''); $typeLabels = [ 'agent_sale' => 'Sales', 'order' => 'Order', 'transfer' => 'Transfer', 'adjustment' => 'Adjustment', ]; @endphp @foreach($types as $type) {{ $typeLabels[$type] ?? ucfirst($type) }} @endforeach
TOTAL STOCK OUT: {{ number_format($totalStockOut) }}
@else

No stock out recorded

No stock out transactions found for this period.

@endif

Note: Values are calculated based on the average unit cost from all purchase orders. Items without purchase history show as RM 0.00.

@endsection