Merge pull request #17555 from grokability/#17490-use-numeric-for-purchase-cost

Fixed #17490: use numeric for purchase cost
This commit is contained in:
snipe
2025-08-10 20:30:15 +01:00
committed by GitHub
2 changed files with 2 additions and 1 deletions
@@ -1157,6 +1157,7 @@ dir="{{ Helper::determineLanguageDirection() }}">
$(inputElement).closest('.help-block').remove();
},
onfocusout: function(element) {
$(element).parent().removeClass('has-error');
return $(element).valid();
},
@@ -3,7 +3,7 @@
<label for="purchase_cost" class="col-md-3 control-label">{{ trans('general.purchase_cost') }}</label>
<div class="col-md-9">
<div class="input-group col-md-4" style="padding-left: 0px;">
<input class="form-control" type="text" name="purchase_cost" aria-label="purchase_cost" id="purchase_cost" value="{{ old('purchase_cost', Helper::formatCurrencyOutput($item->purchase_cost)) }}" maxlength="24" />
<input class="form-control" type="number" name="purchase_cost" min="0.00" max="10000000.000" step="0.001" aria-label="purchase_cost" id="purchase_cost" value="{{ old('purchase_cost', Helper::formatCurrencyOutput($item->purchase_cost)) }}" maxlength="24" />
<span class="input-group-addon">
@if (isset($currency_type))
{{ $currency_type }}