fix purchase order input bug

This commit is contained in:
omair saleh
2021-12-19 20:53:23 +08:00
parent 5fee337060
commit 085b1817e4
2 changed files with 3 additions and 8 deletions
@@ -42,19 +42,15 @@
data(){ data(){
return { return {
error: '', error: '',
parameters: { fix_amount: (Math.round((this.data.amount + Number.EPSILON) * 100) / 100).toFixed(2)
fix_amount: (Math.round((this.data.amount + Number.EPSILON) * 100) / 100).toFixed(2)
}
} }
}, },
validations: { validations: {
parameters: { fix_amount: { required }
fix_amount: { required }
},
}, },
watch: { watch: {
'data': function() { 'data': function() {
this.parameters.fix_amount = (Math.round((this.data.amount + Number.EPSILON) * 100) / 100).toFixed(2); this.fix_amount = (Math.round((this.data.amount + Number.EPSILON) * 100) / 100).toFixed(2);
} }
}, },
methods: { methods: {
@@ -240,7 +240,6 @@
unit_price: parseFloat((product.unit_price).toString().replace(',', '')), unit_price: parseFloat((product.unit_price).toString().replace(',', '')),
total: product.quantity * parseFloat((product.unit_price).toString().replace(',', '')) total: product.quantity * parseFloat((product.unit_price).toString().replace(',', ''))
}); });
console.log(this.poTotal);
}, },
removeProduct(index){ removeProduct(index){
this.products.splice(index, 1); this.products.splice(index, 1);