fix tax rounding issues

This commit is contained in:
Mohit Panjwani
2021-01-22 14:15:44 +05:30
parent 83de1c47ee
commit a4d556f41e
5 changed files with 25 additions and 13 deletions

View File

@ -45,11 +45,13 @@ export default {
computed: {
taxAmount() {
if (this.tax.compound_tax && this.total) {
return ((this.total + this.totalTax) * this.tax.percent) / 100
return Math.round(
((this.total + this.totalTax) * this.tax.percent) / 100
)
}
if (this.total && this.tax.percent) {
return (this.total * this.tax.percent) / 100
return Math.round((this.total * this.tax.percent) / 100)
}
return 0