fix 3rd decimal bug with purchase orders

This commit is contained in:
omair saleh
2021-07-02 22:05:13 +08:00
parent 8fd1b37a48
commit 53c9eebfb9
@@ -211,7 +211,7 @@
this.submit(route('api.transaction.po.create', this.data.id), 'post', this.section, true, true); this.submit(route('api.transaction.po.create', this.data.id), 'post', this.section, true, true);
}, },
successHandler(){ successHandler(){
if(this.poTotal === this.data.amount){ if((Math.round((this.poTotal + Number.EPSILON) * 100) / 100).toFixed(2) === (Math.round((this.data.amount + Number.EPSILON) * 100) / 100).toFixed(2)){
this.submitted = true; this.submitted = true;
} }
this.updateList() this.updateList()