Fix [ 1704203 ] Charges: Income accounts are also debited

This commit is contained in:
Carlos Ruiz 2008-02-09 05:01:41 +00:00
parent c57b01638e
commit 6a0b2f1ae3
1 changed files with 9 additions and 3 deletions

View File

@ -218,9 +218,15 @@ public class Doc_Bank extends Doc
// End Avoid usage of clearing accounts
// Charge DR (Charge)
if (line.getChargeAmt().compareTo(Env.ZERO) > 0) {
fl = fact.createLine(line,
line.getChargeAccount(as, line.getChargeAmt().negate()),
line.getC_Currency_ID(), null, line.getChargeAmt());
} else {
fl = fact.createLine(line,
line.getChargeAccount(as, line.getChargeAmt().negate()),
line.getC_Currency_ID(), line.getChargeAmt().negate(), null);
}
if (fl != null && C_BPartner_ID != 0)
fl.setC_BPartner_ID(C_BPartner_ID);