FR [ 1814291 ] Sales Commitment Offset

This commit is contained in:
Carlos Ruiz 2007-12-01 08:55:53 +00:00
parent 2acd198962
commit eb4384f4cb
16 changed files with 1548 additions and 811 deletions

View File

@ -1239,6 +1239,8 @@ public abstract class Doc
public static final int ACCTTYPE_PPVOffset = 101; public static final int ACCTTYPE_PPVOffset = 101;
/** GL Accounts - Commitment Offset */ /** GL Accounts - Commitment Offset */
public static final int ACCTTYPE_CommitmentOffset = 111; public static final int ACCTTYPE_CommitmentOffset = 111;
/** GL Accounts - Commitment Offset Sales */
public static final int ACCTTYPE_CommitmentOffsetSales = 112;
/** /**
@ -1413,6 +1415,11 @@ public abstract class Doc
sql = "SELECT CommitmentOffset_Acct FROM C_AcctSchema_GL WHERE C_AcctSchema_ID=?"; sql = "SELECT CommitmentOffset_Acct FROM C_AcctSchema_GL WHERE C_AcctSchema_ID=?";
para_1 = -1; para_1 = -1;
} }
else if (AcctType == ACCTTYPE_CommitmentOffsetSales)
{
sql = "SELECT CommitmentOffsetSales_Acct FROM C_AcctSchema_GL WHERE C_AcctSchema_ID=?";
para_1 = -1;
}
else else
{ {

View File

@ -436,7 +436,7 @@ public class Doc_Allocation extends Doc
log.config("Allocation Accounted=" + allocationAccounted); log.config("Allocation Accounted=" + allocationAccounted);
// Cash Based Commitment Release // Cash Based Commitment Release
if (as.isCreateCommitment() && !invoice.isSOTrx()) if (as.isCreatePOCommitment() && !invoice.isSOTrx())
{ {
MInvoiceLine[] lines = invoice.getLines(); MInvoiceLine[] lines = invoice.getLines();
for (int i = 0; i < lines.length; i++) for (int i = 0; i < lines.length; i++)

View File

@ -125,6 +125,8 @@ public class Doc_InOut extends Doc
*/ */
public ArrayList<Fact> createFacts (MAcctSchema as) public ArrayList<Fact> createFacts (MAcctSchema as)
{ {
//
ArrayList<Fact> facts = new ArrayList<Fact>();
// create Fact Header // create Fact Header
Fact fact = new Fact(this, as, Fact.POST_Actual); Fact fact = new Fact(this, as, Fact.POST_Actual);
setC_Currency_ID (as.getC_Currency_ID()); setC_Currency_ID (as.getC_Currency_ID());
@ -196,6 +198,20 @@ public class Doc_InOut extends Doc
} }
} // for all lines } // for all lines
updateProductInfo(as.getC_AcctSchema_ID()); // only for SO! updateProductInfo(as.getC_AcctSchema_ID()); // only for SO!
/** Commitment release ****/
if (as.isAccrual() && as.isCreateSOCommitment())
{
for (int i = 0; i < p_lines.length; i++)
{
DocLine line = p_lines[i];
Fact factcomm = Doc_Order.getCommitmentSalesRelease(as, this,
line.getQty(), line.get_ID(), Env.ONE);
if (factcomm != null)
facts.add(factcomm);
}
} // Commitment
} // Shipment } // Shipment
// *** Sales - Return // *** Sales - Return
else if ( getDocumentType().equals(DOCTYPE_MatReceipt) && isSOTrx() ) else if ( getDocumentType().equals(DOCTYPE_MatReceipt) && isSOTrx() )
@ -403,7 +419,6 @@ public class Doc_InOut extends Doc
return null; return null;
} }
// //
ArrayList<Fact> facts = new ArrayList<Fact>();
facts.add(fact); facts.add(fact);
return facts; return facts;
} // createFact } // createFact

View File

