Fix tax columns with inclusive taxes
This commit is contained in:
parent
8c8ebf75c6
commit
39640418b5
3 changed files with 30 additions and 26 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -666,7 +666,9 @@ function calculateAmounts(invoice) {
|
|||
}
|
||||
}
|
||||
|
||||
if (invoice.account.inclusive_taxes != '1') {
|
||||
if (! taxRate1) {
|
||||
var taxAmount1 = 0;
|
||||
} else if (invoice.account.inclusive_taxes != '1') {
|
||||
var taxAmount1 = roundToTwo(lineTotal * taxRate1 / 100);
|
||||
} else {
|
||||
var taxAmount1 = roundToTwo((lineTotal * 100) / (100 + (taxRate1 * 100)));
|
||||
|
|
@ -681,7 +683,9 @@ function calculateAmounts(invoice) {
|
|||
}
|
||||
}
|
||||
|
||||
if (invoice.account.inclusive_taxes != '1') {
|
||||
if (! taxRate2) {
|
||||
var taxAmount2 = 0;
|
||||
} else if (invoice.account.inclusive_taxes != '1') {
|
||||
var taxAmount2 = roundToTwo(lineTotal * taxRate2 / 100);
|
||||
} else {
|
||||
var taxAmount2 = roundToTwo((lineTotal * 100) / (100 + (taxRate2 * 100)));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue