Backed out changeset b7cf7fc7d33e IDEMPIERE-3702

This commit is contained in:
Carlos Ruiz 2018-06-18 21:14:26 +02:00
parent d527b6279f
commit 2822f54412
1 changed files with 11 additions and 13 deletions

View File

@ -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
//