@extends('layouts.master_backend') @section('content') @php $flag=0; $heading=lang_trans('heading_add_product'); if(isset($data_row) && !empty($data_row)){ $flag=1; $heading=lang_trans('heading_update_product'); } @endphp

{{$heading}}


@if($flag==1) {{ Form::model($data_row,array('url'=>route('save-product'),'id'=>"update-product-form", 'class'=>"form-horizontal form-label-left")) }} {{Form::hidden('id',null)}} @else {{ Form::open(array('url'=>route('save-product'),'id'=>"add-product-form", 'class'=>"form-horizontal form-label-left")) }} @endif
{{Form::text('name',null,['class'=>"form-control col-md-7 col-xs-12", "id"=>"product_name", "required"=>"required"])}}
@if($flag==0)
{{Form::number('stock_qty',null,['class'=>"form-control col-md-7 col-xs-12", "id"=>"prod_quantity", "required"=>"required"])}}
{{ Form::select('measurement',getUnits(),null,['class'=>'form-control','placeholder'=>lang_trans('ph_select')]) }}
@else
{{ Form::select('measurement',getUnits(),$data_row->measurement,['class'=>'form-control','placeholder'=>lang_trans('ph_select')]) }}
{{Form::number('curr_stock',$data_row->stock_qty,['class'=>"form-control col-md-7 col-xs-12", "id"=>"prod_quantity", "readonly"=>"readonly"])}}
@endif
{{ Form::select('status',config('constants.LIST_STATUS'),1,['class'=>'form-control']) }}
@endsection