@extends('layouts.app') @section('title', 'Raw Material Forecast') @section('content')

Raw Material Forecast

Predicted Stock Depletion & Purchase Recommendations

@csrf
Predictive Supply Chain Management

This analysis combines current inventory movements with active production plans to predict the exact day your stock will run out. Purchase recommendations are calculated based on a 14-day safety buffer.

Forecast Confidence
88.5%
@forelse($forecasts as $f) @php $daysRemaining = $f->predicted_shortage_at ? now()->diffInDays($f->predicted_shortage_at, false) : 0; @endphp @empty @endforelse
Raw Material Current Stock Avg. Daily Usage Days Remaining Predicted Shortage Recommended Purchase
{{ $f->product->name }}
SKU: {{ $f->product->sku }}
{{ number_format($f->current_stock, 2) }} {{ $f->product->unit_of_measure }}
{{ number_format($f->daily_consumption_avg, 2) }} / day {{ max(0, round($daysRemaining, 1)) }} Days @if($f->predicted_shortage_at)
{{ $f->predicted_shortage_at->format('M d, Y') }}
@else Stable stock @endif
{{ number_format($f->recommended_purchase_quantity, 2) }} {{ $f->product->unit_of_measure }}
Create Order
No material forecast data available.
@if($forecasts->hasPages()) @endif
@endsection