@extends('layouts.app') @section('stitle',__('messages.Products')) @section('title', __('messages.Products')) @section('content')
@if(session()->get('title') == "success") @elseif (session()->get('title') == "error") @elseif($errors->any()) @else @endif
{{ $product->name }}

{{ $product->getCategory->name }}

@if( $product->stock_product =='0')
{{__('messages.NO')}}
@else
{{__('messages.YES')}}
@endif
{{ $product->sku }}

@if( $product->pricingMethod !='')
{{ $product->pricingMethod->name }}
@else
N\A
@endif
@if( $product->price !='')
{{ $product->price }}
@else
N\A
@endif
{{-- @if($product->getTax->name == 0)--}} {{--
N/A
--}} {{-- @else--}}
{{$product->getTax->name ?? 'N/A'}}
{{-- @endif--}}
@if( $product->costingMethod !='')
{{ $product->costingMethod->name }}
@else
N/A
@endif
@if( $product->cost !='')
{{ $product->cost }}
@else
N/A
@endif
{{ $product->unit }}
{{ $product->preparation_time }}
{{ $product->calories }}
@foreach($product->tag as $proTag) {{$proTag->name}} @endforeach
{{-- mod card--}}
@foreach($product->modifiers as $modifier) @if($modifier->modifierOption->count() > 0) @else No modifiers @endif @endforeach
{{__('messages.name')}} {{__('messages.REFERENCE')}} {{__('messages.MinimumLevel')}} {{__('messages.MaximumLevel')}} {{__('messages.ACTION')}}
{{$modifier->name}} {{$modifier->reference}}
{{__('messages.Edit')}} {{-- --}} {{-- --}} {{-- --}} Delete
@foreach($product->getIngredients as $ing) @endforeach
{{__('messages.name')}} {{__('messages.SKU')}} {{__('messages.QTY')}} {{__('messages.AppliesOn')}}
{{ $ing->item->name }} {{ $ing->item->sku }}
{{ $ing->item->ingredient_unit }}
@php $ingOrderTypes = array(); @endphp @foreach($ing->item->get_order_types as $ingot) @php $ingOrderTypes[] = $ingot->order_type_id; @endphp @php $ingOrderTypesId[] = $ingot->order_type_id; @endphp @endforeach @foreach($order_types as $order_type) {{ $order_type->name }} @endforeach
@foreach($product->branches as $branches) {{$branches->name}} @endforeach
@endsection @push('my_scripts') @endpush