Make it possible to change a products stock QU after it was once added to stock (closes #1326)

This commit is contained in:
Bernd Bestel
2022-03-13 17:09:07 +01:00
parent 7532626123
commit 7ea9984fd3
6 changed files with 61 additions and 31 deletions

View File

@@ -331,20 +331,12 @@
<div class="form-group">
<label for="qu_id_stock">{{ $__t('Quantity unit stock') }}</label>
<i class="fas fa-question-circle text-muted"
data-toggle="tooltip"
data-trigger="hover click"
title="{{ $__t('Quantity unit stock cannot be changed after first purchase') }}"></i>
<select required
class="custom-control custom-select input-group-qu"
id="qu_id_stock"
name="qu_id_stock"
@if($mode=='edit'
)
disabled
@endif>
name="qu_id_stock">
<option></option>
@foreach($quantityunits as $quantityunit)
@foreach($quantityunitsStock as $quantityunit)
<option @if($mode=='edit'
&&
$quantityunit->id == $product->qu_id_stock) selected="selected" @endif value="{{ $quantityunit->id }}" data-plural-form="{{ $quantityunit->name_plural }}">{{ $quantityunit->name }}</option>