@foreach ($recipe->mixins->filter(fn($mixin) => $mixin->hasValidStockItem()) as $mixin)
{{ $mixin->stock_item_name }}
{{ number_format($mixin->quantity, 2, ',', '.') }}{{ uom_localized($mixin->stockItem->uom) }}
{{ number_format($mixin->stockItem->getLastSupplierPriceAttribute() * $mixin->quantity, 2,
',', '.') }}₺
@endforeach
--}}
@php
$cost = $recipe->totalBaseCost;
@endphp
MALİYET:
{{ number_format($cost, 2, ',', '.') }}₺
SATIŞ FİYATI:
{{ number_format($recipe->gross_price, 2, ',', '.') }}₺
KARLILIK ORANI:
@if ($recipe->gross_price > 0)
@php
$margin = (($recipe->gross_price - $cost) / $recipe->gross_price) * 100;
$marginColor = $margin >= 0 ? 'text-teal-600' : 'text-rose-600';
@endphp
{{ number_format($margin, 2, ',', '.') }}
@else
0,00
@endif
%