@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) @section('content') @include('layouts.navbars.auth.topnav', ['title' => 'View'])
@include('components.alert')
@csrf

View Menu Info

Dish Info

Dish Photo


Ingredients

@php $totalCost = 0; @endphp @foreach ($recipes as $recipe) @php $ingredientCost = round(($recipe->ingredient->lowestPrice->ingredient_price / $recipe->ingredient->ingredient_weight) * $recipe->recipe_weight/1000, 2); $totalCost += $ingredientCost; @endphp @endforeach @foreach ($costSetting as $cost) @endforeach
Ingredient Weight Cost (RM)
{{ $recipe->ingredient->ingredient_name }}
{{ $recipe->recipe_weight }}
{{ $ingredientCost }}
Total Dish Cost
RM {{ $menu->dish->dish_cost }}
CALCULATING MENU PRICE
{{ $cost->cost_type }} Percentage (%)
{{ $cost->value }}
Price with {{ $cost->cost_type }} (RM)
@php $found = false; @endphp @foreach ($menu->dish->priceDetails as $priceDetail) @if ($priceDetail->price_type == $cost->cost_type) {{ $priceDetail->value }} @php $found = true; @endphp @break @endif @endforeach @if (!$found) - @endif
TOTAL ALL COST (RM)
RM {{ $menu->menu_price }}
@include('layouts.footers.auth.footer')
@endsection