@extends('admin.layouts.app') @section('title', 'Item-{{ $item->name }}') @section('content')

Item: {{ $item->name }}


Image
Item Name: {{ $item->name }}
@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' !!}

{{--

Orders Made On: {{ $item->name }}

@if(Auth::guard('admin')->user()->type == 'admin')
@forelse($item->orders as $order) @endforelse
Customer Name Item Quantity Total Price Status Action
{{ $order->customer_name }} {{ $order->item->name }} {{ $order->quantity }} {{ $order->amount }} Details
No Orders Yet. Please PROCESS AN ORDER
@else
@forelse($workerOrders as $order) @endforelse
Customer Name Item Quantity Total Price Status Action
{{ $order->customer_name }} {{ $order->item->name }} {{ $order->quantity }} {{ $order->amount }} Details
No Orders Yet. Please PROCESS AN ORDER
@endif --}}
@endsection