Reverting Revision: 9358

BF [2795236] Not Post if Clearing Equal does not delete acc facts
This commit is contained in:
bayucahya 2009-05-23 01:05:10 +00:00
parent 60f03ebb8b
commit 0eaef1dc39
4 changed files with 5 additions and 5 deletions

View File

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

View File

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

View File

@ -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();

View File

@ -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();