@extends('layouts.erp') @section('title', $item->name) @section('page_title', $item->name) @section('page_sub', ($item->city ?? 'Côte d\'Ivoire').' · '.($item->contact_person ? 'Géré par '.$item->contact_person : $item->type)) @section('content') @php $fmt = fn ($n) => number_format((float)$n, 0, ',', ' ').' F'; $achats = $item->sales->where('document_type','facture')->sum('total'); $du = $item->sales->where('document_type','facture')->sum(fn ($s) => $s->balance); @endphp