FR 1840016 - Avoid usage of clearing accounts
This commit is contained in:
parent
43801a02fe
commit
0876e35a3b
|
@ -31,6 +31,11 @@ import org.compiere.util.*;
|
|||
* </pre>
|
||||
* @author Jorg Janke
|
||||
* @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
|
||||
{
|
||||
|
@ -209,6 +214,29 @@ public class Doc_Allocation extends Doc
|
|||
// Sales Invoice
|
||||
else if (invoice.isSOTrx())
|
||||
{
|
||||
|
||||
// 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)
|
||||
acct_unallocated_cash = getPaymentAcct(as, line.getC_Payment_ID());
|
||||
else if (line.getC_CashLine_ID() != 0)
|
||||
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.equals(acct_receivable)) {
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
@ -225,6 +253,10 @@ public class Doc_Allocation extends Doc
|
|||
if (fl != null && cashLine.get_ID() != 0)
|
||||
fl.setAD_Org_ID(cashLine.getAD_Org_ID());
|
||||
}
|
||||
|
||||
}
|
||||
// End Avoid usage of clearing accounts
|
||||
|
||||
// Discount DR
|
||||
if (Env.ZERO.compareTo(line.getDiscountAmt()) != 0)
|
||||
{
|
||||
|
@ -262,6 +294,28 @@ public class Doc_Allocation extends Doc
|
|||
// Purchase Invoice
|
||||
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
|
||||
// AP Invoice Amount DR
|
||||
if (as.isAccrual())
|
||||
|
@ -297,14 +351,14 @@ public class Doc_Allocation extends Doc
|
|||
fl.setAD_Org_ID(payment.getAD_Org_ID());
|
||||
}
|
||||
// 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()),
|
||||
getC_Currency_ID(), null, line.getAmtSource().negate());
|
||||
if (fl != null && payment != null)
|
||||
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()),
|
||||
getC_Currency_ID(), null, line.getAmtSource().negate());
|
||||
|
|
|
@ -31,6 +31,10 @@ import org.compiere.util.*;
|
|||
* </pre>
|
||||
* @author Jorg Janke
|
||||
* @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
|
||||
{
|
||||
|
@ -158,6 +162,35 @@ public class Doc_Bank extends Doc
|
|||
DocLine_Bank line = (DocLine_Bank)p_lines[i];
|
||||
int C_BPartner_ID = line.getC_BPartner_ID();
|
||||
|
||||
// Avoid usage of clearing accounts
|
||||
// If both accounts BankAsset and BankInTransit are equal
|
||||
// then remove the posting
|
||||
|
||||
MAccount acct_bank_asset = getAccount(Doc.ACCTTYPE_BankAsset, as);
|
||||
MAccount acct_bank_in_transit = getAccount(Doc.ACCTTYPE_BankInTransit, as);
|
||||
|
||||
if ((!as.isPostIfClearingEqual()) && acct_bank_asset.equals(acct_bank_in_transit)) {
|
||||
// Not using clearing accounts
|
||||
// just post the difference (if any)
|
||||
|
||||
BigDecimal amt_stmt_minus_trx = line.getStmtAmt().subtract(line.getTrxAmt());
|
||||
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),
|
||||
|
@ -180,6 +213,10 @@ public class Doc_Bank extends Doc
|
|||
else
|
||||
fl.setAD_Org_ID(line.getAD_Org_ID(true)); // from payment
|
||||
}
|
||||
|
||||
}
|
||||
// End Avoid usage of clearing accounts
|
||||
|
||||
// Charge DR (Charge)
|
||||
fl = fact.createLine(line,
|
||||
line.getChargeAccount(as, line.getChargeAmt().negate()),
|
||||
|
|
|
@ -31,6 +31,10 @@ import org.compiere.util.*;
|
|||
* Update Costing Records
|
||||
* @author Jorg Janke
|
||||
* @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
|
||||
{
|
||||
|
@ -221,6 +225,26 @@ public class Doc_MatchInv extends Doc
|
|||
cr.setUser1_ID(m_invoiceLine.getUser1_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
|
||||
BigDecimal ipv = cr.getAcctBalance().add(dr.getAcctBalance()).negate();
|
||||
|
|
|
@ -32,16 +32,14 @@
|
|||
**********************************************************************/
|
||||
package org.compiere.model;
|
||||
|
||||
import java.util.*;
|
||||
import java.sql.Timestamp;
|
||||
import java.math.*;
|
||||
import org.compiere.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
||||
/** Generated Interface for C_AcctSchema
|
||||
/** Generated Interface for C_AcctSchema
|
||||
* @author Trifon Trifonov (generated)
|
||||
* @version Release 3.3.0 - 2007-08-24 11:39:36.406
|
||||
* @version Release 3.3.0
|
||||
*/
|
||||
public interface I_C_AcctSchema
|
||||
public interface I_C_AcctSchema
|
||||
{
|
||||
|
||||
/** TableName=C_AcctSchema */
|
||||
|
@ -54,7 +52,7 @@ import org.compiere.util.*;
|
|||
|
||||
/** AccessLevel = 2 - Client
|
||||
*/
|
||||
BigDecimal accessLevel = new BigDecimal(2);
|
||||
BigDecimal accessLevel = BigDecimal.valueOf(2);
|
||||
|
||||
/** Load Meta Data */
|
||||
|
||||
|
@ -110,7 +108,7 @@ import org.compiere.util.*;
|
|||
*/
|
||||
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 */
|
||||
public static final String COLUMNNAME_C_Period_ID = "C_Period_ID";
|
||||
|
@ -125,7 +123,7 @@ import org.compiere.util.*;
|
|||
*/
|
||||
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 */
|
||||
public static final String COLUMNNAME_CommitmentType = "CommitmentType";
|
||||
|
@ -283,6 +281,19 @@ import org.compiere.util.*;
|
|||
*/
|
||||
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 */
|
||||
public static final String COLUMNNAME_IsPostServices = "IsPostServices";
|
||||
|
||||
|
@ -322,7 +333,7 @@ import org.compiere.util.*;
|
|||
*/
|
||||
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 */
|
||||
public static final String COLUMNNAME_Name = "Name";
|
||||
|
|
|
@ -17,12 +17,11 @@
|
|||
/** Generated Model - DO NOT CHANGE */
|
||||
package org.compiere.model;
|
||||
|
||||
import java.util.*;
|
||||
import java.sql.*;
|
||||
import java.math.*;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
import org.compiere.util.*;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
||||
/** Generated Model for C_AcctSchema
|
||||
* @author Adempiere (generated)
|
||||
|
@ -39,7 +38,9 @@ public class X_C_AcctSchema extends PO implements I_C_AcctSchema, I_Persistent
|
|||
public X_C_AcctSchema (Properties ctx, int C_AcctSchema_ID, String trxName)
|
||||
{
|
||||
super (ctx, C_AcctSchema_ID, trxName);
|
||||
/** if (C_AcctSchema_ID == 0) { setAutoPeriodControl (false);
|
||||
/** if (C_AcctSchema_ID == 0)
|
||||
{
|
||||
setAutoPeriodControl (false);
|
||||
setC_AcctSchema_ID (0);
|
||||
setC_Currency_ID (0);
|
||||
setCommitmentType (null);
|
||||
|
@ -65,7 +66,7 @@ public class X_C_AcctSchema extends PO implements I_C_AcctSchema, I_Persistent
|
|||
setSeparator (null);
|
||||
// -
|
||||
setTaxCorrectionType (null);
|
||||
} */
|
||||
} */
|
||||
}
|
||||
|
||||
/** Load Constructor */
|
||||
|
@ -96,15 +97,16 @@ public class X_C_AcctSchema extends PO implements I_C_AcctSchema, I_Persistent
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
/** AD_OrgOnly_ID AD_Reference_ID=322 */
|
||||
public static final int AD_ORGONLY_ID_AD_Reference_ID=322;
|
||||
/** AD_OrgOnly_ID AD_Reference_ID=322 */
|
||||
public static final int AD_ORGONLY_ID_AD_Reference_ID=322;
|
||||
/** Set Only Organization.
|
||||
@param AD_OrgOnly_ID
|
||||
Create posting entries only for this organization
|
||||
*/
|
||||
public void setAD_OrgOnly_ID (int AD_OrgOnly_ID)
|
||||
{
|
||||
if (AD_OrgOnly_ID <= 0) set_Value (COLUMNNAME_AD_OrgOnly_ID, null);
|
||||
if (AD_OrgOnly_ID <= 0)
|
||||
set_Value (COLUMNNAME_AD_OrgOnly_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_AD_OrgOnly_ID, Integer.valueOf(AD_OrgOnly_ID));
|
||||
}
|
||||
|
@ -166,7 +168,7 @@ public static final int AD_ORGONLY_ID_AD_Reference_ID=322;
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Currency getI_C_Currency() throws Exception
|
||||
public I_C_Currency getC_Currency() throws Exception
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Currency.Table_Name);
|
||||
I_C_Currency result = null;
|
||||
|
@ -204,7 +206,7 @@ public static final int AD_ORGONLY_ID_AD_Reference_ID=322;
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Period getI_C_Period() throws Exception
|
||||
public I_C_Period getC_Period() throws Exception
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Period.Table_Name);
|
||||
I_C_Period result = null;
|
||||
|
@ -226,7 +228,8 @@ public static final int AD_ORGONLY_ID_AD_Reference_ID=322;
|
|||
*/
|
||||
public void setC_Period_ID (int C_Period_ID)
|
||||
{
|
||||
if (C_Period_ID <= 0) set_ValueNoCheck (COLUMNNAME_C_Period_ID, null);
|
||||
if (C_Period_ID <= 0)
|
||||
set_ValueNoCheck (COLUMNNAME_C_Period_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_C_Period_ID, Integer.valueOf(C_Period_ID));
|
||||
}
|
||||
|
@ -242,21 +245,26 @@ public static final int AD_ORGONLY_ID_AD_Reference_ID=322;
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** CommitmentType AD_Reference_ID=359 */
|
||||
public static final int COMMITMENTTYPE_AD_Reference_ID=359;/** Commitment & Reservation = B */
|
||||
public static final String COMMITMENTTYPE_CommitmentReservation = "B";/** Commitment only = C */
|
||||
public static final String COMMITMENTTYPE_CommitmentOnly = "C";/** None = N */
|
||||
public static final String COMMITMENTTYPE_None = "N";
|
||||
/** CommitmentType AD_Reference_ID=359 */
|
||||
public static final int COMMITMENTTYPE_AD_Reference_ID=359;
|
||||
/** Commitment only = C */
|
||||
public static final String COMMITMENTTYPE_CommitmentOnly = "C";
|
||||
/** Commitment & Reservation = B */
|
||||
public static final String COMMITMENTTYPE_CommitmentReservation = "B";
|
||||
/** None = N */
|
||||
public static final String COMMITMENTTYPE_None = "N";
|
||||
/** Set Commitment Type.
|
||||
@param CommitmentType
|
||||
Create Commitment and/or Reservations for Budget Control
|
||||
*/
|
||||
public void setCommitmentType (String CommitmentType)
|
||||
{
|
||||
if (CommitmentType == null) throw new IllegalArgumentException ("CommitmentType is mandatory");if (CommitmentType.equals("B") || CommitmentType.equals("C") || CommitmentType.equals("N")); else throw new IllegalArgumentException ("CommitmentType Invalid value - " + CommitmentType + " - Reference_ID=359 - B - C - N"); if (CommitmentType.length() > 1)
|
||||
if (CommitmentType == null) throw new IllegalArgumentException ("CommitmentType is mandatory");
|
||||
if (CommitmentType.equals("C") || CommitmentType.equals("B") || CommitmentType.equals("N")); else throw new IllegalArgumentException ("CommitmentType Invalid value - " + CommitmentType + " - Reference_ID=359 - C - B - N");
|
||||
if (CommitmentType.length() > 1)
|
||||
{
|
||||
log.warning("Length > 1 - truncated");
|
||||
CommitmentType = CommitmentType.substring(0, 0);
|
||||
CommitmentType = CommitmentType.substring(0, 1);
|
||||
}
|
||||
set_Value (COLUMNNAME_CommitmentType, CommitmentType);
|
||||
}
|
||||
|
@ -269,21 +277,26 @@ if (CommitmentType == null) throw new IllegalArgumentException ("CommitmentType
|
|||
return (String)get_Value(COLUMNNAME_CommitmentType);
|
||||
}
|
||||
|
||||
/** CostingLevel AD_Reference_ID=355 */
|
||||
public static final int COSTINGLEVEL_AD_Reference_ID=355;/** Batch/Lot = B */
|
||||
public static final String COSTINGLEVEL_BatchLot = "B";/** Client = C */
|
||||
public static final String COSTINGLEVEL_Client = "C";/** Organization = O */
|
||||
public static final String COSTINGLEVEL_Organization = "O";
|
||||
/** CostingLevel AD_Reference_ID=355 */
|
||||
public static final int COSTINGLEVEL_AD_Reference_ID=355;
|
||||
/** Client = C */
|
||||
public static final String COSTINGLEVEL_Client = "C";
|
||||
/** Organization = O */
|
||||
public static final String COSTINGLEVEL_Organization = "O";
|
||||
/** Batch/Lot = B */
|
||||
public static final String COSTINGLEVEL_BatchLot = "B";
|
||||
/** Set Costing Level.
|
||||
@param CostingLevel
|
||||
The lowest level to accumulate Costing Information
|
||||
*/
|
||||
public void setCostingLevel (String CostingLevel)
|
||||
{
|
||||
if (CostingLevel == null) throw new IllegalArgumentException ("CostingLevel is mandatory");if (CostingLevel.equals("B") || CostingLevel.equals("C") || CostingLevel.equals("O")); else throw new IllegalArgumentException ("CostingLevel Invalid value - " + CostingLevel + " - Reference_ID=355 - B - C - O"); if (CostingLevel.length() > 1)
|
||||
if (CostingLevel == null) throw new IllegalArgumentException ("CostingLevel is mandatory");
|
||||
if (CostingLevel.equals("C") || CostingLevel.equals("O") || CostingLevel.equals("B")); else throw new IllegalArgumentException ("CostingLevel Invalid value - " + CostingLevel + " - Reference_ID=355 - C - O - B");
|
||||
if (CostingLevel.length() > 1)
|
||||
{
|
||||
log.warning("Length > 1 - truncated");
|
||||
CostingLevel = CostingLevel.substring(0, 0);
|
||||
CostingLevel = CostingLevel.substring(0, 1);
|
||||
}
|
||||
set_Value (COLUMNNAME_CostingLevel, CostingLevel);
|
||||
}
|
||||
|
@ -296,27 +309,38 @@ if (CostingLevel == null) throw new IllegalArgumentException ("CostingLevel is m
|
|||
return (String)get_Value(COLUMNNAME_CostingLevel);
|
||||
}
|
||||
|
||||
/** CostingMethod AD_Reference_ID=122 */
|
||||
public static final int COSTINGMETHOD_AD_Reference_ID=122;/** Average PO = A */
|
||||
public static final String COSTINGMETHOD_AveragePO = "A";/** Fifo = F */
|
||||
public static final String COSTINGMETHOD_Fifo = "F";/** Average Invoice = I */
|
||||
public static final String COSTINGMETHOD_AverageInvoice = "I";/** Lifo = L */
|
||||
public static final String COSTINGMETHOD_Lifo = "L";/** Standard Costing = S */
|
||||
public static final String COSTINGMETHOD_StandardCosting = "S";/** User Defined = U */
|
||||
public static final String COSTINGMETHOD_UserDefined = "U";/** Last Invoice = i */
|
||||
public static final String COSTINGMETHOD_LastInvoice = "i";/** Last PO Price = p */
|
||||
public static final String COSTINGMETHOD_LastPOPrice = "p";/** _ = x */
|
||||
public static final String COSTINGMETHOD__ = "x";
|
||||
/** CostingMethod AD_Reference_ID=122 */
|
||||
public static final int COSTINGMETHOD_AD_Reference_ID=122;
|
||||
/** Standard Costing = S */
|
||||
public static final String COSTINGMETHOD_StandardCosting = "S";
|
||||
/** Average PO = A */
|
||||
public static final String COSTINGMETHOD_AveragePO = "A";
|
||||
/** Lifo = L */
|
||||
public static final String COSTINGMETHOD_Lifo = "L";
|
||||
/** Fifo = F */
|
||||
public static final String COSTINGMETHOD_Fifo = "F";
|
||||
/** Last PO Price = p */
|
||||
public static final String COSTINGMETHOD_LastPOPrice = "p";
|
||||
/** Average Invoice = I */
|
||||
public static final String COSTINGMETHOD_AverageInvoice = "I";
|
||||
/** Last Invoice = i */
|
||||
public static final String COSTINGMETHOD_LastInvoice = "i";
|
||||
/** User Defined = U */
|
||||
public static final String COSTINGMETHOD_UserDefined = "U";
|
||||
/** _ = x */
|
||||
public static final String COSTINGMETHOD__ = "x";
|
||||
/** Set Costing Method.
|
||||
@param CostingMethod
|
||||
Indicates how Costs will be calculated
|
||||
*/
|
||||
public void setCostingMethod (String CostingMethod)
|
||||
{
|
||||
if (CostingMethod == null) throw new IllegalArgumentException ("CostingMethod is mandatory");if (CostingMethod.equals("A") || CostingMethod.equals("F") || CostingMethod.equals("I") || CostingMethod.equals("L") || CostingMethod.equals("S") || CostingMethod.equals("U") || CostingMethod.equals("i") || CostingMethod.equals("p") || CostingMethod.equals("x")); else throw new IllegalArgumentException ("CostingMethod Invalid value - " + CostingMethod + " - Reference_ID=122 - A - F - I - L - S - U - i - p - x"); if (CostingMethod.length() > 1)
|
||||
if (CostingMethod == null) throw new IllegalArgumentException ("CostingMethod is mandatory");
|
||||
if (CostingMethod.equals("S") || CostingMethod.equals("A") || CostingMethod.equals("L") || CostingMethod.equals("F") || CostingMethod.equals("p") || CostingMethod.equals("I") || CostingMethod.equals("i") || CostingMethod.equals("U") || CostingMethod.equals("x")); else throw new IllegalArgumentException ("CostingMethod Invalid value - " + CostingMethod + " - Reference_ID=122 - S - A - L - F - p - I - i - U - x");
|
||||
if (CostingMethod.length() > 1)
|
||||
{
|
||||
log.warning("Length > 1 - truncated");
|
||||
CostingMethod = CostingMethod.substring(0, 0);
|
||||
CostingMethod = CostingMethod.substring(0, 1);
|
||||
}
|
||||
set_Value (COLUMNNAME_CostingMethod, CostingMethod);
|
||||
}
|
||||
|
@ -335,10 +359,11 @@ if (CostingMethod == null) throw new IllegalArgumentException ("CostingMethod is
|
|||
*/
|
||||
public void setDescription (String Description)
|
||||
{
|
||||
|
||||
if (Description != null && Description.length() > 255)
|
||||
{
|
||||
log.warning("Length > 255 - truncated");
|
||||
Description = Description.substring(0, 254);
|
||||
Description = Description.substring(0, 255);
|
||||
}
|
||||
set_Value (COLUMNNAME_Description, Description);
|
||||
}
|
||||
|
@ -351,23 +376,30 @@ if (CostingMethod == null) throw new IllegalArgumentException ("CostingMethod is
|
|||
return (String)get_Value(COLUMNNAME_Description);
|
||||
}
|
||||
|
||||
/** GAAP AD_Reference_ID=123 */
|
||||
public static final int GAAP_AD_Reference_ID=123;/** German HGB = DE */
|
||||
public static final String GAAP_GermanHGB = "DE";/** French Accounting Standard = FR */
|
||||
public static final String GAAP_FrenchAccountingStandard = "FR";/** International GAAP = UN */
|
||||
public static final String GAAP_InternationalGAAP = "UN";/** US GAAP = US */
|
||||
public static final String GAAP_USGAAP = "US";/** Custom Accounting Rules = XX */
|
||||
public static final String GAAP_CustomAccountingRules = "XX";
|
||||
/** GAAP AD_Reference_ID=123 */
|
||||
public static final int GAAP_AD_Reference_ID=123;
|
||||
/** International GAAP = UN */
|
||||
public static final String GAAP_InternationalGAAP = "UN";
|
||||
/** US GAAP = US */
|
||||
public static final String GAAP_USGAAP = "US";
|
||||
/** German HGB = DE */
|
||||
public static final String GAAP_GermanHGB = "DE";
|
||||
/** French Accounting Standard = FR */
|
||||
public static final String GAAP_FrenchAccountingStandard = "FR";
|
||||
/** Custom Accounting Rules = XX */
|
||||
public static final String GAAP_CustomAccountingRules = "XX";
|
||||
/** Set GAAP.
|
||||
@param GAAP
|
||||
Generally Accepted Accounting Principles
|
||||
*/
|
||||
public void setGAAP (String GAAP)
|
||||
{
|
||||
if (GAAP == null) throw new IllegalArgumentException ("GAAP is mandatory");if (GAAP.equals("DE") || GAAP.equals("FR") || GAAP.equals("UN") || GAAP.equals("US") || GAAP.equals("XX")); else throw new IllegalArgumentException ("GAAP Invalid value - " + GAAP + " - Reference_ID=123 - DE - FR - UN - US - XX"); if (GAAP.length() > 2)
|
||||
if (GAAP == null) throw new IllegalArgumentException ("GAAP is mandatory");
|
||||
if (GAAP.equals("UN") || GAAP.equals("US") || GAAP.equals("DE") || GAAP.equals("FR") || GAAP.equals("XX")); else throw new IllegalArgumentException ("GAAP Invalid value - " + GAAP + " - Reference_ID=123 - UN - US - DE - FR - XX");
|
||||
if (GAAP.length() > 2)
|
||||
{
|
||||
log.warning("Length > 2 - truncated");
|
||||
GAAP = GAAP.substring(0, 1);
|
||||
GAAP = GAAP.substring(0, 2);
|
||||
}
|
||||
set_Value (COLUMNNAME_GAAP, GAAP);
|
||||
}
|
||||
|
@ -548,6 +580,30 @@ if (GAAP == null) throw new IllegalArgumentException ("GAAP is mandatory");if (G
|
|||
return false;
|
||||
}
|
||||
|
||||
/** Set Post if Clearing Equal.
|
||||
@param IsPostIfClearingEqual
|
||||
This flag controls if Adempiere must post when clearing (transit) and final accounts are the same
|
||||
*/
|
||||
public void setIsPostIfClearingEqual (boolean IsPostIfClearingEqual)
|
||||
{
|
||||
set_Value (COLUMNNAME_IsPostIfClearingEqual, Boolean.valueOf(IsPostIfClearingEqual));
|
||||
}
|
||||
|
||||
/** Get Post if Clearing Equal.
|
||||
@return This flag controls if Adempiere must post when clearing (transit) and final accounts are the same
|
||||
*/
|
||||
public boolean isPostIfClearingEqual ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_IsPostIfClearingEqual);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set Post Services Separately.
|
||||
@param IsPostServices
|
||||
Differentiate between Services and Product Receivable/Payables
|
||||
|
@ -596,7 +652,7 @@ if (GAAP == null) throw new IllegalArgumentException ("GAAP is mandatory");if (G
|
|||
return false;
|
||||
}
|
||||
|
||||
public I_M_CostType getI_M_CostType() throws Exception
|
||||
public I_M_CostType getM_CostType() throws Exception
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_M_CostType.Table_Name);
|
||||
I_M_CostType result = null;
|
||||
|
@ -642,10 +698,11 @@ if (GAAP == null) throw new IllegalArgumentException ("GAAP is mandatory");if (G
|
|||
{
|
||||
if (Name == null)
|
||||
throw new IllegalArgumentException ("Name is mandatory.");
|
||||
|
||||
if (Name.length() > 60)
|
||||
{
|
||||
log.warning("Length > 60 - truncated");
|
||||
Name = Name.substring(0, 59);
|
||||
Name = Name.substring(0, 60);
|
||||
}
|
||||
set_Value (COLUMNNAME_Name, Name);
|
||||
}
|
||||
|
@ -714,7 +771,7 @@ if (GAAP == null) throw new IllegalArgumentException ("GAAP is mandatory");if (G
|
|||
}
|
||||
|
||||
/** Get Process Now.
|
||||
@return Process Now */
|
||||
@return Process Now */
|
||||
public boolean isProcessing ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_Processing);
|
||||
|
@ -735,10 +792,11 @@ if (GAAP == null) throw new IllegalArgumentException ("GAAP is mandatory");if (G
|
|||
{
|
||||
if (Separator == null)
|
||||
throw new IllegalArgumentException ("Separator is mandatory.");
|
||||
|
||||
if (Separator.length() > 1)
|
||||
{
|
||||
log.warning("Length > 1 - truncated");
|
||||
Separator = Separator.substring(0, 0);
|
||||
Separator = Separator.substring(0, 1);
|
||||
}
|
||||
set_Value (COLUMNNAME_Separator, Separator);
|
||||
}
|
||||
|
@ -751,22 +809,28 @@ if (GAAP == null) throw new IllegalArgumentException ("GAAP is mandatory");if (G
|
|||
return (String)get_Value(COLUMNNAME_Separator);
|
||||
}
|
||||
|
||||
/** TaxCorrectionType AD_Reference_ID=392 */
|
||||
public static final int TAXCORRECTIONTYPE_AD_Reference_ID=392;/** Write-off and Discount = B */
|
||||
public static final String TAXCORRECTIONTYPE_Write_OffAndDiscount = "B";/** Discount only = D */
|
||||
public static final String TAXCORRECTIONTYPE_DiscountOnly = "D";/** None = N */
|
||||
public static final String TAXCORRECTIONTYPE_None = "N";/** Write-off only = W */
|
||||
public static final String TAXCORRECTIONTYPE_Write_OffOnly = "W";
|
||||
/** TaxCorrectionType AD_Reference_ID=392 */
|
||||
public static final int TAXCORRECTIONTYPE_AD_Reference_ID=392;
|
||||
/** None = N */
|
||||
public static final String TAXCORRECTIONTYPE_None = "N";
|
||||
/** Write-off only = W */
|
||||
public static final String TAXCORRECTIONTYPE_Write_OffOnly = "W";
|
||||
/** Discount only = D */
|
||||
public static final String TAXCORRECTIONTYPE_DiscountOnly = "D";
|
||||
/** Write-off and Discount = B */
|
||||
public static final String TAXCORRECTIONTYPE_Write_OffAndDiscount = "B";
|
||||
/** Set Tax Correction.
|
||||
@param TaxCorrectionType
|
||||
Type of Tax Correction
|
||||
*/
|
||||
public void setTaxCorrectionType (String TaxCorrectionType)
|
||||
{
|
||||
if (TaxCorrectionType == null) throw new IllegalArgumentException ("TaxCorrectionType is mandatory");if (TaxCorrectionType.equals("B") || TaxCorrectionType.equals("D") || TaxCorrectionType.equals("N") || TaxCorrectionType.equals("W")); else throw new IllegalArgumentException ("TaxCorrectionType Invalid value - " + TaxCorrectionType + " - Reference_ID=392 - B - D - N - W"); if (TaxCorrectionType.length() > 1)
|
||||
if (TaxCorrectionType == null) throw new IllegalArgumentException ("TaxCorrectionType is mandatory");
|
||||
if (TaxCorrectionType.equals("N") || TaxCorrectionType.equals("W") || TaxCorrectionType.equals("D") || TaxCorrectionType.equals("B")); else throw new IllegalArgumentException ("TaxCorrectionType Invalid value - " + TaxCorrectionType + " - Reference_ID=392 - N - W - D - B");
|
||||
if (TaxCorrectionType.length() > 1)
|
||||
{
|
||||
log.warning("Length > 1 - truncated");
|
||||
TaxCorrectionType = TaxCorrectionType.substring(0, 0);
|
||||
TaxCorrectionType = TaxCorrectionType.substring(0, 1);
|
||||
}
|
||||
set_Value (COLUMNNAME_TaxCorrectionType, TaxCorrectionType);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
/
|
||||
|
|
@ -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)
|
||||
/
|
||||
|
Loading…
Reference in New Issue