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

@ -957,12 +957,15 @@ export default {
let amount = 0
if (selectedTax.compound_tax && this.subtotalWithDiscount) {
amount =
amount = Math.round(
((this.subtotalWithDiscount + this.totalSimpleTax) *
selectedTax.percent) /
100
100
)
} else if (this.subtotalWithDiscount && selectedTax.percent) {
amount = (this.subtotalWithDiscount * selectedTax.percent) / 100
amount = Math.round(
(this.subtotalWithDiscount * selectedTax.percent) / 100
)
}
this.newInvoice.taxes.push({