From bb61bc3f46bfa30ac81f5b8ef809e296df71d28c Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Wed, 21 Dec 2022 11:16:35 +0300 Subject: [PATCH] unused code ejected --- resources/assets/js/views/common/documents.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/assets/js/views/common/documents.js b/resources/assets/js/views/common/documents.js index 3273117ff..2f42857ce 100644 --- a/resources/assets/js/views/common/documents.js +++ b/resources/assets/js/views/common/documents.js @@ -818,9 +818,9 @@ const app = new Vue({ return; } - if (newVal != '' && newVal.search('^[-+]?([0-9]|[1-9][0-9]|100)*\.?[0-9]+$') !== 0) { + if (newVal != '' && newVal.search('^(?=.*?[0-9])[0-9.,]+$') !== 0) { this.form.discount = oldVal; - this.form.discount = this.form.discount ? this.form.discount.replace(',', '.') : ''; + this.form.discount.replace(',', '.'); return; } @@ -834,7 +834,7 @@ const app = new Vue({ } } - this.form.discount = this.form.discount ? this.form.discount.replace(',', '.') : ''; + this.form.discount.replace(',', '.'); }, 'form.loading': function (newVal, oldVal) {