{!! Form::open(['url' => action([\Modules\Maintenance\Http\Controllers\SparePartController::class, 'update'], [$spare_part->id]), 'method' => 'put', 'id' => 'mm_spare_part_form']) !!}
{!! Form::label('part_number', __('maintenance::lang.part_number') . ':*') !!}
{!! Form::text('part_number', $spare_part->part_number, ['class' => 'form-control', 'required']) !!}
{!! Form::label('name', __('maintenance::lang.name') . ':*') !!}
{!! Form::text('name', $spare_part->name, ['class' => 'form-control', 'required']) !!}
{!! Form::label('supplier_id', __('maintenance::lang.supplier') . ':') !!}
{!! Form::select('supplier_id', $customers, $spare_part->supplier_id, ['class' => 'form-control select2', 'placeholder' => __('maintenance::lang.select'), 'style' => 'width:100%']) !!}
{!! Form::label('product_id', __('maintenance::lang.pos_product') . ':') !!}
{!! Form::select('product_id', $products ?? [], $spare_part->product_id, ['class' => 'form-control select2', 'placeholder' => __('maintenance::lang.select'), 'style' => 'width:100%']) !!}
{!! Form::label('location_id', __('maintenance::lang.stock_location') . ':') !!}
{!! Form::select('location_id', $locations ?? [], $spare_part->location_id, ['class' => 'form-control select2', 'placeholder' => __('maintenance::lang.select'), 'style' => 'width:100%']) !!}
{!! Form::label('quantity', __('maintenance::lang.quantity') . ':') !!}
{!! Form::number('quantity', $spare_part->quantity, ['class' => 'form-control', 'min' => '0', 'step' => '0.01']) !!}
{!! Form::label('unit', __('maintenance::lang.unit') . ':') !!}
{!! Form::text('unit', $spare_part->unit, ['class' => 'form-control']) !!}
{!! Form::label('min_stock', __('maintenance::lang.min_stock') . ':') !!}
{!! Form::number('min_stock', $spare_part->min_stock, ['class' => 'form-control', 'min' => '0', 'step' => '0.01']) !!}
{!! Form::label('max_stock', __('maintenance::lang.max_stock') . ':') !!}
{!! Form::number('max_stock', $spare_part->max_stock, ['class' => 'form-control', 'min' => '0', 'step' => '0.01']) !!}
{!! Form::label('purchase_price', __('maintenance::lang.purchase_price') . ':') !!}
{!! Form::number('purchase_price', $spare_part->purchase_price, ['class' => 'form-control', 'min' => '0']) !!}
{!! Form::label('notes', __('maintenance::lang.notes') . ':') !!}
{!! Form::textarea('notes', $spare_part->notes, ['class' => 'form-control', 'rows' => 2]) !!}
{!! Form::close() !!}