@extends('admin.layout') @section('content')

Product Explorer

@include('admin.partials.back')
Products

{{ $stats['products'] ?? 0 }}

With Supplier

{{ $stats['with_supplier'] ?? 0 }}

Without Supplier

{{ $stats['without_supplier'] ?? 0 }}

Avg Margin

{{ $stats['avg_margin'] ?? 0 }}%

@csrf
@csrf
{{-- TOP OPPORTUNITIES PANEL --}} @if(isset($topOpportunities) && $topOpportunities->count())
🔥 Top Opportunities
@foreach($topOpportunities as $p) @endforeach
Product Winning Cost Best Cost Opportunity Score
{{ $p->reference }} @if($p->cost) € {{ number_format($p->cost,4) }} @else - @endif @if($p->best_cost) € {{ number_format($p->best_cost,4) }} @else - @endif @if($p->opportunity_percent !== null) +{{ $p->opportunity_percent }}% @else - @endif 🔥 {{ $p->opportunity_score }}
@endif
@forelse($products as $product) @empty @endforelse
ID Reference Winning Supplier Stock Cost Final Price Margin Suppliers Best Cost Worst Cost Spread Opportunity
@if(($product->suppliers_count ?? 0) > 0) @endif {{ $product->id }} {{ $product->reference }} {{ $product->winning_supplier ?? '-' }} {{ $product->winning_stock ?? '-' }} @if($product->cost) € {{ number_format($product->cost,4) }} @else - @endif @if($product->final_price) € {{ number_format($product->final_price,4) }} @else - @endif @if($product->margin !== null) {{ $product->margin }} % @else - @endif {{ $product->suppliers_count ?? 0 }} @if($product->best_cost) € {{ number_format($product->best_cost,4) }} @else - @endif @if($product->worst_cost) € {{ number_format($product->worst_cost,4) }} @else - @endif @if($product->spread) € {{ number_format($product->spread,4) }} @else - @endif @if($product->opportunity_percent !== null) +{{ $product->opportunity_percent }}% @else - @endif
No products found
@include('admin.components.pagination', ['items'=>$products]) @endsection