mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 20:21:10 -04:00
fix tax rounding issues
This commit is contained in:
@ -954,12 +954,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.newEstimate.taxes.push({
|
||||
@ -972,7 +975,7 @@ export default {
|
||||
amount,
|
||||
})
|
||||
|
||||
if (this.$$refs) {
|
||||
if (this.$refs) {
|
||||
this.$refs.taxModal.close()
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user