diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/ordering/NewProductsView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/ordering/NewProductsView.js index d0fa2ab166b3f9ccded62b5ba6e27173da135d79..d186db0df6e9b0b45b97e36dea480c12363a349e 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/ordering/NewProductsView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/ordering/NewProductsView.js @@ -58,20 +58,22 @@ function NewProductsView(newProductsController, newProductsModel) { } }); - var priceField = FormUtil.getRealInputField(null, "Price", true); + var priceField = FormUtil.getRealInputField(null, "Price", false); priceField.change(function() { var value = $(this).val(); - try { - var valueParsed = parseFloat(value); - if("" + valueParsed === "NaN") { + if(value) { + try { + var valueParsed = parseFloat(value); + if("" + valueParsed === "NaN") { + Util.showError("Please input a correct price."); + $(this).val(""); + } else { + $(this).val(valueParsed); + } + } catch(err) { Util.showError("Please input a correct price."); $(this).val(""); - } else { - $(this).val(valueParsed); } - } catch(err) { - Util.showError("Please input a correct price."); - $(this).val(""); } });