Remove unnecessary variables and add refactored functionality to purchase price
This commit is contained in:
parent
9301c7e285
commit
52a90e05be
6
resources/assets/js/views/common/items.js
vendored
6
resources/assets/js/views/common/items.js
vendored
@ -35,7 +35,6 @@ const app = new Vue({
|
||||
',.',
|
||||
',,'
|
||||
],
|
||||
splice_value: null,
|
||||
}
|
||||
},
|
||||
|
||||
@ -63,8 +62,9 @@ const app = new Vue({
|
||||
|
||||
for (let item of this.regex_condition) {
|
||||
if (this.form.purchase_price.includes(item)) {
|
||||
this.splice_value = this.form.purchase_price.replace(item, '');
|
||||
this.form.purchase_price = this.splice_value;
|
||||
const removeLastChar = newVal.length - 1
|
||||
const inputShown = newVal.slice(0, removeLastChar)
|
||||
this.form.purchase_price = inputShown;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user