FR 1840016 - Avoid usage of clearing accounts

This commit is contained in:
Carlos Ruiz 2007-11-28 07:14:01 +00:00
parent 43801a02fe
commit 0876e35a3b
7 changed files with 1263 additions and 943 deletions

View File

@ -31,6 +31,11 @@ import org.compiere.util.*;
* </pre> * </pre>
* @author Jorg Janke * @author Jorg Janke
* @version $Id: Doc_Allocation.java,v 1.6 2006/07/30 00:53:33 jjanke Exp $ * @version $Id: Doc_Allocation.java,v 1.6 2006/07/30 00:53:33 jjanke Exp $
*
* FR [ 1840016 ] Avoid usage of clearing accounts - subject to C_AcctSchema.IsPostIfClearingEqual
* Avoid posting if Receipt and both accounts Unallocated Cash and Receivable are equal
* Avoid posting if Payment and both accounts Payment Select and Liability are equal
*
*/ */
public class Doc_Allocation extends Doc public class Doc_Allocation extends Doc
{ {
@ -209,22 +214,49 @@ public class Doc_Allocation extends Doc
// Sales Invoice // Sales Invoice
else if (invoice.isSOTrx()) else if (invoice.isSOTrx())
{ {
// Payment/Cash DR
// Avoid usage of clearing accounts
// If both accounts Unallocated Cash and Receivable are equal
// then don't post
MAccount acct_unallocated_cash = null;
if (line.getC_Payment_ID() != 0) if (line.getC_Payment_ID() != 0)
{ acct_unallocated_cash = getPaymentAcct(as, line.getC_Payment_ID());
fl = fact.createLine (line, getPaymentAcct(as, line.getC_Payment_ID()),
getC_Currency_ID(), line.getAmtSource(), null);
if (fl != null && payment != null)
fl.setAD_Org_ID(payment.getAD_Org_ID());
}
else if (line.getC_CashLine_ID() != 0) else if (line.getC_CashLine_ID() != 0)
{ acct_unallocated_cash = getCashAcct(as, line.getC_CashLine_ID());
fl = fact.createLine (line, getCashAcct(as, line.getC_CashLine_ID()), MAccount acct_receivable = getAccount(Doc.ACCTTYPE_C_Receivable, as);
getC_Currency_ID(), line.getAmtSource(), null);
MCashLine cashLine = new MCashLine (getCtx(), line.getC_CashLine_ID(), getTrxName()); if ((!as.isPostIfClearingEqual()) && acct_unallocated_cash != null && acct_unallocated_cash.equals(acct_receivable)) {
if (fl != null && cashLine.get_ID() != 0)
fl.setAD_Org_ID(cashLine.getAD_Org_ID()); // if not using clearing accounts, then don't post amtsource
// change the allocationsource to be writeoff + discount
allocationSource = line.getDiscountAmt().add(line.getWriteOffAmt());
} else {
// Normal behavior -- unchanged if using clearing accounts
// Payment/Cash DR
if (line.getC_Payment_ID() != 0)
{
fl = fact.createLine (line, getPaymentAcct(as, line.getC_Payment_ID()),
getC_Currency_ID(), line.getAmtSource(), null);
if (fl != null && payment != null)
fl.setAD_Org_ID(payment.getAD_Org_ID());
}
else if (line.getC_CashLine_ID() != 0)
{
fl = fact.createLine (line, getCashAcct(as, line.getC_CashLine_ID()),
getC_Currency_ID(), line.getAmtSource(), null);
MCashLine cashLine = new MCashLine (getCtx(), line.getC_CashLine_ID(), getTrxName());
if (fl != null && cashLine.get_ID() != 0)
fl.setAD_Org_ID(cashLine.getAD_Org_ID());
}
} }
// End Avoid usage of clearing accounts
// Discount DR // Discount DR
if (Env.ZERO.compareTo(line.getDiscountAmt()) != 0) if (Env.ZERO.compareTo(line.getDiscountAmt()) != 0)
{ {
@ -262,6 +294,28 @@ public class Doc_Allocation extends Doc
// Purchase Invoice // Purchase Invoice
else else
{ {
// Avoid usage of clearing accounts
// If both accounts Payment Select and Liability are equal
// then don't post
MAccount acct_payment_select = null;
if (line.getC_Payment_ID() != 0)
acct_payment_select = getPaymentAcct(as, line.getC_Payment_ID());
else if (line.getC_CashLine_ID() != 0)
acct_payment_select = getCashAcct(as, line.getC_CashLine_ID());
MAccount acct_liability = getAccount(Doc.ACCTTYPE_V_Liability, as);
boolean isUsingClearing = true;
if ((!as.isPostIfClearingEqual()) && acct_payment_select != null && acct_payment_select.equals(acct_liability)) {
// if not using clearing accounts, then don't post amtsource
// change the allocationsource to be writeoff + discount
allocationSource = line.getDiscountAmt().add(line.getWriteOffAmt());
isUsingClearing = false;
}
// End Avoid usage of clearing accounts
allocationSource = allocationSource.negate(); // allocation is negative allocationSource = allocationSource.negate(); // allocation is negative
// AP Invoice Amount DR // AP Invoice Amount DR
if (as.isAccrual()) if (as.isAccrual())
@ -297,14 +351,14 @@ public class Doc_Allocation extends Doc
fl.setAD_Org_ID(payment.getAD_Org_ID()); fl.setAD_Org_ID(payment.getAD_Org_ID());
} }
// Payment/Cash CR // Payment/Cash CR
if (line.getC_Payment_ID() != 0) if (isUsingClearing && line.getC_Payment_ID() != 0) // Avoid usage of clearing accounts
{ {
fl = fact.createLine (line, getPaymentAcct(as, line.getC_Payment_ID()), fl = fact.createLine (line, getPaymentAcct(as, line.getC_Payment_ID()),
getC_Currency_ID(), null, line.getAmtSource().negate()); getC_Currency_ID(), null, line.getAmtSource().negate());
if (fl != null && payment != null) if (fl != null && payment != null)
fl.setAD_Org_ID(payment.getAD_Org_ID()); fl.setAD_Org_ID(payment.getAD_Org_ID());
} }
else if (line.getC_CashLine_ID() != 0) else if (isUsingClearing && line.getC_CashLine_ID() != 0) // Avoid usage of clearing accounts
{ {
fl = fact.createLine (line, getCashAcct(as, line.getC_CashLine_ID()), fl = fact.createLine (line, getCashAcct(as, line.getC_CashLine_ID()),
getC_Currency_ID(), null, line.getAmtSource().negate()); getC_Currency_ID(), null, line.getAmtSource().negate());

View File

@ -31,6 +31,10 @@ import org.compiere.util.*;
* </pre> * </pre>
* @author Jorg Janke * @author Jorg Janke
* @version $Id: Doc_Bank.java,v 1.3 2006/07/30 00:53:33 jjanke Exp $ * @version $Id: Doc_Bank.java,v 1.3 2006/07/30 00:53:33 jjanke Exp $
*
* FR [ 1840016 ] Avoid usage of clearing accounts - subject to C_AcctSchema.IsPostIfClearingEqual
* Avoid posting if both accounts BankAsset and BankInTransit are equal
*
*/ */
public class Doc_Bank extends Doc public class Doc_Bank extends Doc
{ {
@ -158,28 +162,61 @@ public class Doc_Bank extends Doc
DocLine_Bank line = (DocLine_Bank)p_lines[i]; DocLine_Bank line = (DocLine_Bank)p_lines[i];
int C_BPartner_ID = line.getC_BPartner_ID(); int C_BPartner_ID = line.getC_BPartner_ID();
// BankAsset DR CR (Statement) // Avoid usage of clearing accounts
fl = fact.createLine(line, // If both accounts BankAsset and BankInTransit are equal
getAccount(Doc.ACCTTYPE_BankAsset, as), // then remove the posting
line.getC_Currency_ID(), line.getStmtAmt());
if (fl != null && AD_Org_ID != 0)
fl.setAD_Org_ID(AD_Org_ID);
if (fl != null && C_BPartner_ID != 0)
fl.setC_BPartner_ID(C_BPartner_ID);
// BankInTransit DR CR (Payment) MAccount acct_bank_asset = getAccount(Doc.ACCTTYPE_BankAsset, as);
fl = fact.createLine(line, MAccount acct_bank_in_transit = getAccount(Doc.ACCTTYPE_BankInTransit, as);
getAccount(Doc.ACCTTYPE_BankInTransit, as),
line.getC_Currency_ID(), line.getTrxAmt().negate()); if ((!as.isPostIfClearingEqual()) && acct_bank_asset.equals(acct_bank_in_transit)) {
if (fl != null) // Not using clearing accounts
{ // just post the difference (if any)
if (C_BPartner_ID != 0)
fl.setC_BPartner_ID(C_BPartner_ID); BigDecimal amt_stmt_minus_trx = line.getStmtAmt().subtract(line.getTrxAmt());
if (AD_Org_ID != 0) if (amt_stmt_minus_trx.compareTo(Env.ZERO) != 0) {
// BankAsset DR CR (Statement minus Payment)
fl = fact.createLine(line,
getAccount(Doc.ACCTTYPE_BankAsset, as),
line.getC_Currency_ID(), amt_stmt_minus_trx);
if (fl != null && AD_Org_ID != 0)
fl.setAD_Org_ID(AD_Org_ID);
if (fl != null && C_BPartner_ID != 0)
fl.setC_BPartner_ID(C_BPartner_ID);
}
} else {
// Normal Adempiere behavior -- unchanged if using clearing accounts
// BankAsset DR CR (Statement)
fl = fact.createLine(line,
getAccount(Doc.ACCTTYPE_BankAsset, as),
line.getC_Currency_ID(), line.getStmtAmt());
if (fl != null && AD_Org_ID != 0)
fl.setAD_Org_ID(AD_Org_ID); fl.setAD_Org_ID(AD_Org_ID);
else if (fl != null && C_BPartner_ID != 0)
fl.setAD_Org_ID(line.getAD_Org_ID(true)); // from payment fl.setC_BPartner_ID(C_BPartner_ID);
// BankInTransit DR CR (Payment)
fl = fact.createLine(line,
getAccount(Doc.ACCTTYPE_BankInTransit, as),
line.getC_Currency_ID(), line.getTrxAmt().negate());
if (fl != null)
{
if (C_BPartner_ID != 0)
fl.setC_BPartner_ID(C_BPartner_ID);
if (AD_Org_ID != 0)
fl.setAD_Org_ID(AD_Org_ID);
else
fl.setAD_Org_ID(line.getAD_Org_ID(true)); // from payment
}
} }
// End Avoid usage of clearing accounts
// Charge DR (Charge) // Charge DR (Charge)
fl = fact.createLine(line, fl = fact.createLine(line,
line.getChargeAccount(as, line.getChargeAmt().negate()), line.getChargeAccount(as, line.getChargeAmt().negate()),

View File

@ -31,6 +31,10 @@ import org.compiere.util.*;
* Update Costing Records * Update Costing Records
* @author Jorg Janke * @author Jorg Janke
* @version $Id: Doc_MatchInv.java,v 1.3 2006/07/30 00:53:33 jjanke Exp $ * @version $Id: Doc_MatchInv.java,v 1.3 2006/07/30 00:53:33 jjanke Exp $
*
* FR [ 1840016 ] Avoid usage of clearing accounts - subject to C_AcctSchema.IsPostIfClearingEqual
* Avoid posting if both accounts Not Invoiced Receipts and Inventory Clearing are equal
*
*/ */
public class Doc_MatchInv extends Doc public class Doc_MatchInv extends Doc
{ {
@ -221,6 +225,26 @@ public class Doc_MatchInv extends Doc
cr.setUser1_ID(m_invoiceLine.getUser1_ID()); cr.setUser1_ID(m_invoiceLine.getUser1_ID());
cr.setUser2_ID(m_invoiceLine.getUser2_ID()); cr.setUser2_ID(m_invoiceLine.getUser2_ID());
// Avoid usage of clearing accounts
// If both accounts Not Invoiced Receipts and Inventory Clearing are equal
// then remove the posting
MAccount acct_db = dr.getAccount(); // not_invoiced_receipts
MAccount acct_cr = cr.getAccount(); // inventory_clearing
if ((!as.isPostIfClearingEqual()) && acct_db.equals(acct_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
// Invoice Price Variance difference // Invoice Price Variance difference
BigDecimal ipv = cr.getAcctBalance().add(dr.getAcctBalance()).negate(); BigDecimal ipv = cr.getAcctBalance().add(dr.getAcctBalance()).negate();

View File

@ -5,21 +5,21 @@
* Copyright (C) Trifon Trifonov. * * Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors * * Copyright (C) Contributors *
* * * *
* This program is free software; * This program is free software;
you can redistribute it and/or * you can redistribute it and/or *
* modify it under the terms of the GNU General Public License * * modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; * as published by the Free Software Foundation;
either version 2 * either version 2 *
* of the License, or (at your option) any later version. * * of the License, or (at your option) any later version. *
* * * *
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; * but WITHOUT ANY WARRANTY;
without even the implied warranty of * without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; * along with this program;
if not, write to the Free Software * if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. * * MA 02110-1301, USA. *
@ -30,371 +30,382 @@
* Sponsors: * * Sponsors: *
* - Company (http://www.site.com) * * - Company (http://www.site.com) *
**********************************************************************/ **********************************************************************/
package org.compiere.model; package org.compiere.model;
import java.util.*;
import java.sql.Timestamp;
import java.math.*;
import org.compiere.util.*;
/** Generated Interface for C_AcctSchema import java.math.BigDecimal;
* @author Trifon Trifonov (generated) import org.compiere.util.KeyNamePair;
* @version Release 3.3.0 - 2007-08-24 11:39:36.406
*/ /** Generated Interface for C_AcctSchema
public interface I_C_AcctSchema * @author Trifon Trifonov (generated)
{ * @version Release 3.3.0
*/
public interface I_C_AcctSchema
{
/** TableName=C_AcctSchema */ /** TableName=C_AcctSchema */
public static final String Table_Name = "C_AcctSchema"; public static final String Table_Name = "C_AcctSchema";
/** AD_Table_ID=265 */ /** AD_Table_ID=265 */
public static final int Table_ID = MTable.getTable_ID(Table_Name); public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 2 - Client /** AccessLevel = 2 - Client
*/ */
BigDecimal accessLevel = new BigDecimal(2); BigDecimal accessLevel = BigDecimal.valueOf(2);
/** Load Meta Data */ /** Load Meta Data */
/** Column name AD_OrgOnly_ID */ /** Column name AD_OrgOnly_ID */
public static final String COLUMNNAME_AD_OrgOnly_ID = "AD_OrgOnly_ID"; public static final String COLUMNNAME_AD_OrgOnly_ID = "AD_OrgOnly_ID";
/** Set Only Organization. /** Set Only Organization.
* Create posting entries only for this organization * Create posting entries only for this organization
*/ */
public void setAD_OrgOnly_ID (int AD_OrgOnly_ID); public void setAD_OrgOnly_ID (int AD_OrgOnly_ID);
/** Get Only Organization. /** Get Only Organization.
* Create posting entries only for this organization * Create posting entries only for this organization
*/ */
public int getAD_OrgOnly_ID(); public int getAD_OrgOnly_ID();
/** Column name AutoPeriodControl */ /** Column name AutoPeriodControl */
public static final String COLUMNNAME_AutoPeriodControl = "AutoPeriodControl"; public static final String COLUMNNAME_AutoPeriodControl = "AutoPeriodControl";
/** Set Automatic Period Control. /** Set Automatic Period Control.
* If selected, the periods are automatically opened and closed * If selected, the periods are automatically opened and closed
*/ */
public void setAutoPeriodControl (boolean AutoPeriodControl); public void setAutoPeriodControl (boolean AutoPeriodControl);
/** Get Automatic Period Control. /** Get Automatic Period Control.
* If selected, the periods are automatically opened and closed * If selected, the periods are automatically opened and closed
*/ */
public boolean isAutoPeriodControl(); public boolean isAutoPeriodControl();
/** Column name C_AcctSchema_ID */ /** Column name C_AcctSchema_ID */
public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID"; public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID";
/** Set Accounting Schema. /** Set Accounting Schema.
* Rules for accounting * Rules for accounting
*/ */
public void setC_AcctSchema_ID (int C_AcctSchema_ID); public void setC_AcctSchema_ID (int C_AcctSchema_ID);
/** Get Accounting Schema. /** Get Accounting Schema.
* Rules for accounting * Rules for accounting
*/ */
public int getC_AcctSchema_ID(); public int getC_AcctSchema_ID();
/** Column name C_Currency_ID */ /** Column name C_Currency_ID */
public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID"; public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
/** Set Currency. /** Set Currency.
* The Currency for this record * The Currency for this record
*/ */
public void setC_Currency_ID (int C_Currency_ID); public void setC_Currency_ID (int C_Currency_ID);
/** Get Currency. /** Get Currency.
* The Currency for this record * The Currency for this record
*/ */
public int getC_Currency_ID(); public int getC_Currency_ID();
public I_C_Currency getI_C_Currency() throws Exception; public I_C_Currency getC_Currency() throws Exception;
/** Column name C_Period_ID */ /** Column name C_Period_ID */
public static final String COLUMNNAME_C_Period_ID = "C_Period_ID"; public static final String COLUMNNAME_C_Period_ID = "C_Period_ID";
/** Set Period. /** Set Period.
* Period of the Calendar * Period of the Calendar
*/ */
public void setC_Period_ID (int C_Period_ID); public void setC_Period_ID (int C_Period_ID);
/** Get Period. /** Get Period.
* Period of the Calendar * Period of the Calendar
*/ */
public int getC_Period_ID(); public int getC_Period_ID();
public I_C_Period getI_C_Period() throws Exception; public I_C_Period getC_Period() throws Exception;
/** Column name CommitmentType */ /** Column name CommitmentType */
public static final String COLUMNNAME_CommitmentType = "CommitmentType"; public static final String COLUMNNAME_CommitmentType = "CommitmentType";
/** Set Commitment Type. /** Set Commitment Type.
* Create Commitment and/or Reservations for Budget Control * Create Commitment and/or Reservations for Budget Control
*/ */
public void setCommitmentType (String CommitmentType); public void setCommitmentType (String CommitmentType);
/** Get Commitment Type. /** Get Commitment Type.
* Create Commitment and/or Reservations for Budget Control * Create Commitment and/or Reservations for Budget Control
*/ */
public String getCommitmentType(); public String getCommitmentType();
/** Column name CostingLevel */ /** Column name CostingLevel */
public static final String COLUMNNAME_CostingLevel = "CostingLevel"; public static final String COLUMNNAME_CostingLevel = "CostingLevel";
/** Set Costing Level. /** Set Costing Level.
* The lowest level to accumulate Costing Information * The lowest level to accumulate Costing Information
*/ */
public void setCostingLevel (String CostingLevel); public void setCostingLevel (String CostingLevel);
/** Get Costing Level. /** Get Costing Level.
* The lowest level to accumulate Costing Information * The lowest level to accumulate Costing Information
*/ */
public String getCostingLevel(); public String getCostingLevel();
/** Column name CostingMethod */ /** Column name CostingMethod */
public static final String COLUMNNAME_CostingMethod = "CostingMethod"; public static final String COLUMNNAME_CostingMethod = "CostingMethod";
/** Set Costing Method. /** Set Costing Method.
* Indicates how Costs will be calculated * Indicates how Costs will be calculated
*/ */
public void setCostingMethod (String CostingMethod); public void setCostingMethod (String CostingMethod);
/** Get Costing Method. /** Get Costing Method.
* Indicates how Costs will be calculated * Indicates how Costs will be calculated
*/ */
public String getCostingMethod(); public String getCostingMethod();
/** Column name Description */ /** Column name Description */
public static final String COLUMNNAME_Description = "Description"; public static final String COLUMNNAME_Description = "Description";
/** Set Description. /** Set Description.
* Optional short description of the record * Optional short description of the record
*/ */
public void setDescription (String Description); public void setDescription (String Description);
/** Get Description. /** Get Description.
* Optional short description of the record * Optional short description of the record
*/ */
public String getDescription(); public String getDescription();
/** Column name GAAP */ /** Column name GAAP */
public static final String COLUMNNAME_GAAP = "GAAP"; public static final String COLUMNNAME_GAAP = "GAAP";
/** Set GAAP. /** Set GAAP.
* Generally Accepted Accounting Principles * Generally Accepted Accounting Principles
*/ */
public void setGAAP (String GAAP); public void setGAAP (String GAAP);
/** Get GAAP. /** Get GAAP.
* Generally Accepted Accounting Principles * Generally Accepted Accounting Principles
*/ */
public String getGAAP(); public String getGAAP();
/** Column name HasAlias */ /** Column name HasAlias */
public static final String COLUMNNAME_HasAlias = "HasAlias"; public static final String COLUMNNAME_HasAlias = "HasAlias";
/** Set Use Account Alias. /** Set Use Account Alias.
* Ability to select (partial) account combinations by an Alias * Ability to select (partial) account combinations by an Alias
*/ */
public void setHasAlias (boolean HasAlias); public void setHasAlias (boolean HasAlias);
/** Get Use Account Alias. /** Get Use Account Alias.
* Ability to select (partial) account combinations by an Alias * Ability to select (partial) account combinations by an Alias
*/ */
public boolean isHasAlias(); public boolean isHasAlias();
/** Column name HasCombination */ /** Column name HasCombination */
public static final String COLUMNNAME_HasCombination = "HasCombination"; public static final String COLUMNNAME_HasCombination = "HasCombination";
/** Set Use Account Combination Control. /** Set Use Account Combination Control.
* Combination of account elements are checked * Combination of account elements are checked
*/ */
public void setHasCombination (boolean HasCombination); public void setHasCombination (boolean HasCombination);
/** Get Use Account Combination Control. /** Get Use Account Combination Control.
* Combination of account elements are checked * Combination of account elements are checked
*/ */
public boolean isHasCombination(); public boolean isHasCombination();
/** Column name IsAccrual */ /** Column name IsAccrual */
public static final String COLUMNNAME_IsAccrual = "IsAccrual"; public static final String COLUMNNAME_IsAccrual = "IsAccrual";
/** Set Accrual. /** Set Accrual.
* Indicates if Accrual or Cash Based accounting will be used * Indicates if Accrual or Cash Based accounting will be used
*/ */
public void setIsAccrual (boolean IsAccrual); public void setIsAccrual (boolean IsAccrual);
/** Get Accrual. /** Get Accrual.
* Indicates if Accrual or Cash Based accounting will be used * Indicates if Accrual or Cash Based accounting will be used
*/ */
public boolean isAccrual(); public boolean isAccrual();
/** Column name IsAdjustCOGS */ /** Column name IsAdjustCOGS */
public static final String COLUMNNAME_IsAdjustCOGS = "IsAdjustCOGS"; public static final String COLUMNNAME_IsAdjustCOGS = "IsAdjustCOGS";
/** Set Adjust COGS. /** Set Adjust COGS.
* Adjust Cost of Good Sold * Adjust Cost of Good Sold
*/ */
public void setIsAdjustCOGS (boolean IsAdjustCOGS); public void setIsAdjustCOGS (boolean IsAdjustCOGS);
/** Get Adjust COGS. /** Get Adjust COGS.
* Adjust Cost of Good Sold * Adjust Cost of Good Sold
*/ */
public boolean isAdjustCOGS(); public boolean isAdjustCOGS();
/** Column name IsAllowNegativePosting */ /** Column name IsAllowNegativePosting */
public static final String COLUMNNAME_IsAllowNegativePosting = "IsAllowNegativePosting"; public static final String COLUMNNAME_IsAllowNegativePosting = "IsAllowNegativePosting";
/** Set Allow Negative Posting. /** Set Allow Negative Posting.
* Allow to post negative accounting values * Allow to post negative accounting values
*/ */
public void setIsAllowNegativePosting (boolean IsAllowNegativePosting); public void setIsAllowNegativePosting (boolean IsAllowNegativePosting);
/** Get Allow Negative Posting. /** Get Allow Negative Posting.
* Allow to post negative accounting values * Allow to post negative accounting values
*/ */
public boolean isAllowNegativePosting(); public boolean isAllowNegativePosting();
/** Column name IsDiscountCorrectsTax */ /** Column name IsDiscountCorrectsTax */
public static final String COLUMNNAME_IsDiscountCorrectsTax = "IsDiscountCorrectsTax"; public static final String COLUMNNAME_IsDiscountCorrectsTax = "IsDiscountCorrectsTax";
/** Set Correct tax for Discounts/Charges. /** Set Correct tax for Discounts/Charges.
* Correct the tax for payment discount and charges * Correct the tax for payment discount and charges
*/ */
public void setIsDiscountCorrectsTax (boolean IsDiscountCorrectsTax); public void setIsDiscountCorrectsTax (boolean IsDiscountCorrectsTax);
/** Get Correct tax for Discounts/Charges. /** Get Correct tax for Discounts/Charges.
* Correct the tax for payment discount and charges * Correct the tax for payment discount and charges
*/ */
public boolean isDiscountCorrectsTax(); public boolean isDiscountCorrectsTax();
/** Column name IsExplicitCostAdjustment */ /** Column name IsExplicitCostAdjustment */
public static final String COLUMNNAME_IsExplicitCostAdjustment = "IsExplicitCostAdjustment"; public static final String COLUMNNAME_IsExplicitCostAdjustment = "IsExplicitCostAdjustment";
/** Set Explicit Cost Adjustment. /** Set Explicit Cost Adjustment.
* Post the cost adjustment explicitly * Post the cost adjustment explicitly
*/ */
public void setIsExplicitCostAdjustment (boolean IsExplicitCostAdjustment); public void setIsExplicitCostAdjustment (boolean IsExplicitCostAdjustment);
/** Get Explicit Cost Adjustment. /** Get Explicit Cost Adjustment.
* Post the cost adjustment explicitly * Post the cost adjustment explicitly
*/ */
public boolean isExplicitCostAdjustment(); public boolean isExplicitCostAdjustment();
/** Column name IsPostIfClearingEqual */
public static final String COLUMNNAME_IsPostIfClearingEqual = "IsPostIfClearingEqual";
/** Set Post if Clearing Equal.
* This flag controls if Adempiere must post when clearing (transit) and final accounts are the same
*/
public void setIsPostIfClearingEqual (boolean IsPostIfClearingEqual);
/** Get Post if Clearing Equal.
* This flag controls if Adempiere must post when clearing (transit) and final accounts are the same
*/
public boolean isPostIfClearingEqual();
/** Column name IsPostServices */ /** Column name IsPostServices */
public static final String COLUMNNAME_IsPostServices = "IsPostServices"; public static final String COLUMNNAME_IsPostServices = "IsPostServices";
/** Set Post Services Separately. /** Set Post Services Separately.
* Differentiate between Services and Product Receivable/Payables * Differentiate between Services and Product Receivable/Payables
*/ */
public void setIsPostServices (boolean IsPostServices); public void setIsPostServices (boolean IsPostServices);
/** Get Post Services Separately. /** Get Post Services Separately.
* Differentiate between Services and Product Receivable/Payables * Differentiate between Services and Product Receivable/Payables
*/ */
public boolean isPostServices(); public boolean isPostServices();
/** Column name IsTradeDiscountPosted */ /** Column name IsTradeDiscountPosted */
public static final String COLUMNNAME_IsTradeDiscountPosted = "IsTradeDiscountPosted"; public static final String COLUMNNAME_IsTradeDiscountPosted = "IsTradeDiscountPosted";
/** Set Post Trade Discount. /** Set Post Trade Discount.
* Generate postings for trade discounts * Generate postings for trade discounts
*/ */
public void setIsTradeDiscountPosted (boolean IsTradeDiscountPosted); public void setIsTradeDiscountPosted (boolean IsTradeDiscountPosted);
/** Get Post Trade Discount. /** Get Post Trade Discount.
* Generate postings for trade discounts * Generate postings for trade discounts
*/ */
public boolean isTradeDiscountPosted(); public boolean isTradeDiscountPosted();
/** Column name M_CostType_ID */ /** Column name M_CostType_ID */
public static final String COLUMNNAME_M_CostType_ID = "M_CostType_ID"; public static final String COLUMNNAME_M_CostType_ID = "M_CostType_ID";
/** Set Cost Type. /** Set Cost Type.
* Type of Cost (e.g. Current, Plan, Future) * Type of Cost (e.g. Current, Plan, Future)
*/ */
public void setM_CostType_ID (int M_CostType_ID); public void setM_CostType_ID (int M_CostType_ID);
/** Get Cost Type. /** Get Cost Type.
* Type of Cost (e.g. Current, Plan, Future) * Type of Cost (e.g. Current, Plan, Future)
*/ */
public int getM_CostType_ID(); public int getM_CostType_ID();
public I_M_CostType getI_M_CostType() throws Exception; public I_M_CostType getM_CostType() throws Exception;
/** Column name Name */ /** Column name Name */
public static final String COLUMNNAME_Name = "Name"; public static final String COLUMNNAME_Name = "Name";
/** Set Name. /** Set Name.
* Alphanumeric identifier of the entity * Alphanumeric identifier of the entity
*/ */
public void setName (String Name); public void setName (String Name);
/** Get Name. /** Get Name.
* Alphanumeric identifier of the entity * Alphanumeric identifier of the entity
*/ */
public String getName(); public String getName();
/** Column name Period_OpenFuture */ /** Column name Period_OpenFuture */
public static final String COLUMNNAME_Period_OpenFuture = "Period_OpenFuture"; public static final String COLUMNNAME_Period_OpenFuture = "Period_OpenFuture";
/** Set Future Days. /** Set Future Days.
* Number of days to be able to post to a future date (based on system date) * Number of days to be able to post to a future date (based on system date)
*/ */
public void setPeriod_OpenFuture (int Period_OpenFuture); public void setPeriod_OpenFuture (int Period_OpenFuture);
/** Get Future Days. /** Get Future Days.
* Number of days to be able to post to a future date (based on system date) * Number of days to be able to post to a future date (based on system date)
*/ */
public int getPeriod_OpenFuture(); public int getPeriod_OpenFuture();
/** Column name Period_OpenHistory */ /** Column name Period_OpenHistory */
public static final String COLUMNNAME_Period_OpenHistory = "Period_OpenHistory"; public static final String COLUMNNAME_Period_OpenHistory = "Period_OpenHistory";
/** Set History Days. /** Set History Days.
* Number of days to be able to post in the past (based on system date) * Number of days to be able to post in the past (based on system date)
*/ */
public void setPeriod_OpenHistory (int Period_OpenHistory); public void setPeriod_OpenHistory (int Period_OpenHistory);
/** Get History Days. /** Get History Days.
* Number of days to be able to post in the past (based on system date) * Number of days to be able to post in the past (based on system date)
*/ */
public int getPeriod_OpenHistory(); public int getPeriod_OpenHistory();
/** Column name Processing */ /** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing"; public static final String COLUMNNAME_Processing = "Processing";
/** Set Process Now */ /** Set Process Now */
public void setProcessing (boolean Processing); public void setProcessing (boolean Processing);
/** Get Process Now */ /** Get Process Now */
public boolean isProcessing(); public boolean isProcessing();
/** Column name Separator */ /** Column name Separator */
public static final String COLUMNNAME_Separator = "Separator"; public static final String COLUMNNAME_Separator = "Separator";
/** Set Element Separator. /** Set Element Separator.
* Element Separator * Element Separator
*/ */
public void setSeparator (String Separator); public void setSeparator (String Separator);
/** Get Element Separator. /** Get Element Separator.
* Element Separator * Element Separator
*/ */
public String getSeparator(); public String getSeparator();
/** Column name TaxCorrectionType */ /** Column name TaxCorrectionType */
public static final String COLUMNNAME_TaxCorrectionType = "TaxCorrectionType"; public static final String COLUMNNAME_TaxCorrectionType = "TaxCorrectionType";
/** Set Tax Correction. /** Set Tax Correction.
* Type of Tax Correction * Type of Tax Correction
*/ */
public void setTaxCorrectionType (String TaxCorrectionType); public void setTaxCorrectionType (String TaxCorrectionType);
/** Get Tax Correction. /** Get Tax Correction.
* Type of Tax Correction * Type of Tax Correction
*/ */
public String getTaxCorrectionType(); public String getTaxCorrectionType();
} }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,65 @@
-- Nov 27, 2007 11:00:14 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53227,0,'IsPostIfClearingEqual',TO_DATE('2007-11-27 23:00:10','YYYY-MM-DD HH24:MI:SS'),100,'This flag controls if Adempiere must post when clearing (transit) and final accounts are the same','D',NULL,'Y','Post if Clearing Equal','Post if Clearing Equal',TO_DATE('2007-11-27 23:00:10','YYYY-MM-DD HH24:MI:SS'),100)
/
-- Nov 27, 2007 11:00:16 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53227 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
/
-- Nov 27, 2007 11:00:45 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
UPDATE AD_Column SET ColumnName='IsPostIfClearingEqual', Name='Post if Clearing Equal', Description='This flag controls if Adempiere must post when clearing (transit) and final accounts are the same', Help=NULL WHERE AD_Element_ID=53227
/
-- Nov 27, 2007 11:00:45 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
UPDATE AD_Field SET Name='Post if Clearing Equal', Description='This flag controls if Adempiere must post when clearing (transit) and final accounts are the same', Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=53227) AND IsCentrallyMaintained='Y'
/
-- Nov 27, 2007 11:00:45 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
UPDATE AD_Process_Para SET ColumnName='IsPostIfClearingEqual', Name='Post if Clearing Equal', Description='This flag controls if Adempiere must post when clearing (transit) and final accounts are the same', Help=NULL, AD_Element_ID=53227 WHERE UPPER(ColumnName)='ISPOSTIFCLEARINGEQUAL' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
/
-- Nov 27, 2007 11:00:45 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
UPDATE AD_Process_Para SET ColumnName='IsPostIfClearingEqual', Name='Post if Clearing Equal', Description='This flag controls if Adempiere must post when clearing (transit) and final accounts are the same', Help=NULL WHERE AD_Element_ID=53227 AND IsCentrallyMaintained='Y'
/
-- Nov 27, 2007 11:00:45 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
UPDATE AD_PrintFormatItem pi SET PrintName='Post if Clearing Equal', Name='Post if Clearing Equal' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=53227)
/
-- Nov 27, 2007 11:00:46 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
UPDATE AD_PrintFormatItem pi SET PrintName='Post if Clearing Equal', Name='Post if Clearing Equal' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=53227)
/
-- Nov 27, 2007 11:01:30 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,53266,53227,0,20,265,'IsPostIfClearingEqual',TO_DATE('2007-11-27 23:01:29','YYYY-MM-DD HH24:MI:SS'),100,'Y','This flag controls if Adempiere must post when clearing (transit) and final accounts are the same','D',1,'Y','N','N','N','N','N','N','N','N','N','Y','Post if Clearing Equal',0,TO_DATE('2007-11-27 23:01:29','YYYY-MM-DD HH24:MI:SS'),100,0)
/
-- Nov 27, 2007 11:01:30 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=53266 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
/
-- Nov 27, 2007 11:01:45 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
ALTER TABLE C_AcctSchema ADD IsPostIfClearingEqual CHAR(1) DEFAULT 'Y' CHECK (IsPostIfClearingEqual IN ('Y','N'))
/
-- Nov 27, 2007 11:07:24 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy) VALUES (0,53266,53281,0,199,TO_DATE('2007-11-27 23:07:22','YYYY-MM-DD HH24:MI:SS'),100,'This flag controls if Adempiere must post when clearing (transit) and final accounts are the same',1,'D','Y','Y','Y','N','N','N','N','Y','Post if Clearing Equal',270,TO_DATE('2007-11-27 23:07:22','YYYY-MM-DD HH24:MI:SS'),100)
/
-- Nov 27, 2007 11:07:24 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=53281 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
/

View File

@ -0,0 +1,65 @@
-- Nov 27, 2007 11:00:15 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53227,0,'IsPostIfClearingEqual',TO_TIMESTAMP('2007-11-27 23:00:10','YYYY-MM-DD HH24:MI:SS'),100,'This flag controls if Adempiere must post when clearing (transit) and final accounts are the same','D',NULL,'Y','Post if Clearing Equal','Post if Clearing Equal',TO_TIMESTAMP('2007-11-27 23:00:10','YYYY-MM-DD HH24:MI:SS'),100)
/
-- Nov 27, 2007 11:00:16 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53227 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
/
-- Nov 27, 2007 11:00:45 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
UPDATE AD_Column SET ColumnName='IsPostIfClearingEqual', Name='Post if Clearing Equal', Description='This flag controls if Adempiere must post when clearing (transit) and final accounts are the same', Help=NULL WHERE AD_Element_ID=53227
/
-- Nov 27, 2007 11:00:45 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
UPDATE AD_Field SET Name='Post if Clearing Equal', Description='This flag controls if Adempiere must post when clearing (transit) and final accounts are the same', Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=53227) AND IsCentrallyMaintained='Y'
/
-- Nov 27, 2007 11:00:45 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
UPDATE AD_Process_Para SET ColumnName='IsPostIfClearingEqual', Name='Post if Clearing Equal', Description='This flag controls if Adempiere must post when clearing (transit) and final accounts are the same', Help=NULL, AD_Element_ID=53227 WHERE UPPER(ColumnName)='ISPOSTIFCLEARINGEQUAL' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
/
-- Nov 27, 2007 11:00:45 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
UPDATE AD_Process_Para SET ColumnName='IsPostIfClearingEqual', Name='Post if Clearing Equal', Description='This flag controls if Adempiere must post when clearing (transit) and final accounts are the same', Help=NULL WHERE AD_Element_ID=53227 AND IsCentrallyMaintained='Y'
/
-- Nov 27, 2007 11:00:45 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
UPDATE AD_PrintFormatItem SET PrintName='Post if Clearing Equal', Name='Post if Clearing Equal' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=53227)
/
-- Nov 27, 2007 11:00:46 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
UPDATE AD_PrintFormatItem SET PrintName='Post if Clearing Equal', Name='Post if Clearing Equal' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=53227)
/
-- Nov 27, 2007 11:01:30 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,53266,53227,0,20,265,'IsPostIfClearingEqual',TO_TIMESTAMP('2007-11-27 23:01:29','YYYY-MM-DD HH24:MI:SS'),100,'Y','This flag controls if Adempiere must post when clearing (transit) and final accounts are the same','D',1,'Y','N','N','N','N','N','N','N','N','N','Y','Post if Clearing Equal',0,TO_TIMESTAMP('2007-11-27 23:01:29','YYYY-MM-DD HH24:MI:SS'),100,0)
/
-- Nov 27, 2007 11:01:30 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=53266 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
/
-- Nov 27, 2007 11:01:45 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
ALTER TABLE C_AcctSchema ADD COLUMN IsPostIfClearingEqual CHAR(1) DEFAULT 'Y' CHECK (IsPostIfClearingEqual IN ('Y','N'))
/
-- Nov 27, 2007 11:07:24 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy) VALUES (0,53266,53281,0,199,TO_TIMESTAMP('2007-11-27 23:07:22','YYYY-MM-DD HH24:MI:SS'),100,'This flag controls if Adempiere must post when clearing (transit) and final accounts are the same',1,'D','Y','Y','Y','N','N','N','N','Y','Post if Clearing Equal',270,TO_TIMESTAMP('2007-11-27 23:07:22','YYYY-MM-DD HH24:MI:SS'),100)
/
-- Nov 27, 2007 11:07:24 PM COT
-- FR 1840016 - Avoid usage of clearing accounts
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=53281 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
/