@lang( 'manufacturing::lang.production_details' ) (@lang('purchase.ref_no'): #{{ $production_purchase->ref_no }})

@lang('messages.date'): {{ @format_date($production_purchase->transaction_date) }}

@lang('business.business'):
{{ $production_purchase->business->name }} {{ $production_purchase->location->name }} @if(!empty($production_purchase->location->landmark))
{{$production_purchase->location->landmark}} @endif @if(!empty($production_purchase->location->city) || !empty($production_purchase->location->state) || !empty($production_purchase->location->country))
{{implode(',', array_filter([$production_purchase->location->city, $production_purchase->location->state, $production_purchase->location->country]))}} @endif @if(!empty($production_purchase->business->tax_number_1))
{{$production_purchase->business->tax_label_1}}: {{$production_purchase->business->tax_number_1}} @endif @if(!empty($production_purchase->business->tax_number_2))
{{$production_purchase->business->tax_label_2}}: {{$production_purchase->business->tax_number_2}} @endif @if(!empty($production_purchase->location->mobile))
@lang('contact.mobile'): {{$production_purchase->location->mobile}} @endif @if(!empty($production_purchase->location->email))
@lang('business.email'): {{$production_purchase->location->email}} @endif
@lang('purchase.ref_no'): #{{ $production_purchase->ref_no }}
@lang('messages.date'): {{ @format_date($production_purchase->transaction_date) }}
@lang('purchase.purchase_status'): {{ ucfirst( $production_purchase->status ) }}
@lang('purchase.payment_status'): {{ ucfirst( $production_purchase->payment_status ) }}
@php $medias = $production_purchase->media; @endphp @if(count($medias)) @include('sell.partials.media_table', ['medias' => $medias]) @endif

@lang('manufacturing::lang.product_details')

@lang('sale.product'): {{$purchase_line->variations->full_name}} @if(request()->session()->get('business.enable_lot_number') == 1)
@lang('lang_v1.lot_number'): {{$purchase_line->lot_number}} @endif @if(session('business.enable_product_expiry'))
@lang('product.exp_date'): @if(!empty($purchase_line->exp_date)) {{@format_date($purchase_line->exp_date)}} @endif @endif
@lang('lang_v1.quantity'): {{@format_quantity($quantity)}} {{$unit_name}}
@lang('manufacturing::lang.waste_units'): {{@format_quantity($quantity_wasted)}} {{$unit_name}}

@lang('manufacturing::lang.ingredients')

@php $total_ingredient_price = 0; @endphp @foreach($ingredients as $ingredient) @php $price = $ingredient['total_price']; $total_ingredient_price += $price; @endphp @endforeach @if(!empty($ingredient_groups)) @foreach($ingredient_groups as $ingredient_group) @foreach($ingredient_group['ig_ingredients'] as $ingredient) @php $price = $ingredient['total_price']; $total_ingredient_price += $price; @endphp @endforeach @endforeach @endif
@lang('manufacturing::lang.ingredient') @lang('manufacturing::lang.input_quantity') @lang('manufacturing::lang.waste_percent') @lang('manufacturing::lang.final_quantity') @lang('manufacturing::lang.total_price')
{{$ingredient['full_name']}} @if(!empty($ingredient['lot_numbers']))
@lang('lang_v1.lot_n_expiry'): {{$ingredient['lot_numbers']}} @endif
{{@format_quantity($ingredient['quantity'])}} {{$ingredient['unit']}} {{@format_quantity($ingredient['waste_percent'])}} % {{@format_quantity($ingredient['final_quantity'])}} {{$ingredient['unit']}} {{$price}}
{{$ingredient_group['ig_name'] ?? ''}} @if(!empty($ingredient_group['ig_description'])) - {{$ingredient_group['ig_description']}} @endif
{{$ingredient['full_name']}} @if(!empty($ingredient['lot_numbers']))
@lang('lang_v1.lot_n_expiry'): {{$ingredient['lot_numbers']}} @endif
{{@format_quantity($ingredient['quantity'])}} {{$ingredient['unit']}} {{@format_quantity($ingredient['waste_percent'])}} % {{@format_quantity($ingredient['final_quantity'])}} {{$ingredient['unit']}} {{$price}}
@lang('manufacturing::lang.ingredients_cost') {{$total_ingredient_price}}
{{__('manufacturing::lang.production_cost')}}: {{$total_production_cost}}
{{__('manufacturing::lang.total_cost')}}: {{$production_purchase->final_total}}