From 0eaef1dc392cecdab27ee9246dcc66a2e29c71b6 Mon Sep 17 00:00:00 2001 From: bayucahya Date: Sat, 23 May 2009 01:05:10 +0000 Subject: [PATCH] Reverting Revision: 9358 BF [2795236] Not Post if Clearing Equal does not delete acc facts --- base/src/org/compiere/acct/Doc_Allocation.java | 4 ++-- base/src/org/compiere/acct/Doc_Bank.java | 2 +- base/src/org/compiere/acct/Doc_MatchInv.java | 2 +- base/src/org/compiere/acct/Doc_MatchPO.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/base/src/org/compiere/acct/Doc_Allocation.java b/base/src/org/compiere/acct/Doc_Allocation.java index 17920bf8c7..53ffc5d35e 100644 --- a/base/src/org/compiere/acct/Doc_Allocation.java +++ b/base/src/org/compiere/acct/Doc_Allocation.java @@ -245,7 +245,7 @@ public class Doc_Allocation extends Doc acct_unallocated_cash = getCashAcct(as, line.getC_CashLine_ID()); MAccount acct_receivable = getAccount(Doc.ACCTTYPE_C_Receivable, as); - if ((!as.isPostIfClearingEqual()) && acct_unallocated_cash != null && acct_unallocated_cash.getAccount().equals(acct_receivable.getAccount()) && (!isInterOrg)) { + if ((!as.isPostIfClearingEqual()) && acct_unallocated_cash != null && acct_unallocated_cash.equals(acct_receivable) && (!isInterOrg)) { // if not using clearing accounts, then don't post amtsource // change the allocationsource to be writeoff + discount @@ -335,7 +335,7 @@ public class Doc_Allocation extends Doc // Save original allocation source for realized gain & loss purposes allocationSourceForRGL = allocationSourceForRGL.negate(); - if ((!as.isPostIfClearingEqual()) && acct_payment_select != null && acct_payment_select.getAccount().equals(acct_liability.getAccount()) && (!isInterOrg)) { + if ((!as.isPostIfClearingEqual()) && acct_payment_select != null && acct_payment_select.equals(acct_liability) && (!isInterOrg)) { // if not using clearing accounts, then don't post amtsource // change the allocationsource to be writeoff + discount diff --git a/base/src/org/compiere/acct/Doc_Bank.java b/base/src/org/compiere/acct/Doc_Bank.java index 098497d6a8..28f1c7a3a5 100644 --- a/base/src/org/compiere/acct/Doc_Bank.java +++ b/base/src/org/compiere/acct/Doc_Bank.java @@ -180,7 +180,7 @@ public class Doc_Bank extends Doc // if ((!as.isPostIfClearingEqual()) && acct_bank_asset.equals(acct_bank_in_transit) && (!isInterOrg)) { // don't validate interorg on banks for this - normally banks are balanced by orgs - if ((!as.isPostIfClearingEqual()) && acct_bank_asset.getAccount().equals(acct_bank_in_transit.getAccount())) { + if ((!as.isPostIfClearingEqual()) && acct_bank_asset.equals(acct_bank_in_transit)) { // Not using clearing accounts // just post the difference (if any) diff --git a/base/src/org/compiere/acct/Doc_MatchInv.java b/base/src/org/compiere/acct/Doc_MatchInv.java index dde16327c9..2eab4ed51b 100644 --- a/base/src/org/compiere/acct/Doc_MatchInv.java +++ b/base/src/org/compiere/acct/Doc_MatchInv.java @@ -269,7 +269,7 @@ public class Doc_MatchInv extends Doc MAccount acct_db = dr.getAccount(); // not_invoiced_receipts MAccount acct_cr = cr.getAccount(); // inventory_clearing - if ((!as.isPostIfClearingEqual()) && acct_db.getAccount().equals(acct_cr.getAccount()) && (!isInterOrg)) { + if ((!as.isPostIfClearingEqual()) && acct_db.equals(acct_cr) && (!isInterOrg)) { BigDecimal debit = dr.getAmtSourceDr(); BigDecimal credit = cr.getAmtSourceCr(); diff --git a/base/src/org/compiere/acct/Doc_MatchPO.java b/base/src/org/compiere/acct/Doc_MatchPO.java index 3009621202..f7823dfa33 100644 --- a/base/src/org/compiere/acct/Doc_MatchPO.java +++ b/base/src/org/compiere/acct/Doc_MatchPO.java @@ -232,7 +232,7 @@ public class Doc_MatchPO extends Doc MAccount acct_db = dr.getAccount(); // PPV MAccount acct_cr = cr.getAccount(); // PPV Offset - if ((!as.isPostIfClearingEqual()) && acct_db.getAccount().equals(acct_cr.getAccount()) && (!isInterOrg)) { + if ((!as.isPostIfClearingEqual()) && acct_db.equals(acct_cr) && (!isInterOrg)) { BigDecimal debit = dr.getAmtSourceDr(); BigDecimal credit = cr.getAmtSourceCr();