@if($item->itemCount->total_number <= $item->minimum_quantity)
This Item is Low in Quantity.
ONLY {{ $item->itemCount->total_number }} LEFT
@endif
Original Quantity: {{ $item->quantity }}
Quantity Left: {{ $item->itemCount->total_number }}
Minimum Quantity: {{ $item->minimum_quantity }}
Buying Price: {{ number_format($item->buying_price,2) }}xaf
Selling Price: {{ number_format($item->selling_price, 2) }}xaf
@if ($item->sold_as_group === 'Yes')
@php
$itemNumber = ($item->quantity) / ($item->group_number);
$totalBuying = $item->buying_price * $itemNumber;
$totalSelling = $item->selling_price * $itemNumber;
$profitMade = $totalSelling - $totalBuying;
@endphp
Sold as GRoup
Total Buying Price: {{ number_format($totalBuying, 2) }}xaf
Total Selling Price: {{ number_format($totalSelling, 2) }}xaf
Profit: {{ number_format($profitMade, 2) }}xaf
@else
@php
$totalBuying = $item->buying_price * $item->quantity;
$totalSelling = $item->selling_price * $item->quantity;
$profitMade = $totalSelling - $totalBuying;
@endphp
Total Buying Price: {{ number_format($item->buying_price * $item->quantity, 2) }}xaf
Total Selling Price: {{ number_format($item->selling_price * $item->quantity, 2) }}xaf
Profit: {{ number_format($profitMade, 2) }}xaf
@endif
{{-- @if ($item->sold_as_group === 'Yes')
Profit: {{ $profitMade }}
@endif --}}
Description: {!! $item->description ?? 'N/A' !!}
@if(Auth::guard('admin')->user()->type == 'admin')