@ -316,7 +316,7 @@ public class Doc_MatchInv extends Doc
facts.add(fact); facts.add(fact);
/** Commitment release ****/ /** Commitment release ****/
if (as.isAccrual() && as.isCreateCommitment()) if (as.isAccrual() && as.isCreatePOCommitment())
{ {
fact = Doc_Order.getCommitmentRelease(as, this, fact = Doc_Order.getCommitmentRelease(as, this,
getQty(), m_invoiceLine.getC_InvoiceLine_ID(), Env.ONE); getQty(), m_invoiceLine.getC_InvoiceLine_ID(), Env.ONE);

View File

@ -340,7 +340,7 @@ public class Doc_Order extends Doc
// Commitment // Commitment
FactLine fl = null; FactLine fl = null;
if (as.isCreateCommitment()) if (as.isCreatePOCommitment())
{ {
Fact fact = new Fact(this, as, Fact.POST_Commitment); Fact fact = new Fact(this, as, Fact.POST_Commitment);
BigDecimal total = Env.ZERO; BigDecimal total = Env.ZERO;
@ -402,6 +402,40 @@ public class Doc_Order extends Doc
} // reservations } // reservations
} }
// SO // SO
else if (getDocumentType().equals(DOCTYPE_SOrder))
{
// Commitment
FactLine fl = null;
if (as.isCreateSOCommitment())
{
Fact fact = new Fact(this, as, Fact.POST_Commitment);
BigDecimal total = Env.ZERO;
for (int i = 0; i < p_lines.length; i++)
{
DocLine line = p_lines[i];
BigDecimal cost = line.getAmtSource();
total = total.add(cost);
// Account
MAccount revenue = line.getAccount(ProductCost.ACCTTYPE_P_Revenue, as);
fl = fact.createLine (line, revenue,
getC_Currency_ID(), null, cost);
}
// Offset
MAccount offset = getAccount(ACCTTYPE_CommitmentOffsetSales, as);
if (offset == null)
{
p_Error = "@NotFound@ @CommitmentOffsetSales_Acct@";
log.log(Level.SEVERE, p_Error);
return null;
}
fact.createLine (null, offset,
getC_Currency_ID(), total, null);
//
facts.add(fact);
}
}
return facts; return facts;
} // createFact } // createFact
@ -596,6 +630,152 @@ public class Doc_Order extends Doc
return fact; return fact;
} // getCommitmentRelease } // getCommitmentRelease
/**
* Get Commitments Sales
* @param doc document
* @param maxQty Qty invoiced/matched
* @param C_OrderLine_ID invoice line
* @return commitments (order lines)
*/
protected static DocLine[] getCommitmentsSales(Doc doc, BigDecimal maxQty, int M_InOutLine_ID)
{
int precision = -1;
//
ArrayList<DocLine> list = new ArrayList<DocLine>();
String sql = "SELECT * FROM C_OrderLine ol "
+ "WHERE EXISTS "
+ "(SELECT * FROM M_InOutLine il "
+ "WHERE il.C_OrderLine_ID=ol.C_OrderLine_ID"
+ " AND il.M_InOutLine_ID=?)";
PreparedStatement pstmt = null;
try
{
pstmt = DB.prepareStatement (sql, null);
pstmt.setInt (1, M_InOutLine_ID);
ResultSet rs = pstmt.executeQuery ();
while (rs.next ())
{
if (maxQty.signum() == 0)
continue;
MOrderLine line = new MOrderLine (doc.getCtx(), rs, null);
DocLine docLine = new DocLine (line, doc);
// Currency
if (precision == -1)
{
doc.setC_Currency_ID(docLine.getC_Currency_ID());
precision = MCurrency.getStdPrecision(doc.getCtx(), docLine.getC_Currency_ID());
}
// Qty
BigDecimal Qty = line.getQtyOrdered().max(maxQty);
docLine.setQty(Qty, false);
//
BigDecimal PriceActual = line.getPriceActual();
BigDecimal PriceCost = line.getPriceCost();
BigDecimal LineNetAmt = null;
if (PriceCost != null && PriceCost.signum() != 0)
LineNetAmt = Qty.multiply(PriceCost);
else if (Qty.equals(maxQty))
LineNetAmt = line.getLineNetAmt();
else
LineNetAmt = Qty.multiply(PriceActual);
maxQty = maxQty.subtract(Qty);
docLine.setAmount (LineNetAmt); // DR
BigDecimal PriceList = line.getPriceList();
int C_Tax_ID = docLine.getC_Tax_ID();
// Correct included Tax
if (C_Tax_ID != 0 && line.getParent().isTaxIncluded())
{
MTax tax = MTax.get(doc.getCtx(), C_Tax_ID);
if (!tax.isZeroTax())
{
BigDecimal LineNetAmtTax = tax.calculateTax(LineNetAmt, true, precision);
s_log.fine("LineNetAmt=" + LineNetAmt + " - Tax=" + LineNetAmtTax);
LineNetAmt = LineNetAmt.subtract(LineNetAmtTax);
BigDecimal PriceListTax = tax.calculateTax(PriceList, true, precision);
PriceList = PriceList.subtract(PriceListTax);
}
} // correct included Tax
docLine.setAmount (LineNetAmt, PriceList, Qty);
list.add(docLine);
}
rs.close ();
pstmt.close ();
pstmt = null;
}
catch (Exception e)
{
s_log.log (Level.SEVERE, sql, e);
}
try
{
if (pstmt != null)
pstmt.close ();
pstmt = null;
}
catch (Exception e)
{
pstmt = null;
}
// Return Array
DocLine[] dl = new DocLine[list.size()];
list.toArray(dl);
return dl;
} // getCommitmentsSales
/**
* Get Commitment Sales Release.
* Called from InOut
* @param as accounting schema
* @param doc doc
* @param Qty qty invoiced/matched
* @param C_OrderLine_ID line
* @param multiplier 1 for accrual
* @return Fact
*/
protected static Fact getCommitmentSalesRelease(MAcctSchema as, Doc doc,
BigDecimal Qty, int M_InOutLine_ID, BigDecimal multiplier)
{
Fact fact = new Fact(doc, as, Fact.POST_Commitment);
DocLine[] commitments = Doc_Order.getCommitmentsSales(doc, Qty,
M_InOutLine_ID);
BigDecimal total = Env.ZERO;
FactLine fl = null;
int C_Currency_ID = -1;
for (int i = 0; i < commitments.length; i++)
{
DocLine line = commitments[i];
if (C_Currency_ID == -1)
C_Currency_ID = line.getC_Currency_ID();
else if (C_Currency_ID != line.getC_Currency_ID())
{
doc.p_Error = "Different Currencies of Order Lines";
s_log.log(Level.SEVERE, doc.p_Error);
return null;
}
BigDecimal cost = line.getAmtSource().multiply(multiplier);
total = total.add(cost);
// Account
MAccount revenue = line.getAccount(ProductCost.ACCTTYPE_P_Revenue, as);
fl = fact.createLine (line, revenue,
C_Currency_ID, cost, null);
}
// Offset
MAccount offset = doc.getAccount(ACCTTYPE_CommitmentOffsetSales, as);
if (offset == null)
{
doc.p_Error = "@NotFound@ @CommitmentOffsetSales_Acct@";
s_log.log(Level.SEVERE, doc.p_Error);
return null;
}
fact.createLine (null, offset,
C_Currency_ID, null, total);
return fact;
} // getCommitmentSalesRelease
/************************************************************************** /**************************************************************************
* Update Product Info (old) * Update Product Info (old)

View File

@ -32,14 +32,12 @@
**********************************************************************/ **********************************************************************/
package org.compiere.model; package org.compiere.model;
import java.util.*; import java.math.BigDecimal;
import java.sql.Timestamp; import org.compiere.util.KeyNamePair;
import java.math.*;
import org.compiere.util.*;
/** Generated Interface for C_AcctSchema_GL /** Generated Interface for C_AcctSchema_GL
* @author Trifon Trifonov (generated) * @author Trifon Trifonov (generated)
* @version Release 3.3.0 - 2007-08-24 11:39:36.64 * @version Release 3.3.0
*/ */
public interface I_C_AcctSchema_GL public interface I_C_AcctSchema_GL
{ {
@ -54,7 +52,7 @@ import org.compiere.util.*;
/** AccessLevel = 2 - Client /** AccessLevel = 2 - Client
*/ */
BigDecimal accessLevel = new BigDecimal(2); BigDecimal accessLevel = BigDecimal.valueOf(2);
/** Load Meta Data */ /** Load Meta Data */
@ -71,7 +69,20 @@ import org.compiere.util.*;
*/ */
public int getC_AcctSchema_ID(); public int getC_AcctSchema_ID();
public I_C_AcctSchema getI_C_AcctSchema() throws Exception; public I_C_AcctSchema getC_AcctSchema() throws Exception;
/** Column name CommitmentOffsetSales_Acct */
public static final String COLUMNNAME_CommitmentOffsetSales_Acct = "CommitmentOffsetSales_Acct";
/** Set Commitment Offset Sales.
* Budgetary Commitment Offset Account for Sales
*/
public void setCommitmentOffsetSales_Acct (int CommitmentOffsetSales_Acct);
/** Get Commitment Offset Sales.
* Budgetary Commitment Offset Account for Sales
*/
public int getCommitmentOffsetSales_Acct();
/** Column name CommitmentOffset_Acct */ /** Column name CommitmentOffset_Acct */
public static final String COLUMNNAME_CommitmentOffset_Acct = "CommitmentOffset_Acct"; public static final String COLUMNNAME_CommitmentOffset_Acct = "CommitmentOffset_Acct";

View File

@ -32,14 +32,12 @@
**********************************************************************/ **********************************************************************/
package org.compiere.model; package org.compiere.model;
import java.util.*; import java.math.BigDecimal;
import java.sql.Timestamp; import org.compiere.util.KeyNamePair;
import java.math.*;
import org.compiere.util.*;
/** Generated Interface for GL_BudgetControl /** Generated Interface for GL_BudgetControl
* @author Trifon Trifonov (generated) * @author Trifon Trifonov (generated)
* @version Release 3.3.0 - 2007-08-24 11:39:47.187 * @version Release 3.3.0
*/ */
public interface I_GL_BudgetControl public interface I_GL_BudgetControl
{ {
@ -54,7 +52,7 @@ import org.compiere.util.*;
/** AccessLevel = 2 - Client /** AccessLevel = 2 - Client
*/ */
BigDecimal accessLevel = new BigDecimal(2); BigDecimal accessLevel = BigDecimal.valueOf(2);
/** Load Meta Data */ /** Load Meta Data */
@ -84,7 +82,7 @@ import org.compiere.util.*;
*/ */
public int getC_AcctSchema_ID(); public int getC_AcctSchema_ID();
public I_C_AcctSchema getI_C_AcctSchema() throws Exception; public I_C_AcctSchema getC_AcctSchema() throws Exception;
/** Column name CommitmentType */ /** Column name CommitmentType */
public static final String COLUMNNAME_CommitmentType = "CommitmentType"; public static final String COLUMNNAME_CommitmentType = "CommitmentType";
@ -138,7 +136,7 @@ import org.compiere.util.*;
*/ */
public int getGL_Budget_ID(); public int getGL_Budget_ID();
public I_GL_Budget getI_GL_Budget() throws Exception; public I_GL_Budget getGL_Budget() throws Exception;
/** Column name Help */ /** Column name Help */
public static final String COLUMNNAME_Help = "Help"; public static final String COLUMNNAME_Help = "Help";

View File

@ -514,16 +514,32 @@ public class MAcctSchema extends X_C_AcctSchema
} // isCostingLevelBatch } // isCostingLevelBatch
/** /**
* Create Commitment Accounting * Create PO Commitment Accounting
* @return true if creaet commitments * @return true if creaet commitments
*/ */
public boolean isCreateCommitment() public boolean isCreatePOCommitment()
{ {
String s = getCommitmentType(); String s = getCommitmentType();
if (s == null) if (s == null)
return false; return false;
return COMMITMENTTYPE_CommitmentOnly.equals(s) return COMMITMENTTYPE_POCommitmentOnly.equals(s)
|| COMMITMENTTYPE_CommitmentReservation.equals(s); || COMMITMENTTYPE_POCommitmentReservation.equals(s)
|| COMMITMENTTYPE_POSOCommitmentReservation.equals(s)
|| COMMITMENTTYPE_POSOCommitment.equals(s);
} // isCreateCommitment
/**
* Create SO Commitment Accounting
* @return true if creaet commitments
*/
public boolean isCreateSOCommitment()
{
String s = getCommitmentType();
if (s == null)
return false;
return COMMITMENTTYPE_SOCommitmentOnly.equals(s)
|| COMMITMENTTYPE_POSOCommitmentReservation.equals(s)
|| COMMITMENTTYPE_POSOCommitment.equals(s);
} // isCreateCommitment } // isCreateCommitment
/** /**
@ -535,7 +551,8 @@ public class MAcctSchema extends X_C_AcctSchema
String s = getCommitmentType(); String s = getCommitmentType();
if (s == null) if (s == null)
return false; return false;
return COMMITMENTTYPE_CommitmentReservation.equals(s); return COMMITMENTTYPE_POCommitmentReservation.equals(s)
|| COMMITMENTTYPE_POSOCommitmentReservation.equals(s);
} // isCreateReservation } // isCreateReservation
/** /**

View File

@ -560,7 +560,7 @@ public final class MSetup
+ "USECURRENCYBALANCING,CURRENCYBALANCING_Acct," + "USECURRENCYBALANCING,CURRENCYBALANCING_Acct,"
+ "RETAINEDEARNING_Acct,INCOMESUMMARY_Acct," + "RETAINEDEARNING_Acct,INCOMESUMMARY_Acct,"
+ "INTERCOMPANYDUETO_Acct,INTERCOMPANYDUEFROM_Acct," + "INTERCOMPANYDUETO_Acct,INTERCOMPANYDUEFROM_Acct,"
+ "PPVOFFSET_Acct, CommitmentOffset_Acct) VALUES ("); + "PPVOFFSET_Acct, CommitmentOffset_Acct, CommitmentOffsetSales_Acct) VALUES (");
sqlCmd.append(m_stdValues).append(",").append(m_as.getC_AcctSchema_ID()).append(",") sqlCmd.append(m_stdValues).append(",").append(m_as.getC_AcctSchema_ID()).append(",")
.append("'Y',").append(getAcct("SUSPENSEBALANCING_Acct")).append(",") .append("'Y',").append(getAcct("SUSPENSEBALANCING_Acct")).append(",")
.append("'Y',").append(getAcct("SUSPENSEERROR_Acct")).append(",") .append("'Y',").append(getAcct("SUSPENSEERROR_Acct")).append(",")
@ -572,7 +572,8 @@ public final class MSetup
.append(getAcct("INTERCOMPANYDUETO_Acct")).append(",") .append(getAcct("INTERCOMPANYDUETO_Acct")).append(",")
.append(getAcct("INTERCOMPANYDUEFROM_Acct")).append(",") .append(getAcct("INTERCOMPANYDUEFROM_Acct")).append(",")
.append(getAcct("PPVOFFSET_Acct")).append(",") .append(getAcct("PPVOFFSET_Acct")).append(",")
.append(getAcct("CommitmentOffset_Acct")) .append(getAcct("CommitmentOffset_Acct")).append(",")
.append(getAcct("CommitmentOffsetSales_Acct"))
.append(")"); .append(")");
if (m_accountsOK) if (m_accountsOK)
no = DB.executeUpdate(sqlCmd.toString(), m_trx.getTrxName()); no = DB.executeUpdate(sqlCmd.toString(), m_trx.getTrxName());

View File

@ -247,12 +247,18 @@ public class X_C_AcctSchema extends PO implements I_C_AcctSchema, I_Persistent
/** CommitmentType AD_Reference_ID=359 */ /** CommitmentType AD_Reference_ID=359 */
public static final int COMMITMENTTYPE_AD_Reference_ID=359; public static final int COMMITMENTTYPE_AD_Reference_ID=359;
/** Commitment only = C */ /** PO Commitment only = C */
public static final String COMMITMENTTYPE_CommitmentOnly = "C"; public static final String COMMITMENTTYPE_POCommitmentOnly = "C";
/** Commitment & Reservation = B */ /** PO Commitment & Reservation = B */
public static final String COMMITMENTTYPE_CommitmentReservation = "B"; public static final String COMMITMENTTYPE_POCommitmentReservation = "B";
/** None = N */ /** None = N */
public static final String COMMITMENTTYPE_None = "N"; public static final String COMMITMENTTYPE_None = "N";
/** PO/SO Commitment & Reservation = A */
public static final String COMMITMENTTYPE_POSOCommitmentReservation = "A";
/** SO Commitment only = S */
public static final String COMMITMENTTYPE_SOCommitmentOnly = "S";
/** PO/SO Commitment = O */
public static final String COMMITMENTTYPE_POSOCommitment = "O";
/** Set Commitment Type. /** Set Commitment Type.
@param CommitmentType @param CommitmentType
Create Commitment and/or Reservations for Budget Control Create Commitment and/or Reservations for Budget Control
@ -260,7 +266,7 @@ public class X_C_AcctSchema extends PO implements I_C_AcctSchema, I_Persistent
public void setCommitmentType (String CommitmentType) public void setCommitmentType (String CommitmentType)
{ {
if (CommitmentType == null) throw new IllegalArgumentException ("CommitmentType is mandatory"); 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.equals("C") || CommitmentType.equals("B") || CommitmentType.equals("N") || CommitmentType.equals("A") || CommitmentType.equals("S") || CommitmentType.equals("O")); else throw new IllegalArgumentException ("CommitmentType Invalid value - " + CommitmentType + " - Reference_ID=359 - C - B - N - A - S - O");
if (CommitmentType.length() > 1) if (CommitmentType.length() > 1)
{ {
log.warning("Length > 1 - truncated"); log.warning("Length > 1 - truncated");

View File

@ -17,12 +17,11 @@
/** Generated Model - DO NOT CHANGE */ /** Generated Model - DO NOT CHANGE */
package org.compiere.model; package org.compiere.model;
import java.util.*;
import java.sql.*;
import java.math.*;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.sql.ResultSet;
import java.util.Properties;
import java.util.logging.Level; import java.util.logging.Level;
import org.compiere.util.*; import org.compiere.util.KeyNamePair;
/** Generated Model for C_AcctSchema_GL /** Generated Model for C_AcctSchema_GL
* @author Adempiere (generated) * @author Adempiere (generated)
@ -39,7 +38,10 @@ public class X_C_AcctSchema_GL extends PO implements I_C_AcctSchema_GL, I_Persis
public X_C_AcctSchema_GL (Properties ctx, int C_AcctSchema_GL_ID, String trxName) public X_C_AcctSchema_GL (Properties ctx, int C_AcctSchema_GL_ID, String trxName)
{ {
super (ctx, C_AcctSchema_GL_ID, trxName); super (ctx, C_AcctSchema_GL_ID, trxName);
/** if (C_AcctSchema_GL_ID == 0) { setC_AcctSchema_ID (0); /** if (C_AcctSchema_GL_ID == 0)
{
setC_AcctSchema_ID (0);
setCommitmentOffsetSales_Acct (0);
setCommitmentOffset_Acct (0); setCommitmentOffset_Acct (0);
setIncomeSummary_Acct (0); setIncomeSummary_Acct (0);
setIntercompanyDueFrom_Acct (0); setIntercompanyDueFrom_Acct (0);
@ -80,7 +82,7 @@ public class X_C_AcctSchema_GL extends PO implements I_C_AcctSchema_GL, I_Persis
return sb.toString(); return sb.toString();
} }
public I_C_AcctSchema getI_C_AcctSchema() throws Exception public I_C_AcctSchema getC_AcctSchema() throws Exception
{ {
Class<?> clazz = MTable.getClass(I_C_AcctSchema.Table_Name); Class<?> clazz = MTable.getClass(I_C_AcctSchema.Table_Name);
I_C_AcctSchema result = null; I_C_AcctSchema result = null;
@ -126,6 +128,26 @@ public class X_C_AcctSchema_GL extends PO implements I_C_AcctSchema_GL, I_Persis
return new KeyNamePair(get_ID(), String.valueOf(getC_AcctSchema_ID())); return new KeyNamePair(get_ID(), String.valueOf(getC_AcctSchema_ID()));
} }
/** Set Commitment Offset Sales.
@param CommitmentOffsetSales_Acct
Budgetary Commitment Offset Account for Sales
*/
public void setCommitmentOffsetSales_Acct (int CommitmentOffsetSales_Acct)
{
set_Value (COLUMNNAME_CommitmentOffsetSales_Acct, Integer.valueOf(CommitmentOffsetSales_Acct));
}
/** Get Commitment Offset Sales.
@return Budgetary Commitment Offset Account for Sales
*/
public int getCommitmentOffsetSales_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_CommitmentOffsetSales_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Commitment Offset. /** Set Commitment Offset.
@param CommitmentOffset_Acct @param CommitmentOffset_Acct
Budgetary Commitment Offset Account Budgetary Commitment Offset Account

View File

@ -17,12 +17,11 @@
/** Generated Model - DO NOT CHANGE */ /** Generated Model - DO NOT CHANGE */
package org.compiere.model; package org.compiere.model;
import java.util.*;
import java.sql.*;
import java.math.*;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.sql.ResultSet;
import java.util.Properties;
import java.util.logging.Level; import java.util.logging.Level;
import org.compiere.util.*; import org.compiere.util.KeyNamePair;
/** Generated Model for GL_BudgetControl /** Generated Model for GL_BudgetControl
* @author Adempiere (generated) * @author Adempiere (generated)
@ -39,7 +38,9 @@ public class X_GL_BudgetControl extends PO implements I_GL_BudgetControl, I_Pers
public X_GL_BudgetControl (Properties ctx, int GL_BudgetControl_ID, String trxName) public X_GL_BudgetControl (Properties ctx, int GL_BudgetControl_ID, String trxName)
{ {
super (ctx, GL_BudgetControl_ID, trxName); super (ctx, GL_BudgetControl_ID, trxName);
/** if (GL_BudgetControl_ID == 0) { setBudgetControlScope (null); /** if (GL_BudgetControl_ID == 0)
{
setBudgetControlScope (null);
setC_AcctSchema_ID (0); setC_AcctSchema_ID (0);
setCommitmentType (null); setCommitmentType (null);
// C // C
@ -79,20 +80,25 @@ public class X_GL_BudgetControl extends PO implements I_GL_BudgetControl, I_Pers
} }
/** BudgetControlScope AD_Reference_ID=361 */ /** BudgetControlScope AD_Reference_ID=361 */
public static final int BUDGETCONTROLSCOPE_AD_Reference_ID=361;/** Period only = P */ public static final int BUDGETCONTROLSCOPE_AD_Reference_ID=361;
public static final String BUDGETCONTROLSCOPE_PeriodOnly = "P";/** Total = T */ /** Period only = P */
public static final String BUDGETCONTROLSCOPE_Total = "T";/** Year To Date = Y */ public static final String BUDGETCONTROLSCOPE_PeriodOnly = "P";
/** Year To Date = Y */
public static final String BUDGETCONTROLSCOPE_YearToDate = "Y"; public static final String BUDGETCONTROLSCOPE_YearToDate = "Y";
/** Total = T */
public static final String BUDGETCONTROLSCOPE_Total = "T";
/** Set Control Scope. /** Set Control Scope.
@param BudgetControlScope @param BudgetControlScope
Scope of the Budget Control Scope of the Budget Control
*/ */
public void setBudgetControlScope (String BudgetControlScope) public void setBudgetControlScope (String BudgetControlScope)
{ {
if (BudgetControlScope == null) throw new IllegalArgumentException ("BudgetControlScope is mandatory");if (BudgetControlScope.equals("P") || BudgetControlScope.equals("T") || BudgetControlScope.equals("Y")); else throw new IllegalArgumentException ("BudgetControlScope Invalid value - " + BudgetControlScope + " - Reference_ID=361 - P - T - Y"); if (BudgetControlScope.length() > 1) if (BudgetControlScope == null) throw new IllegalArgumentException ("BudgetControlScope is mandatory");
if (BudgetControlScope.equals("P") || BudgetControlScope.equals("Y") || BudgetControlScope.equals("T")); else throw new IllegalArgumentException ("BudgetControlScope Invalid value - " + BudgetControlScope + " - Reference_ID=361 - P - Y - T");
if (BudgetControlScope.length() > 1)
{ {
log.warning("Length > 1 - truncated"); log.warning("Length > 1 - truncated");
BudgetControlScope = BudgetControlScope.substring(0, 0); BudgetControlScope = BudgetControlScope.substring(0, 1);
} }
set_Value (COLUMNNAME_BudgetControlScope, BudgetControlScope); set_Value (COLUMNNAME_BudgetControlScope, BudgetControlScope);
} }
@ -105,7 +111,7 @@ if (BudgetControlScope == null) throw new IllegalArgumentException ("BudgetContr
return (String)get_Value(COLUMNNAME_BudgetControlScope); return (String)get_Value(COLUMNNAME_BudgetControlScope);
} }
public I_C_AcctSchema getI_C_AcctSchema() throws Exception public I_C_AcctSchema getC_AcctSchema() throws Exception
{ {
Class<?> clazz = MTable.getClass(I_C_AcctSchema.Table_Name); Class<?> clazz = MTable.getClass(I_C_AcctSchema.Table_Name);
I_C_AcctSchema result = null; I_C_AcctSchema result = null;
@ -144,20 +150,31 @@ if (BudgetControlScope == null) throw new IllegalArgumentException ("BudgetContr
} }
/** CommitmentType AD_Reference_ID=359 */ /** CommitmentType AD_Reference_ID=359 */
public static final int COMMITMENTTYPE_AD_Reference_ID=359;/** Commitment & Reservation = B */ public static final int COMMITMENTTYPE_AD_Reference_ID=359;
public static final String COMMITMENTTYPE_CommitmentReservation = "B";/** Commitment only = C */ /** PO Commitment only = C */
public static final String COMMITMENTTYPE_CommitmentOnly = "C";/** None = N */ public static final String COMMITMENTTYPE_POCommitmentOnly = "C";
/** PO Commitment & Reservation = B */
public static final String COMMITMENTTYPE_POCommitmentReservation = "B";
/** None = N */
public static final String COMMITMENTTYPE_None = "N"; public static final String COMMITMENTTYPE_None = "N";
/** PO/SO Commitment & Reservation = A */
public static final String COMMITMENTTYPE_POSOCommitmentReservation = "A";
/** SO Commitment only = S */
public static final String COMMITMENTTYPE_SOCommitmentOnly = "S";
/** PO/SO Commitment = O */
public static final String COMMITMENTTYPE_POSOCommitment = "O";
/** Set Commitment Type. /** Set Commitment Type.
@param CommitmentType @param CommitmentType
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)
{ {
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") || CommitmentType.equals("A") || CommitmentType.equals("S") || CommitmentType.equals("O")); else throw new IllegalArgumentException ("CommitmentType Invalid value - " + CommitmentType + " - Reference_ID=359 - C - B - N - A - S - O");
if (CommitmentType.length() > 1)
{ {
log.warning("Length > 1 - truncated"); log.warning("Length > 1 - truncated");
CommitmentType = CommitmentType.substring(0, 0); CommitmentType = CommitmentType.substring(0, 1);
} }
set_Value (COLUMNNAME_CommitmentType, CommitmentType); set_Value (COLUMNNAME_CommitmentType, CommitmentType);
} }
@ -176,10 +193,11 @@ if (CommitmentType == null) throw new IllegalArgumentException ("CommitmentType
*/ */
public void setDescription (String Description) public void setDescription (String Description)
{ {
if (Description != null && Description.length() > 255) if (Description != null && Description.length() > 255)
{ {
log.warning("Length > 255 - truncated"); log.warning("Length > 255 - truncated");
Description = Description.substring(0, 254); Description = Description.substring(0, 255);
} }
set_Value (COLUMNNAME_Description, Description); set_Value (COLUMNNAME_Description, Description);
} }
@ -214,7 +232,7 @@ if (CommitmentType == null) throw new IllegalArgumentException ("CommitmentType
return ii.intValue(); return ii.intValue();
} }
public I_GL_Budget getI_GL_Budget() throws Exception public I_GL_Budget getGL_Budget() throws Exception
{ {
Class<?> clazz = MTable.getClass(I_GL_Budget.Table_Name); Class<?> clazz = MTable.getClass(I_GL_Budget.Table_Name);
I_GL_Budget result = null; I_GL_Budget result = null;
@ -258,10 +276,11 @@ if (CommitmentType == null) throw new IllegalArgumentException ("CommitmentType
*/ */
public void setHelp (String Help) public void setHelp (String Help)
{ {
if (Help != null && Help.length() > 2000) if (Help != null && Help.length() > 2000)
{ {
log.warning("Length > 2000 - truncated"); log.warning("Length > 2000 - truncated");
Help = Help.substring(0, 1999); Help = Help.substring(0, 2000);
} }
set_Value (COLUMNNAME_Help, Help); set_Value (COLUMNNAME_Help, Help);
} }
@ -306,10 +325,11 @@ if (CommitmentType == null) throw new IllegalArgumentException ("CommitmentType
{ {
if (Name == null) if (Name == null)
throw new IllegalArgumentException ("Name is mandatory."); throw new IllegalArgumentException ("Name is mandatory.");
if (Name.length() > 120) if (Name.length() > 120)
{ {
log.warning("Length > 120 - truncated"); log.warning("Length > 120 - truncated");
Name = Name.substring(0, 119); Name = Name.substring(0, 120);
} }
set_Value (COLUMNNAME_Name, Name); set_Value (COLUMNNAME_Name, Name);
} }

View File

@ -365,4 +365,5 @@
95,Commitment Accounting,,Memo,,,Yes,,,,,,,,,,,, 95,Commitment Accounting,,Memo,,,Yes,,,,,,,,,,,,
951,PO Encumbrance,,Memo,,,No,,95,,,,,,,,,, 951,PO Encumbrance,,Memo,,,No,,95,,,,,,,,,,
952,PO Commitment,,Memo,,,No,COMMITMENTOFFSET_ACCT,95,,,,,,,,,, 952,PO Commitment,,Memo,,,No,COMMITMENTOFFSET_ACCT,95,,,,,,,,,,
953,SO Commitment,,Memo,,,No,COMMITMENTOFFSETSALES_ACCT,95,,,,,,,,,,
955,SO Future Revenue,,Memo,,,No,,95,,,,,,,,,, 955,SO Future Revenue,,Memo,,,No,,95,,,,,,,,,,

Can't render this file because it has a wrong number of fields in line 193.

Binary file not shown.

View File

@ -0,0 +1,231 @@
-- Dec 1, 2007 1:51:24 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_REF_LIST SET NAME='PO Commitment & Reservation',Updated=TO_DATE('2007-12-01 01:51:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=785
/
-- Dec 1, 2007 1:51:24 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_REF_LIST_TRL SET NAME = 'Compromisos Compra y Reservas', IsTranslated='Y' WHERE AD_Ref_List_ID=785 AND AD_LANGUAGE LIKE 'es_%'
/
-- Dec 1, 2007 1:52:54 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_REF_LIST SET NAME='PO Commitment only',Updated=TO_DATE('2007-12-01 01:52:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=784
/
-- Dec 1, 2007 1:52:54 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_REF_LIST_TRL SET NAME = 'Solamente Compromiso Compras', IsTranslated='Y' WHERE AD_Ref_List_ID=784 AND AD_LANGUAGE LIKE 'es_%'
/
-- Dec 1, 2007 1:53:53 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO AD_REF_LIST (AD_Client_ID,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,NAME,Updated,UpdatedBy,VALUE) VALUES (0,0,53223,359,TO_DATE('2007-12-01 01:53:45','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','PO/SO Commitment & Reservation',TO_DATE('2007-12-01 01:53:45','YYYY-MM-DD HH24:MI:SS'),100,'A')
/
-- Dec 1, 2007 1:53:53 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO AD_REF_LIST_TRL (AD_LANGUAGE,AD_Ref_List_ID, Description,NAME, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_LANGUAGE,t.AD_Ref_List_ID, t.Description,t.NAME, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_LANGUAGE l, AD_REF_LIST t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53223 AND EXISTS (SELECT * FROM AD_REF_LIST_TRL tt WHERE tt.AD_LANGUAGE!=l.AD_LANGUAGE OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID)
/
-- Dec 1, 2007 1:52:54 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_REF_LIST_TRL SET NAME = 'Compromisos (ambos) y Reservas', IsTranslated='Y' WHERE AD_Ref_List_ID=53223 AND AD_LANGUAGE LIKE 'es_%'
/
-- Dec 1, 2007 1:54:46 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO AD_REF_LIST (AD_Client_ID,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,NAME,Updated,UpdatedBy,VALUE) VALUES (0,0,53224,359,TO_DATE('2007-12-01 01:54:31','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','SO Commitment only',TO_DATE('2007-12-01 01:54:31','YYYY-MM-DD HH24:MI:SS'),100,'S')
/
-- Dec 1, 2007 1:54:46 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO AD_REF_LIST_TRL (AD_LANGUAGE,AD_Ref_List_ID, Description,NAME, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_LANGUAGE,t.AD_Ref_List_ID, t.Description,t.NAME, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_LANGUAGE l, AD_REF_LIST t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53224 AND EXISTS (SELECT * FROM AD_REF_LIST_TRL tt WHERE tt.AD_LANGUAGE!=l.AD_LANGUAGE OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID)
/
-- Dec 1, 2007 1:52:54 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_REF_LIST_TRL SET NAME = 'Solamente Compromiso Ventas', IsTranslated='Y' WHERE AD_Ref_List_ID=53224 AND AD_LANGUAGE LIKE 'es_%'
/
-- Dec 1, 2007 1:55:44 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO AD_REF_LIST (AD_Client_ID,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,NAME,Updated,UpdatedBy,VALUE) VALUES (0,0,53225,359,TO_DATE('2007-12-01 01:55:35','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','PO/SO Commitment',TO_DATE('2007-12-01 01:55:35','YYYY-MM-DD HH24:MI:SS'),100,'O')
/
-- Dec 1, 2007 1:55:44 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO AD_REF_LIST_TRL (AD_LANGUAGE,AD_Ref_List_ID, Description,NAME, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_LANGUAGE,t.AD_Ref_List_ID, t.Description,t.NAME, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_LANGUAGE l, AD_REF_LIST t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53225 AND EXISTS (SELECT * FROM AD_REF_LIST_TRL tt WHERE tt.AD_LANGUAGE!=l.AD_LANGUAGE OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID)
/
-- Dec 1, 2007 1:52:54 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_REF_LIST_TRL SET NAME = 'Solamente Compromisos (ambos)', IsTranslated='Y' WHERE AD_Ref_List_ID=53225 AND AD_LANGUAGE LIKE 'es_%'
/
-- Dec 1, 2007 1:58:18 AM COT
-- FR 1814291 - Sales Commitment Offset
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,53228,0,'CommitmentOffsetSales_Acct',TO_DATE('2007-12-01 01:58:04','YYYY-MM-DD HH24:MI:SS'),100,'Budgetary Commitment Offset Account for Sales','D','The Commitment Offset Account is used for posting Commitments Sales and Reservations. It is usually an off-balance sheet and gain-and-loss account.','Y','Commitment Offset Sales','Commitment Offset Sales',TO_DATE('2007-12-01 01:58:04','YYYY-MM-DD HH24:MI:SS'),100)
/
-- Dec 1, 2007 1:58:18 AM COT
-- FR 1814291 - Sales Commitment Offset
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=53228 AND EXISTS (SELECT * FROM AD_ELEMENT_TRL tt WHERE tt.AD_LANGUAGE!=l.AD_LANGUAGE OR tt.AD_Element_ID!=t.AD_Element_ID)
/
-- Dec 1, 2007 1:59:04 AM COT
-- FR 1814291 - Sales Commitment Offset
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,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,NAME,Updated,UpdatedBy,VERSION) VALUES (0,53267,53228,0,25,266,'CommitmentOffsetSales_Acct',TO_DATE('2007-12-01 01:58:56','YYYY-MM-DD HH24:MI:SS'),100,'Budgetary Commitment Offset Account for Sales','D',10,'The Commitment Offset Account is used for posting Commitments Sales and Reservations. It is usually an off-balance sheet and gain-and-loss account.','Y','N','N','N','N','N','N','N','N','N','Y','Commitment Offset Sales',TO_DATE('2007-12-01 01:58:56','YYYY-MM-DD HH24:MI:SS'),100,0)
/
-- Dec 1, 2007 1:59:04 AM COT
-- FR 1814291 - Sales Commitment Offset
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=53267 AND EXISTS (SELECT * FROM AD_COLUMN_TRL tt WHERE tt.AD_LANGUAGE!=l.AD_LANGUAGE OR tt.AD_Column_ID!=t.AD_Column_ID)
/
-- Dec 1, 2007 1:59:26 AM COT
-- FR 1814291 - Sales Commitment Offset
ALTER TABLE C_ACCTSCHEMA_GL ADD CommitmentOffsetSales_Acct NUMBER(10)
/
-- FR 1814291 - Sales Commitment Offset
UPDATE C_ACCTSCHEMA_GL SET CommitmentOffsetSales_Acct = CommitmentOffset_Acct
/
-- Dec 1, 2007 2:00:11 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_COLUMN SET IsMandatory='Y',Updated=TO_DATE('2007-12-01 02:00:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=53267
/
-- Dec 1, 2007 2:00:11 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_FIELD SET NAME='Commitment Offset Sales', Description='Budgetary Commitment Offset Account for Sales', Help='The Commitment Offset Account is used for posting Commitments Sales and Reservations. It is usually an off-balance sheet and gain-and-loss account.' WHERE AD_Column_ID=53267 AND IsCentrallyMaintained='Y'
/
-- Dec 1, 2007 2:00:20 AM COT
-- FR 1814291 - Sales Commitment Offset
ALTER TABLE C_ACCTSCHEMA_GL MODIFY CommitmentOffsetSales_Acct NOT NULL
/
-- Dec 1, 2007 2:02:34 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_FIELD SET IsSameLine='N', SeqNo=160,Updated=TO_DATE('2007-12-01 02:02:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12375
/
-- Dec 1, 2007 2:03:04 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO AD_FIELD (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,NAME,SeqNo,Updated,UpdatedBy) VALUES (0,53267,53282,0,200,TO_DATE('2007-12-01 02:02:56','YYYY-MM-DD HH24:MI:SS'),100,'Budgetary Commitment Offset Account for Sales',10,'D','The Commitment Offset Account is used for posting Commitments Sales and Reservations. It is usually an off-balance sheet and gain-and-loss account.','Y','Y','Y','N','N','N','N','Y','Commitment Offset Sales',170,TO_DATE('2007-12-01 02:02:56','YYYY-MM-DD HH24:MI:SS'),100)
/
-- Dec 1, 2007 2:03:04 AM COT
-- FR 1814291 - Sales Commitment Offset
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=53282 AND EXISTS (SELECT * FROM AD_FIELD_TRL tt WHERE tt.AD_LANGUAGE!=l.AD_LANGUAGE OR tt.AD_Field_ID!=t.AD_Field_ID)
/
-- Dec 1, 2007 2:55:04 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO C_ELEMENTVALUE (AD_Client_ID,AD_Org_ID,AccountSign,AccountType,C_ElementValue_ID,C_Element_ID,Created,CreatedBy,IsActive,IsBankAccount,IsDocControlled,IsForeignCurrency,IsSummary,NAME,PostActual,PostBudget,PostEncumbrance,PostStatistical,Updated,UpdatedBy,VALUE) VALUES (11,0,'N','M',50000,105,TO_DATE('2007-12-01 02:55:03','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N','N','N','SO Commitment','Y','Y','Y','Y',TO_DATE('2007-12-01 02:55:03','YYYY-MM-DD HH24:MI:SS'),100,'953')
/
-- Dec 1, 2007 2:55:04 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO C_ELEMENTVALUE_TRL (AD_LANGUAGE,C_ElementValue_ID, Description,NAME, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_LANGUAGE,t.C_ElementValue_ID, t.Description,t.NAME, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_LANGUAGE l, C_ELEMENTVALUE t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_ElementValue_ID=50000 AND EXISTS (SELECT * FROM C_ELEMENTVALUE_TRL tt WHERE tt.AD_LANGUAGE!=l.AD_LANGUAGE OR tt.C_ElementValue_ID!=t.C_ElementValue_ID)
/
-- Dec 1, 2007 2:55:04 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO AD_TREENODE (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID,0, 'Y', SYSDATE, 0, SYSDATE, 0,t.AD_Tree_ID, 50000, 0, 999 FROM AD_TREE t WHERE t.AD_Client_ID=11 AND t.IsActive='Y' AND EXISTS (SELECT * FROM C_ELEMENT ae WHERE ae.C_Element_ID=105 AND t.AD_Tree_ID=ae.AD_Tree_ID) AND NOT EXISTS (SELECT * FROM AD_TREENODE e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=50000)
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=0, Updated=SYSDATE WHERE AD_Tree_ID=101 AND Node_ID=506
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=1, Updated=SYSDATE WHERE AD_Tree_ID=101 AND Node_ID=584
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=2, Updated=SYSDATE WHERE AD_Tree_ID=101 AND Node_ID=624
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=3, Updated=SYSDATE WHERE AD_Tree_ID=101 AND Node_ID=632
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=4, Updated=SYSDATE WHERE AD_Tree_ID=101 AND Node_ID=429
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=5, Updated=SYSDATE WHERE AD_Tree_ID=101 AND Node_ID=449
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=6, Updated=SYSDATE WHERE AD_Tree_ID=101 AND Node_ID=783
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=7, Updated=SYSDATE WHERE AD_Tree_ID=101 AND Node_ID=704
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=8, Updated=SYSDATE WHERE AD_Tree_ID=101 AND Node_ID=716
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=9, Updated=SYSDATE WHERE AD_Tree_ID=101 AND Node_ID=728
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=10, Updated=SYSDATE WHERE AD_Tree_ID=101 AND Node_ID=731
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=11, Updated=SYSDATE WHERE AD_Tree_ID=101 AND Node_ID=734
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=734, SeqNo=0, Updated=SYSDATE WHERE AD_Tree_ID=101 AND Node_ID=735
/
-- Dec 1, 2007 2:55:09 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=734, SeqNo=1, Updated=SYSDATE WHERE AD_Tree_ID=101 AND Node_ID=736
/
-- Dec 1, 2007 2:55:09 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=734, SeqNo=2, Updated=SYSDATE WHERE AD_Tree_ID=101 AND Node_ID=50000
/
-- Dec 1, 2007 2:55:09 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=734, SeqNo=3, Updated=SYSDATE WHERE AD_Tree_ID=101 AND Node_ID=737
/
-- Dec 1, 2007 2:55:54 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO C_VALIDCOMBINATION (AD_Client_ID,AD_Org_ID,Account_ID,C_AcctSchema_ID,C_ValidCombination_ID,Combination,Created,CreatedBy,Description,IsActive,IsFullyQualified,Updated,UpdatedBy) VALUES (11,11,50000,101,50000,'HQ-953-_-_-_-_',TO_DATE('2007-12-01 02:55:54','YYYY-MM-DD HH24:MI:SS'),100,'HQ-SO Commitment-_-_-_-_','Y','Y',TO_DATE('2007-12-01 02:55:54','YYYY-MM-DD HH24:MI:SS'),100)
/
-- Dec 1, 2007 2:56:01 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE C_ACCTSCHEMA_GL SET CommitmentOffsetSales_Acct=50000,Updated=TO_DATE('2007-12-01 02:56:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctSchema_ID=101
/
COMMIT
/

View File

@ -0,0 +1,228 @@
-- Dec 1, 2007 1:51:24 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_REF_LIST SET NAME='PO Commitment & Reservation',Updated=TO_TIMESTAMP('2007-12-01 01:51:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=785
/
-- Dec 1, 2007 1:51:24 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_REF_LIST_TRL SET NAME = 'Compromisos Compra y Reservas', IsTranslated='Y' WHERE AD_Ref_List_ID=785 AND AD_LANGUAGE LIKE 'es_%'
/
-- Dec 1, 2007 1:52:54 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_REF_LIST SET NAME='PO Commitment only',Updated=TO_TIMESTAMP('2007-12-01 01:52:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=784
/
-- Dec 1, 2007 1:52:54 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_REF_LIST_TRL SET NAME = 'Solamente Compromiso Compras', IsTranslated='Y' WHERE AD_Ref_List_ID=784 AND AD_LANGUAGE LIKE 'es_%'
/
-- Dec 1, 2007 1:53:53 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO AD_REF_LIST (AD_Client_ID,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,NAME,Updated,UpdatedBy,VALUE) VALUES (0,0,53223,359,TO_TIMESTAMP('2007-12-01 01:53:45','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','PO/SO Commitment & Reservation',TO_TIMESTAMP('2007-12-01 01:53:45','YYYY-MM-DD HH24:MI:SS'),100,'A')
/
-- Dec 1, 2007 1:53:53 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO AD_REF_LIST_TRL (AD_LANGUAGE,AD_Ref_List_ID, Description,NAME, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_LANGUAGE,t.AD_Ref_List_ID, t.Description,t.NAME, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_LANGUAGE l, AD_REF_LIST t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53223 AND EXISTS (SELECT * FROM AD_REF_LIST_TRL tt WHERE tt.AD_LANGUAGE!=l.AD_LANGUAGE OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID)
/
-- Dec 1, 2007 1:52:54 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_REF_LIST_TRL SET NAME = 'Compromisos (ambos) y Reservas', IsTranslated='Y' WHERE AD_Ref_List_ID=53223 AND AD_LANGUAGE LIKE 'es_%'
/
-- Dec 1, 2007 1:54:46 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO AD_REF_LIST (AD_Client_ID,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,NAME,Updated,UpdatedBy,VALUE) VALUES (0,0,53224,359,TO_TIMESTAMP('2007-12-01 01:54:31','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','SO Commitment only',TO_TIMESTAMP('2007-12-01 01:54:31','YYYY-MM-DD HH24:MI:SS'),100,'S')
/
-- Dec 1, 2007 1:54:46 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO AD_REF_LIST_TRL (AD_LANGUAGE,AD_Ref_List_ID, Description,NAME, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_LANGUAGE,t.AD_Ref_List_ID, t.Description,t.NAME, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_LANGUAGE l, AD_REF_LIST t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53224 AND EXISTS (SELECT * FROM AD_REF_LIST_TRL tt WHERE tt.AD_LANGUAGE!=l.AD_LANGUAGE OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID)
/
-- Dec 1, 2007 1:52:54 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_REF_LIST_TRL SET NAME = 'Solamente Compromiso Ventas', IsTranslated='Y' WHERE AD_Ref_List_ID=53224 AND AD_LANGUAGE LIKE 'es_%'
/
-- Dec 1, 2007 1:55:44 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO AD_REF_LIST (AD_Client_ID,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,NAME,Updated,UpdatedBy,VALUE) VALUES (0,0,53225,359,TO_TIMESTAMP('2007-12-01 01:55:35','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','PO/SO Commitment',TO_TIMESTAMP('2007-12-01 01:55:35','YYYY-MM-DD HH24:MI:SS'),100,'O')
/
-- Dec 1, 2007 1:55:44 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO AD_REF_LIST_TRL (AD_LANGUAGE,AD_Ref_List_ID, Description,NAME, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_LANGUAGE,t.AD_Ref_List_ID, t.Description,t.NAME, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_LANGUAGE l, AD_REF_LIST t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53225 AND EXISTS (SELECT * FROM AD_REF_LIST_TRL tt WHERE tt.AD_LANGUAGE!=l.AD_LANGUAGE OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID)
/
-- Dec 1, 2007 1:52:54 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_REF_LIST_TRL SET NAME = 'Solamente Compromisos (ambos)', IsTranslated='Y' WHERE AD_Ref_List_ID=53225 AND AD_LANGUAGE LIKE 'es_%'
/
-- Dec 1, 2007 1:58:18 AM COT
-- FR 1814291 - Sales Commitment Offset
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,53228,0,'CommitmentOffsetSales_Acct',TO_TIMESTAMP('2007-12-01 01:58:04','YYYY-MM-DD HH24:MI:SS'),100,'Budgetary Commitment Offset Account for Sales','D','The Commitment Offset Account is used for posting Commitments Sales and Reservations. It is usually an off-balance sheet and gain-and-loss account.','Y','Commitment Offset Sales','Commitment Offset Sales',TO_TIMESTAMP('2007-12-01 01:58:04','YYYY-MM-DD HH24:MI:SS'),100)
/
-- Dec 1, 2007 1:58:18 AM COT
-- FR 1814291 - Sales Commitment Offset
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=53228 AND EXISTS (SELECT * FROM AD_ELEMENT_TRL tt WHERE tt.AD_LANGUAGE!=l.AD_LANGUAGE OR tt.AD_Element_ID!=t.AD_Element_ID)
/
-- Dec 1, 2007 1:59:04 AM COT
-- FR 1814291 - Sales Commitment Offset
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,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,NAME,Updated,UpdatedBy,VERSION) VALUES (0,53267,53228,0,25,266,'CommitmentOffsetSales_Acct',TO_TIMESTAMP('2007-12-01 01:58:56','YYYY-MM-DD HH24:MI:SS'),100,'Budgetary Commitment Offset Account for Sales','D',10,'The Commitment Offset Account is used for posting Commitments Sales and Reservations. It is usually an off-balance sheet and gain-and-loss account.','Y','N','N','N','N','N','N','N','N','N','Y','Commitment Offset Sales',TO_TIMESTAMP('2007-12-01 01:58:56','YYYY-MM-DD HH24:MI:SS'),100,0)
/
-- Dec 1, 2007 1:59:04 AM COT
-- FR 1814291 - Sales Commitment Offset
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=53267 AND EXISTS (SELECT * FROM AD_COLUMN_TRL tt WHERE tt.AD_LANGUAGE!=l.AD_LANGUAGE OR tt.AD_Column_ID!=t.AD_Column_ID)
/
-- Dec 1, 2007 1:59:26 AM COT
-- FR 1814291 - Sales Commitment Offset
ALTER TABLE C_ACCTSCHEMA_GL ADD COLUMN CommitmentOffsetSales_Acct NUMERIC(10)
/
-- FR 1814291 - Sales Commitment Offset
UPDATE C_ACCTSCHEMA_GL SET CommitmentOffsetSales_Acct = CommitmentOffset_Acct
/
-- Dec 1, 2007 2:00:20 AM COT
-- FR 1814291 - Sales Commitment Offset
ALTER TABLE C_ACCTSCHEMA_GL ALTER COLUMN CommitmentOffsetSales_Acct SET NOT NULL
/
-- Dec 1, 2007 2:00:11 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_COLUMN SET IsMandatory='Y',Updated=TO_TIMESTAMP('2007-12-01 02:00:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=53267
/
-- Dec 1, 2007 2:00:11 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_FIELD SET NAME='Commitment Offset Sales', Description='Budgetary Commitment Offset Account for Sales', Help='The Commitment Offset Account is used for posting Commitments Sales and Reservations. It is usually an off-balance sheet and gain-and-loss account.' WHERE AD_Column_ID=53267 AND IsCentrallyMaintained='Y'
/
-- Dec 1, 2007 2:02:34 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_FIELD SET IsSameLine='N', SeqNo=160,Updated=TO_TIMESTAMP('2007-12-01 02:02:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12375
/
-- Dec 1, 2007 2:03:04 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO AD_FIELD (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,NAME,SeqNo,Updated,UpdatedBy) VALUES (0,53267,53282,0,200,TO_TIMESTAMP('2007-12-01 02:02:56','YYYY-MM-DD HH24:MI:SS'),100,'Budgetary Commitment Offset Account for Sales',10,'D','The Commitment Offset Account is used for posting Commitments Sales and Reservations. It is usually an off-balance sheet and gain-and-loss account.','Y','Y','Y','N','N','N','N','Y','Commitment Offset Sales',170,TO_TIMESTAMP('2007-12-01 02:02:56','YYYY-MM-DD HH24:MI:SS'),100)
/
-- Dec 1, 2007 2:03:04 AM COT
-- FR 1814291 - Sales Commitment Offset
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=53282 AND EXISTS (SELECT * FROM AD_FIELD_TRL tt WHERE tt.AD_LANGUAGE!=l.AD_LANGUAGE OR tt.AD_Field_ID!=t.AD_Field_ID)
/
-- Dec 1, 2007 2:55:04 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO C_ELEMENTVALUE (AD_Client_ID,AD_Org_ID,AccountSign,AccountType,C_ElementValue_ID,C_Element_ID,Created,CreatedBy,IsActive,IsBankAccount,IsDocControlled,IsForeignCurrency,IsSummary,NAME,PostActual,PostBudget,PostEncumbrance,PostStatistical,Updated,UpdatedBy,VALUE) VALUES (11,0,'N','M',50000,105,TO_TIMESTAMP('2007-12-01 02:55:03','YYYY-MM-DD HH24:MI:SS'),100,'Y','N','N','N','N','SO Commitment','Y','Y','Y','Y',TO_TIMESTAMP('2007-12-01 02:55:03','YYYY-MM-DD HH24:MI:SS'),100,'953')
/
-- Dec 1, 2007 2:55:04 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO C_ELEMENTVALUE_TRL (AD_LANGUAGE,C_ElementValue_ID, Description,NAME, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_LANGUAGE,t.C_ElementValue_ID, t.Description,t.NAME, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_LANGUAGE l, C_ELEMENTVALUE t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_ElementValue_ID=50000 AND EXISTS (SELECT * FROM C_ELEMENTVALUE_TRL tt WHERE tt.AD_LANGUAGE!=l.AD_LANGUAGE OR tt.C_ElementValue_ID!=t.C_ElementValue_ID)
/
-- Dec 1, 2007 2:55:04 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO AD_TREENODE (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID,0, 'Y', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0,t.AD_Tree_ID, 50000, 0, 999 FROM AD_TREE t WHERE t.AD_Client_ID=11 AND t.IsActive='Y' AND EXISTS (SELECT * FROM C_ELEMENT ae WHERE ae.C_Element_ID=105 AND t.AD_Tree_ID=ae.AD_Tree_ID) AND NOT EXISTS (SELECT * FROM AD_TREENODE e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=50000)
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=506
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=584
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=624
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=632
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=429
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=449
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=6, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=783
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=7, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=704
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=8, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=716
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=9, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=728
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=10, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=731
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=0, SeqNo=11, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=734
/
-- Dec 1, 2007 2:55:08 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=734, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=735
/
-- Dec 1, 2007 2:55:09 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=734, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=736
/
-- Dec 1, 2007 2:55:09 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=734, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=50000
/
-- Dec 1, 2007 2:55:09 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE AD_TREENODE SET Parent_ID=734, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=737
/
-- Dec 1, 2007 2:55:54 AM COT
-- FR 1814291 - Sales Commitment Offset
INSERT INTO C_VALIDCOMBINATION (AD_Client_ID,AD_Org_ID,Account_ID,C_AcctSchema_ID,C_ValidCombination_ID,Combination,Created,CreatedBy,Description,IsActive,IsFullyQualified,Updated,UpdatedBy) VALUES (11,11,50000,101,50000,'HQ-953-_-_-_-_',TO_TIMESTAMP('2007-12-01 02:55:54','YYYY-MM-DD HH24:MI:SS'),100,'HQ-SO Commitment-_-_-_-_','Y','Y',TO_TIMESTAMP('2007-12-01 02:55:54','YYYY-MM-DD HH24:MI:SS'),100)
/
-- Dec 1, 2007 2:56:01 AM COT
-- FR 1814291 - Sales Commitment Offset
UPDATE C_ACCTSCHEMA_GL SET CommitmentOffsetSales_Acct=50000,Updated=TO_TIMESTAMP('2007-12-01 02:56:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctSchema_ID=101
/