@extends('layouts.app') @section('title', __('manufacturing::lang.production')) @section('content')

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

{!! Form::open(['url' => action('\Modules\Manufacturing\Http\Controllers\ProductionController@store'), 'method' => 'post', 'id' => 'production_form', 'files' => true ]) !!} @component('components.widget', ['class' => 'box-primary'])
{!! Form::label('ref_no', __('purchase.ref_no').':') !!} @show_tooltip(__('manufacturing::lang.ref_no_tooltip')) {!! Form::text('ref_no', null, ['class' => 'form-control']); !!}
{!! Form::label('transaction_date', __('manufacturing::lang.mfg_date') . ':*') !!}
{!! Form::text('transaction_date', @format_datetime('now'), ['class' => 'form-control', 'readonly', 'required']); !!}
@if(count($business_locations) == 1) @php $default_location = current(array_keys($business_locations->toArray())) @endphp @else @php $default_location = null; @endphp @endif
{!! Form::label('location_id', __('purchase.business_location').':*') !!} @show_tooltip(__('tooltip.purchase_location')) {!! Form::select('location_id', $business_locations, $default_location, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select'), 'required']); !!}
{!! Form::label('variation_id', __('sale.product').':*') !!} {!! Form::select('variation_id', $recipe_dropdown, null, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select'), 'required']); !!}
{!! Form::label('recipe_quantity', __('lang_v1.quantity').':*') !!}
{!! Form::text('quantity', 1, ['class' => 'form-control input_number', 'id' => 'recipe_quantity', 'required', 'data-rule-notEmpty' => 'true', 'data-rule-notEqualToWastedQuantity' => 'true']); !!}
@endcomponent @component('components.widget', ['class' => 'box-primary', 'title' => __('manufacturing::lang.ingredients')])
@lang('manufacturing::lang.add_ingredients_tooltip')

@if(request()->session()->get('business.enable_lot_number') == 1)
{!! Form::label('lot_number', __('lang_v1.lot_number').':') !!} {!! Form::text('lot_number', null, ['class' => 'form-control']); !!}
@endif @if(session('business.enable_product_expiry'))
{!! Form::label('exp_date', __('product.exp_date').':*') !!}
{!! Form::text('exp_date', null, ['class' => 'form-control', 'readonly']); !!}
@endif
{!! Form::label('mfg_wasted_units', __('manufacturing::lang.waste_units').':') !!} @show_tooltip(__('manufacturing::lang.wastage_tooltip'))
{!! Form::text('mfg_wasted_units', 0, ['class' => 'form-control input_number']); !!}
{!! Form::label('production_cost', __('manufacturing::lang.production_cost').':') !!} @show_tooltip(__('manufacturing::lang.production_cost_tooltip'))
{!! Form::text('production_cost', 0, ['class' => 'form-control input_number']); !!}
{!! Form::hidden('final_total', 0, ['id' => 'final_total']); !!} {{__('manufacturing::lang.total_production_cost')}}: 0
{{__('manufacturing::lang.total_cost')}}: 0

@show_tooltip(__('manufacturing::lang.finalize_tooltip'))
@endcomponent {!! Form::close() !!}
@endsection @section('javascript') @include('manufacturing::production.production_script') @endsection