@php
$url = route('stock.store');
$method = 'post';
if(isset($stock)){
$url = route('stock.update', $stock->id);
$method = 'PUT';
}
@endphp
{!! Form::open([
'url' => $url,
'method' => $method,
'id' => 'stock_form',
]) !!}
@component('components.widget', ['class' => 'box-solid'])
{!! Form::label('location_id', __('purchase.business_location') . ':*') !!}
{!! Form::select('location_id', $business_locations, $stock->location_id??null, [
'class' => 'form-control select2',
'placeholder' => __('messages.please_select'),
'required',
]) !!}
{!! Form::label('name', __('lang.name') .' '.__('lang.stock'). ':') !!}
{!! Form::text('name', $stock->name??null, ['class' => 'form-control', 'required']) !!}
@endcomponent
{!! Form::close() !!}
@stop
@section('javascript')
@endsection
@cannot('view_purchase_price')
@endcannot