@inject('lineUnits', 'App\Services\UnitService') @php $canEditLine = auth()->user()?->can('update', $batch); $rawQty = $ing->quantity !== null ? rtrim(rtrim(number_format((float) $ing->quantity, 3, '.', ''), '0'), '.') : ''; $unitOpts = ['g' => 'g', 'kg' => 'kg', 'ml' => 'ml', 'l' => 'L', 'unit' => 'ud']; @endphp
  • {{ $ing->name }} @if($ing->notes) — {{ $ing->notes }} @endif @if($ing->quantity !== null) {{ $lineUnits->format((float) $ing->quantity, $ing->unit ?? 'unit', auth()->user()) }} @endif @if($canEditLine) ✎ @endif
    @if($canEditLine) @endif