diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java b/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java index 5ff738f3b9..e253b46533 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java @@ -260,9 +260,14 @@ public class Doc_Invoice extends Doc if (mTax.getC_Tax_ID() == m_taxes[i].getC_Tax_ID()) { dls[j].setLineNetAmtDifference(diff); + m_taxes[i].addIncludedTax(diff.negate()); + diff = Env.ZERO; break; } } + if (diff.signum() == 0) { + break; + } } // for all lines } // tax difference } // for all taxes