From 2822f54412c86f8873a774ba4d4c94d210755995 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 18 Jun 2018 21:14:26 +0200 Subject: [PATCH] Backed out changeset b7cf7fc7d33e IDEMPIERE-3702 --- .../src/org/compiere/acct/Doc_Payment.java | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Payment.java b/org.adempiere.base/src/org/compiere/acct/Doc_Payment.java index 558d5d8071..2d598d3b17 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Payment.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Payment.java @@ -171,22 +171,20 @@ public class Doc_Payment extends Doc // Avoid usage of clearing accounts // If both accounts and orgs are the same then remove the posting - if (dr != null && cr != null) { - MAccount acct_dr = dr.getAccount(); - MAccount acct_cr = cr.getAccount(); - int org_dr = dr.getAD_Org_ID(); - int org_cr = cr.getAD_Org_ID(); - if (!as.isPostIfClearingEqual() && acct_dr!=null && acct_dr.equals(acct_cr) && org_dr == org_cr) { + MAccount acct_dr = dr.getAccount(); + MAccount acct_cr = cr.getAccount(); + int org_dr = dr.getAD_Org_ID(); + int org_cr = cr.getAD_Org_ID(); + if (!as.isPostIfClearingEqual() && acct_dr!=null && acct_dr.equals(acct_cr) && org_dr == org_cr) { - BigDecimal debit = dr.getAmtSourceDr(); - BigDecimal credit = cr.getAmtSourceCr(); - - if (debit.compareTo(credit) == 0) { - fact.remove(dr); - fact.remove(cr); - } + BigDecimal debit = dr.getAmtSourceDr(); + BigDecimal credit = cr.getAmtSourceCr(); + if (debit.compareTo(credit) == 0) { + fact.remove(dr); + fact.remove(cr); } + } // End Avoid usage of clearing accounts //