@extends('layouts.erp') @section('title', $item->name) @section('page_title', $item->name) @section('page_sub', 'Réf. '.$item->reference.($item->brand ? ' · '.$item->brand : '')) @section('content') @php $fmt = fn ($n) => number_format((float)$n, 0, ',', ' ').' F'; $marge = (float)$item->sale_price - (float)$item->purchase_price; $pct = (float)$item->sale_price > 0 ? round($marge / $item->sale_price * 100, 1) : 0; @endphp