File: /var/www/vhost/disk-apps/dev-beg.teky.com.co/resources/views/inventories/form.blade.php
@csrf
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-12">
<label for="item_id">@lang('item')</label>
<select class="form-control select2" id="item_id" name="item_id" value="{{ $inventory->item_id ?? old('item_id') }}">
<option value="0" disabled selected>@lang('select')</option>
@forelse ($items as $item)
<option value="{{ $item->id }}"
{{ isset($inventory) && $inventory->item_id == $item->id ? 'selected' : '' }}>
{{ $item->code }} - {{ $item->name }}
</option>
@empty
<option value="0" disabled>@lang('no_options')</option>
@endforelse
</select>
</div>
<div class="form-group col-md-12">
<label for="location_id">@lang('location')</label>
<select class="form-control select2" id="location_id" name="location_id" value="{{ $inventory->location_id ?? old('location_id') }}">
<option value="0" disabled selected>@lang('select')</option>
@forelse ($locations as $location)
<option value="{{ $location->id }}"
{{ isset($inventory) && $inventory->location_id == $location->id ? 'selected' : '' }}>
{{ $location->code }}
</option>
@empty
<option value="0" disabled>@lang('no_options')</option>
@endforelse
</select>
</div>
@if (!isset($inventory))
<div class="form-group col-md-12">
<label for="quantity_available" class="ul-form__label">@lang('quantity_available'):</label>
<input type="number" class="form-control" id="quantity_available" name="quantity_available" required
value="{{ $inventory->quantity_available ?? old('quantity_available') }}">
</div>
@endif
<div class="form-group col-md-12">
<label for="reorder_point" class="ul-form__label">@lang('reorder_point'):</label>
<input type="number" class="form-control" id="reorder_point" name="reorder_point" required
value="{{ $inventory->reorder_point ?? old('reorder_point') }}">
</div>
<div class="form-group col-md-12">
<label for="lead_time" class="ul-form__label">@lang('lead_time'):</label>
<input type="number" class="form-control" id="lead_time" name="lead_time" required
value="{{ $inventory->lead_time ?? old('lead_time') }}">
</div>
<div class="form-group col-md-12">
<label for="lot_size" class="ul-form__label">@lang('lot_size'):</label>
<input type="text" class="form-control" id="lot_size" name="lot_size" required
value="{{ $inventory->lot_size ?? old('lot_size') }}">
</div>
<div class="form-group col-md-12">
<label for="max_stock_level" class="ul-form__label">@lang('max_stock_level'):</label>
<input type="number" class="form-control" id="max_stock_level" name="max_stock_level" required
value="{{ $inventory->max_stock_level ?? old('max_stock_level') }}">
</div>
</div>
</div>