@extends('layout') @section('content') @php $priceRecipe =0; @endphp @if (Session::has('success'))

{{ Session::get('success') }}


@elseif(Session::has('error'))

{{ Session::get('error') }}


@endif
@csrf

@foreach($recipeTypes as $i=>$type)
type) && in_array( $type->name, $product->type )) {{ 'checked' }}@endif id="inlineCheckbox{{$i}}" value="{{$type->name}}" name="typeRecipe[]"/>
@endforeach
{{--TABELLA INGREDIENTI BASE--}}

Ingredienti Base

@php $totQuantity = 0 @endphp @if(is_array($product['ingredients_base'])) @php ; $numsIngredients = 0; $totCostoStandard = 0; $totCiva = 0; setlocale(LC_MONETARY, 'it_IT'); $row=0; @endphp @foreach($product['ingredients_base'] as $ingrediente) @php $nameIngrediente = $ingrediente['name'] ?? ''; $idIngrediente = $ingrediente['id'] ?? ''; $quantityIngrediente = $ingrediente['quantity'] ?? ''; $umIngrediente = $ingrediente['um2'] ? $ingrediente['um2'] : (isset($ingrediente['um1']) ? $ingrediente['um1'] : ''); $cumIngrediente = $ingrediente['cum'] ?? 1; $coefficienteUmIngrediente = $ingrediente['cum'] ?? ''; $costoStandardIngrediente = (float)$ingrediente['costostandard'] ?? ''; $noteIngrediente = $ingrediente['note'] ?? ''; $iva = $ingrediente['iva'] ?? ''; $relativePrimary = $ingrediente['relativePrimary'] ?? ''; $percentPrimary = $ingrediente['percentPrimary'] ?? ''; $isPrimary = $ingrediente['primary'] ?? 0; $costoIngrediente = $costoStandardIngrediente * $quantityIngrediente * $coefficienteUmIngrediente; $totCostoStandard += (float)$costoStandardIngrediente; $costoCiva = number_format($costoIngrediente + ($costoIngrediente * $iva), 3, ',', '.'); $totCiva += (float) ($costoIngrediente + ($costoIngrediente * $iva)); if(isset($product->performance['value'])) //$priceRecipe = number_format($totCostoStandard * $product->performance['value']/100, 3, ',', '.'); $priceRecipe += $costoIngrediente; if($quantityIngrediente){ $totQuantity += $quantityIngrediente; } $numsIngredients++; @endphp @php $row++; @endphp @endforeach @endif
Order Primario Ingrediente base Quantità (Kg) % Massa % Primario Costo Std (€) Costo (€) % IVA Costo Ricetta CIVA(€)
@if(isset($primaryIngredients))
@endif
{{ number_format($costoStandardIngrediente, 3, ',', '.') }} €/{{$umIngrediente}} {{ number_format($costoIngrediente, 3, ',', '.') }} {{$iva * 100}} {{ $costoCiva }} delete
Massa: {{$totQuantity}} @if(isset($totCiva)){{ number_format($totCiva, 3, ',', '.') }}@endif
Aggiungi ingrediente base
{{--TABELLA INGREDIENTI--}}

Ingredienti

@php $totQuantity = 0 @endphp @if(is_array($product['ingredients'])) @php ; $numsIngredients = 0; $totCostoStandard = 0; $totCiva = 0; setlocale(LC_MONETARY, 'it_IT'); $row=0; @endphp @foreach($product['ingredients'] as $ingrediente) @php $nameIngrediente = $ingrediente['name'] ?? ''; $idIngrediente = $ingrediente['id'] ?? ''; $quantityIngrediente = $ingrediente['quantity'] ?? ''; $umIngrediente = $ingrediente['um2'] ? $ingrediente['um2'] : (isset($ingrediente['um1']) ? $ingrediente['um1'] : ''); $cumIngrediente = $ingrediente['cum'] ?? 1; $coefficienteUmIngrediente = $ingrediente['cum'] ?? ''; $costoStandardIngrediente = (float)$ingrediente['costostandard'] ?? ''; $noteIngrediente = $ingrediente['note'] ?? ''; $iva = $ingrediente['iva'] ?? ''; $relativePrimary = $ingrediente['relativePrimary'] ?? ''; $percentPrimary = $ingrediente['percentPrimary'] ?? ''; $isPrimary = $ingrediente['primary'] ?? 0; $costoIngrediente = $costoStandardIngrediente * $quantityIngrediente * $coefficienteUmIngrediente; $totCostoStandard += (float)$costoStandardIngrediente; $costoCiva = number_format($costoIngrediente + ($costoIngrediente * $iva), 3, ',', '.'); $totCiva += (float) ($costoIngrediente + ($costoIngrediente * $iva)); if(isset($product->performance['value'])) //$priceRecipe = number_format($totCostoStandard * $product->performance['value']/100, 3, ',', '.'); $priceRecipe += $costoIngrediente; if($quantityIngrediente){ $totQuantity += $quantityIngrediente; } $numsIngredients++; @endphp @php $row++; @endphp @endforeach @endif
Order Primario Ingrediente Quantità (Kg) % Massa % Primario Costo Std (€) Costo (€) % IVA Costo Ricetta CIVA(€)
@if(isset($primaryIngredients))
@endif
{{ number_format($costoStandardIngrediente, 3, ',', '.') }} €/{{$umIngrediente}} {{ number_format($costoIngrediente, 3, ',', '.') }} {{$iva * 100}} {{ $costoCiva }} delete
Massa: {{$totQuantity}} @if(isset($totCiva)){{ number_format($totCiva, 3, ',', '.') }}@endif
Aggiungi ingrediente
{{--TABELLA MODALITA--}}

Modalità

@if(is_array($product['modes'])) @foreach($product['modes'] as $mode) @endforeach @endif
Order Fase Descrizione Tempo (min.)
delete
Aggiungi modalità
{{--RIEPILOGO--}} @endif @endif
@endsection