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

@ -5,21 +5,21 @@
* Copyright (C) Trifon Trifonov. * * Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors * * Copyright (C) Contributors *
* * * *
* This program is free software; * This program is free software;
you can redistribute it and/or * you can redistribute it and/or *
* modify it under the terms of the GNU General Public License * * modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; * as published by the Free Software Foundation;
either version 2 * either version 2 *
* of the License, or (at your option) any later version. * * of the License, or (at your option) any later version. *
* * * *
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; * but WITHOUT ANY WARRANTY;
without even the implied warranty of * without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; * along with this program;
if not, write to the Free Software * if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. * * MA 02110-1301, USA. *
@ -30,178 +30,189 @@
* Sponsors: * * Sponsors: *
* - Company (http://www.site.com) * * - Company (http://www.site.com) *
**********************************************************************/ **********************************************************************/
package org.compiere.model; package org.compiere.model;
import java.util.*;
import java.sql.Timestamp;
import java.math.*;
import org.compiere.util.*;
/** Generated Interface for C_AcctSchema_GL import java.math.BigDecimal;
* @author Trifon Trifonov (generated) import org.compiere.util.KeyNamePair;
* @version Release 3.3.0 - 2007-08-24 11:39:36.64
*/ /** Generated Interface for C_AcctSchema_GL
public interface I_C_AcctSchema_GL * @author Trifon Trifonov (generated)
{ * @version Release 3.3.0
*/
public interface I_C_AcctSchema_GL
{
/** TableName=C_AcctSchema_GL */ /** TableName=C_AcctSchema_GL */
public static final String Table_Name = "C_AcctSchema_GL"; public static final String Table_Name = "C_AcctSchema_GL";
/** AD_Table_ID=266 */ /** AD_Table_ID=266 */
public static final int Table_ID = MTable.getTable_ID(Table_Name); public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 2 - Client /** AccessLevel = 2 - Client
*/ */
BigDecimal accessLevel = new BigDecimal(2); BigDecimal accessLevel = BigDecimal.valueOf(2);
/** Load Meta Data */ /** Load Meta Data */
/** Column name C_AcctSchema_ID */ /** Column name C_AcctSchema_ID */
public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID"; public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID";
/** Set Accounting Schema. /** Set Accounting Schema.
* Rules for accounting * Rules for accounting
*/ */
public void setC_AcctSchema_ID (int C_AcctSchema_ID); public void setC_AcctSchema_ID (int C_AcctSchema_ID);
/** Get Accounting Schema. /** Get Accounting Schema.
* Rules for accounting * Rules for accounting
*/ */
public int getC_AcctSchema_ID(); public int getC_AcctSchema_ID();
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";
/** Set Commitment Offset. /** Set Commitment Offset.
* Budgetary Commitment Offset Account * Budgetary Commitment Offset Account
*/ */
public void setCommitmentOffset_Acct (int CommitmentOffset_Acct); public void setCommitmentOffset_Acct (int CommitmentOffset_Acct);
/** Get Commitment Offset. /** Get Commitment Offset.
* Budgetary Commitment Offset Account * Budgetary Commitment Offset Account
*/ */
public int getCommitmentOffset_Acct(); public int getCommitmentOffset_Acct();
/** Column name CurrencyBalancing_Acct */ /** Column name CurrencyBalancing_Acct */
public static final String COLUMNNAME_CurrencyBalancing_Acct = "CurrencyBalancing_Acct"; public static final String COLUMNNAME_CurrencyBalancing_Acct = "CurrencyBalancing_Acct";
/** Set Currency Balancing Acct. /** Set Currency Balancing Acct.
* Account used when a currency is out of balance * Account used when a currency is out of balance
*/ */
public void setCurrencyBalancing_Acct (int CurrencyBalancing_Acct); public void setCurrencyBalancing_Acct (int CurrencyBalancing_Acct);
/** Get Currency Balancing Acct. /** Get Currency Balancing Acct.
* Account used when a currency is out of balance * Account used when a currency is out of balance
*/ */
public int getCurrencyBalancing_Acct(); public int getCurrencyBalancing_Acct();
/** Column name IncomeSummary_Acct */ /** Column name IncomeSummary_Acct */
public static final String COLUMNNAME_IncomeSummary_Acct = "IncomeSummary_Acct"; public static final String COLUMNNAME_IncomeSummary_Acct = "IncomeSummary_Acct";
/** Set Income Summary Acct. /** Set Income Summary Acct.
* Income Summary Account * Income Summary Account
*/ */
public void setIncomeSummary_Acct (int IncomeSummary_Acct); public void setIncomeSummary_Acct (int IncomeSummary_Acct);
/** Get Income Summary Acct. /** Get Income Summary Acct.
* Income Summary Account * Income Summary Account
*/ */
public int getIncomeSummary_Acct(); public int getIncomeSummary_Acct();
/** Column name IntercompanyDueFrom_Acct */ /** Column name IntercompanyDueFrom_Acct */
public static final String COLUMNNAME_IntercompanyDueFrom_Acct = "IntercompanyDueFrom_Acct"; public static final String COLUMNNAME_IntercompanyDueFrom_Acct = "IntercompanyDueFrom_Acct";
/** Set Intercompany Due From Acct. /** Set Intercompany Due From Acct.
* Intercompany Due From / Receivables Account * Intercompany Due From / Receivables Account
*/ */
public void setIntercompanyDueFrom_Acct (int IntercompanyDueFrom_Acct); public void setIntercompanyDueFrom_Acct (int IntercompanyDueFrom_Acct);
/** Get Intercompany Due From Acct. /** Get Intercompany Due From Acct.
* Intercompany Due From / Receivables Account * Intercompany Due From / Receivables Account
*/ */
public int getIntercompanyDueFrom_Acct(); public int getIntercompanyDueFrom_Acct();
/** Column name IntercompanyDueTo_Acct */ /** Column name IntercompanyDueTo_Acct */
public static final String COLUMNNAME_IntercompanyDueTo_Acct = "IntercompanyDueTo_Acct"; public static final String COLUMNNAME_IntercompanyDueTo_Acct = "IntercompanyDueTo_Acct";
/** Set Intercompany Due To Acct. /** Set Intercompany Due To Acct.
* Intercompany Due To / Payable Account * Intercompany Due To / Payable Account
*/ */
public void setIntercompanyDueTo_Acct (int IntercompanyDueTo_Acct); public void setIntercompanyDueTo_Acct (int IntercompanyDueTo_Acct);
/** Get Intercompany Due To Acct. /** Get Intercompany Due To Acct.
* Intercompany Due To / Payable Account * Intercompany Due To / Payable Account
*/ */
public int getIntercompanyDueTo_Acct(); public int getIntercompanyDueTo_Acct();
/** Column name PPVOffset_Acct */ /** Column name PPVOffset_Acct */
public static final String COLUMNNAME_PPVOffset_Acct = "PPVOffset_Acct"; public static final String COLUMNNAME_PPVOffset_Acct = "PPVOffset_Acct";
/** Set PPV Offset. /** Set PPV Offset.
* Purchase Price Variance Offset Account * Purchase Price Variance Offset Account
*/ */
public void setPPVOffset_Acct (int PPVOffset_Acct); public void setPPVOffset_Acct (int PPVOffset_Acct);
/** Get PPV Offset. /** Get PPV Offset.
* Purchase Price Variance Offset Account * Purchase Price Variance Offset Account
*/ */
public int getPPVOffset_Acct(); public int getPPVOffset_Acct();
/** Column name RetainedEarning_Acct */ /** Column name RetainedEarning_Acct */
public static final String COLUMNNAME_RetainedEarning_Acct = "RetainedEarning_Acct"; public static final String COLUMNNAME_RetainedEarning_Acct = "RetainedEarning_Acct";
/** Set Retained Earning Acct */ /** Set Retained Earning Acct */
public void setRetainedEarning_Acct (int RetainedEarning_Acct); public void setRetainedEarning_Acct (int RetainedEarning_Acct);
/** Get Retained Earning Acct */ /** Get Retained Earning Acct */
public int getRetainedEarning_Acct(); public int getRetainedEarning_Acct();
/** Column name SuspenseBalancing_Acct */ /** Column name SuspenseBalancing_Acct */
public static final String COLUMNNAME_SuspenseBalancing_Acct = "SuspenseBalancing_Acct"; public static final String COLUMNNAME_SuspenseBalancing_Acct = "SuspenseBalancing_Acct";
/** Set Suspense Balancing Acct */ /** Set Suspense Balancing Acct */
public void setSuspenseBalancing_Acct (int SuspenseBalancing_Acct); public void setSuspenseBalancing_Acct (int SuspenseBalancing_Acct);
/** Get Suspense Balancing Acct */ /** Get Suspense Balancing Acct */
public int getSuspenseBalancing_Acct(); public int getSuspenseBalancing_Acct();
/** Column name SuspenseError_Acct */ /** Column name SuspenseError_Acct */
public static final String COLUMNNAME_SuspenseError_Acct = "SuspenseError_Acct"; public static final String COLUMNNAME_SuspenseError_Acct = "SuspenseError_Acct";
/** Set Suspense Error Acct */ /** Set Suspense Error Acct */
public void setSuspenseError_Acct (int SuspenseError_Acct); public void setSuspenseError_Acct (int SuspenseError_Acct);
/** Get Suspense Error Acct */ /** Get Suspense Error Acct */
public int getSuspenseError_Acct(); public int getSuspenseError_Acct();
/** Column name UseCurrencyBalancing */ /** Column name UseCurrencyBalancing */
public static final String COLUMNNAME_UseCurrencyBalancing = "UseCurrencyBalancing"; public static final String COLUMNNAME_UseCurrencyBalancing = "UseCurrencyBalancing";
/** Set Use Currency Balancing */ /** Set Use Currency Balancing */
public void setUseCurrencyBalancing (boolean UseCurrencyBalancing); public void setUseCurrencyBalancing (boolean UseCurrencyBalancing);
/** Get Use Currency Balancing */ /** Get Use Currency Balancing */
public boolean isUseCurrencyBalancing(); public boolean isUseCurrencyBalancing();
/** Column name UseSuspenseBalancing */ /** Column name UseSuspenseBalancing */
public static final String COLUMNNAME_UseSuspenseBalancing = "UseSuspenseBalancing"; public static final String COLUMNNAME_UseSuspenseBalancing = "UseSuspenseBalancing";
/** Set Use Suspense Balancing */ /** Set Use Suspense Balancing */
public void setUseSuspenseBalancing (boolean UseSuspenseBalancing); public void setUseSuspenseBalancing (boolean UseSuspenseBalancing);
/** Get Use Suspense Balancing */ /** Get Use Suspense Balancing */
public boolean isUseSuspenseBalancing(); public boolean isUseSuspenseBalancing();
/** Column name UseSuspenseError */ /** Column name UseSuspenseError */
public static final String COLUMNNAME_UseSuspenseError = "UseSuspenseError"; public static final String COLUMNNAME_UseSuspenseError = "UseSuspenseError";
/** Set Use Suspense Error */ /** Set Use Suspense Error */
public void setUseSuspenseError (boolean UseSuspenseError); public void setUseSuspenseError (boolean UseSuspenseError);
/** Get Use Suspense Error */ /** Get Use Suspense Error */
public boolean isUseSuspenseError(); public boolean isUseSuspenseError();
} }

View File

@ -5,21 +5,21 @@
* Copyright (C) Trifon Trifonov. * * Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors * * Copyright (C) Contributors *
* * * *
* This program is free software; * This program is free software;
you can redistribute it and/or * you can redistribute it and/or *
* modify it under the terms of the GNU General Public License * * modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; * as published by the Free Software Foundation;
either version 2 * either version 2 *
* of the License, or (at your option) any later version. * * of the License, or (at your option) any later version. *
* * * *
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; * but WITHOUT ANY WARRANTY;
without even the implied warranty of * without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; * along with this program;
if not, write to the Free Software * if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. * * MA 02110-1301, USA. *
@ -30,152 +30,150 @@
* Sponsors: * * Sponsors: *
* - Company (http://www.site.com) * * - Company (http://www.site.com) *
**********************************************************************/ **********************************************************************/
package org.compiere.model; package org.compiere.model;
import java.util.*;
import java.sql.Timestamp;
import java.math.*;
import org.compiere.util.*;
/** Generated Interface for GL_BudgetControl import java.math.BigDecimal;
* @author Trifon Trifonov (generated) import org.compiere.util.KeyNamePair;
* @version Release 3.3.0 - 2007-08-24 11:39:47.187
*/ /** Generated Interface for GL_BudgetControl
public interface I_GL_BudgetControl * @author Trifon Trifonov (generated)
{ * @version Release 3.3.0
*/
public interface I_GL_BudgetControl
{
/** TableName=GL_BudgetControl */ /** TableName=GL_BudgetControl */
public static final String Table_Name = "GL_BudgetControl"; public static final String Table_Name = "GL_BudgetControl";
/** AD_Table_ID=822 */ /** AD_Table_ID=822 */
public static final int Table_ID = MTable.getTable_ID(Table_Name); public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 2 - Client /** AccessLevel = 2 - Client
*/ */
BigDecimal accessLevel = new BigDecimal(2); BigDecimal accessLevel = BigDecimal.valueOf(2);
/** Load Meta Data */ /** Load Meta Data */
/** Column name BudgetControlScope */ /** Column name BudgetControlScope */
public static final String COLUMNNAME_BudgetControlScope = "BudgetControlScope"; public static final String COLUMNNAME_BudgetControlScope = "BudgetControlScope";
/** Set Control Scope. /** Set Control Scope.
* Scope of the Budget Control * Scope of the Budget Control
*/ */
public void setBudgetControlScope (String BudgetControlScope); public void setBudgetControlScope (String BudgetControlScope);
/** Get Control Scope. /** Get Control Scope.
* Scope of the Budget Control * Scope of the Budget Control
*/ */
public String getBudgetControlScope(); public String getBudgetControlScope();
/** Column name C_AcctSchema_ID */ /** Column name C_AcctSchema_ID */
public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID"; public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID";
/** Set Accounting Schema. /** Set Accounting Schema.
* Rules for accounting * Rules for accounting
*/ */
public void setC_AcctSchema_ID (int C_AcctSchema_ID); public void setC_AcctSchema_ID (int C_AcctSchema_ID);
/** Get Accounting Schema. /** Get Accounting Schema.
* Rules for accounting * Rules for accounting
*/ */
public int getC_AcctSchema_ID(); public int getC_AcctSchema_ID();
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";
/** Set Commitment Type. /** Set Commitment Type.
* Create Commitment and/or Reservations for Budget Control * Create Commitment and/or Reservations for Budget Control
*/ */
public void setCommitmentType (String CommitmentType); public void setCommitmentType (String CommitmentType);
/** Get Commitment Type. /** Get Commitment Type.
* Create Commitment and/or Reservations for Budget Control * Create Commitment and/or Reservations for Budget Control
*/ */
public String getCommitmentType(); public String getCommitmentType();
/** Column name Description */ /** Column name Description */
public static final String COLUMNNAME_Description = "Description"; public static final String COLUMNNAME_Description = "Description";
/** Set Description. /** Set Description.
* Optional short description of the record * Optional short description of the record
*/ */
public void setDescription (String Description); public void setDescription (String Description);
/** Get Description. /** Get Description.
* Optional short description of the record * Optional short description of the record
*/ */
public String getDescription(); public String getDescription();
/** Column name GL_BudgetControl_ID */ /** Column name GL_BudgetControl_ID */
public static final String COLUMNNAME_GL_BudgetControl_ID = "GL_BudgetControl_ID"; public static final String COLUMNNAME_GL_BudgetControl_ID = "GL_BudgetControl_ID";
/** Set Budget Control. /** Set Budget Control.
* Budget Control * Budget Control
*/ */
public void setGL_BudgetControl_ID (int GL_BudgetControl_ID); public void setGL_BudgetControl_ID (int GL_BudgetControl_ID);
/** Get Budget Control. /** Get Budget Control.
* Budget Control * Budget Control
*/ */
public int getGL_BudgetControl_ID(); public int getGL_BudgetControl_ID();
/** Column name GL_Budget_ID */ /** Column name GL_Budget_ID */
public static final String COLUMNNAME_GL_Budget_ID = "GL_Budget_ID"; public static final String COLUMNNAME_GL_Budget_ID = "GL_Budget_ID";
/** Set Budget. /** Set Budget.
* General Ledger Budget * General Ledger Budget
*/ */
public void setGL_Budget_ID (int GL_Budget_ID); public void setGL_Budget_ID (int GL_Budget_ID);
/** Get Budget. /** Get Budget.
* General Ledger Budget * General Ledger Budget
*/ */
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";
/** Set Comment/Help. /** Set Comment/Help.
* Comment or Hint * Comment or Hint
*/ */
public void setHelp (String Help); public void setHelp (String Help);
/** Get Comment/Help. /** Get Comment/Help.
* Comment or Hint * Comment or Hint
*/ */
public String getHelp(); public String getHelp();
/** Column name IsBeforeApproval */ /** Column name IsBeforeApproval */
public static final String COLUMNNAME_IsBeforeApproval = "IsBeforeApproval"; public static final String COLUMNNAME_IsBeforeApproval = "IsBeforeApproval";
/** Set Before Approval. /** Set Before Approval.
* The Check is before the (manual) approval * The Check is before the (manual) approval
*/ */
public void setIsBeforeApproval (boolean IsBeforeApproval); public void setIsBeforeApproval (boolean IsBeforeApproval);
/** Get Before Approval. /** Get Before Approval.
* The Check is before the (manual) approval * The Check is before the (manual) approval
*/ */
public boolean isBeforeApproval(); public boolean isBeforeApproval();
/** Column name Name */ /** Column name Name */
public static final String COLUMNNAME_Name = "Name"; public static final String COLUMNNAME_Name = "Name";
/** Set Name. /** Set Name.
* Alphanumeric identifier of the entity * Alphanumeric identifier of the entity
*/ */
public void setName (String Name); public void setName (String Name);
/** Get Name. /** Get Name.
* Alphanumeric identifier of the entity * Alphanumeric identifier of the entity
*/ */
public String getName(); public String getName();
} }

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

@ -14,349 +14,371 @@
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html * * or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/ *****************************************************************************/
/** Generated Model - DO NOT CHANGE */ /** Generated Model - DO NOT CHANGE */
package org.compiere.model; package org.compiere.model;
import java.util.*; import java.lang.reflect.Constructor;
import java.sql.*; import java.sql.ResultSet;
import java.math.*; import java.util.Properties;
import java.lang.reflect.Constructor; import java.util.logging.Level;
import java.util.logging.Level; import org.compiere.util.KeyNamePair;
import org.compiere.util.*;
/** Generated Model for C_AcctSchema_GL
/** Generated Model for C_AcctSchema_GL * @author Adempiere (generated)
* @author Adempiere (generated) * @version Release 3.3.0 - $Id$ */
* @version Release 3.3.0 - $Id$ */ public class X_C_AcctSchema_GL extends PO implements I_C_AcctSchema_GL, I_Persistent
public class X_C_AcctSchema_GL extends PO implements I_C_AcctSchema_GL, I_Persistent {
{
/**
/** *
* */
*/ private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
/** Standard Constructor */
/** Standard Constructor */ 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)
/** if (C_AcctSchema_GL_ID == 0) { setC_AcctSchema_ID (0); {
setCommitmentOffset_Acct (0); setC_AcctSchema_ID (0);
setIncomeSummary_Acct (0); setCommitmentOffsetSales_Acct (0);
setIntercompanyDueFrom_Acct (0); setCommitmentOffset_Acct (0);
setIntercompanyDueTo_Acct (0); setIncomeSummary_Acct (0);
setPPVOffset_Acct (0); setIntercompanyDueFrom_Acct (0);
setRetainedEarning_Acct (0); setIntercompanyDueTo_Acct (0);
setUseCurrencyBalancing (false); setPPVOffset_Acct (0);
setUseSuspenseBalancing (false); setRetainedEarning_Acct (0);
setUseSuspenseError (false); setUseCurrencyBalancing (false);
} */ setUseSuspenseBalancing (false);
} setUseSuspenseError (false);
} */
/** Load Constructor */ }
public X_C_AcctSchema_GL (Properties ctx, ResultSet rs, String trxName)
{ /** Load Constructor */
super (ctx, rs, trxName); public X_C_AcctSchema_GL (Properties ctx, ResultSet rs, String trxName)
} {
super (ctx, rs, trxName);
/** AccessLevel }
* @return 2 - Client
*/ /** AccessLevel
protected int get_AccessLevel() * @return 2 - Client
{ */
return accessLevel.intValue(); protected int get_AccessLevel()
} {
return accessLevel.intValue();
/** Load Meta Data */ }
protected POInfo initPO (Properties ctx)
{ /** Load Meta Data */
POInfo poi = POInfo.getPOInfo (ctx, Table_ID); protected POInfo initPO (Properties ctx)
return poi; {
} POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
return poi;
public String toString() }
{
StringBuffer sb = new StringBuffer ("X_C_AcctSchema_GL[") public String toString()
.append(get_ID()).append("]"); {
return sb.toString(); StringBuffer sb = new StringBuffer ("X_C_AcctSchema_GL[")
} .append(get_ID()).append("]");
return sb.toString();
public I_C_AcctSchema getI_C_AcctSchema() throws Exception }
{
Class<?> clazz = MTable.getClass(I_C_AcctSchema.Table_Name); public I_C_AcctSchema getC_AcctSchema() throws Exception
I_C_AcctSchema result = null; {
try { Class<?> clazz = MTable.getClass(I_C_AcctSchema.Table_Name);
Constructor<?> constructor = null; I_C_AcctSchema result = null;
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); try {
result = (I_C_AcctSchema)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_AcctSchema_ID()), get_TrxName()}); Constructor<?> constructor = null;
} catch (Exception e) { constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); result = (I_C_AcctSchema)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_AcctSchema_ID()), get_TrxName()});
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); } catch (Exception e) {
throw e; log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
} log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
return result; throw e;
} }
return result;
/** Set Accounting Schema. }
@param C_AcctSchema_ID
Rules for accounting /** Set Accounting Schema.
*/ @param C_AcctSchema_ID
public void setC_AcctSchema_ID (int C_AcctSchema_ID) Rules for accounting
{ */
if (C_AcctSchema_ID < 1) public void setC_AcctSchema_ID (int C_AcctSchema_ID)
throw new IllegalArgumentException ("C_AcctSchema_ID is mandatory."); {
set_ValueNoCheck (COLUMNNAME_C_AcctSchema_ID, Integer.valueOf(C_AcctSchema_ID)); if (C_AcctSchema_ID < 1)
} throw new IllegalArgumentException ("C_AcctSchema_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_C_AcctSchema_ID, Integer.valueOf(C_AcctSchema_ID));
/** Get Accounting Schema. }
@return Rules for accounting
*/ /** Get Accounting Schema.
public int getC_AcctSchema_ID () @return Rules for accounting
{ */
Integer ii = (Integer)get_Value(COLUMNNAME_C_AcctSchema_ID); public int getC_AcctSchema_ID ()
if (ii == null) {
return 0; Integer ii = (Integer)get_Value(COLUMNNAME_C_AcctSchema_ID);
return ii.intValue(); if (ii == null)
} return 0;
return ii.intValue();
/** Get Record ID/ColumnName }
@return ID/ColumnName pair
*/ /** Get Record ID/ColumnName
public KeyNamePair getKeyNamePair() @return ID/ColumnName pair
{ */
return new KeyNamePair(get_ID(), String.valueOf(getC_AcctSchema_ID())); public KeyNamePair getKeyNamePair()
} {
return new KeyNamePair(get_ID(), String.valueOf(getC_AcctSchema_ID()));
/** Set Commitment Offset. }
@param CommitmentOffset_Acct
Budgetary Commitment Offset Account /** Set Commitment Offset Sales.
*/ @param CommitmentOffsetSales_Acct
public void setCommitmentOffset_Acct (int CommitmentOffset_Acct) Budgetary Commitment Offset Account for Sales
{ */
set_Value (COLUMNNAME_CommitmentOffset_Acct, Integer.valueOf(CommitmentOffset_Acct)); public void setCommitmentOffsetSales_Acct (int CommitmentOffsetSales_Acct)
} {
set_Value (COLUMNNAME_CommitmentOffsetSales_Acct, Integer.valueOf(CommitmentOffsetSales_Acct));
/** Get Commitment Offset. }
@return Budgetary Commitment Offset Account
*/ /** Get Commitment Offset Sales.
public int getCommitmentOffset_Acct () @return Budgetary Commitment Offset Account for Sales
{ */
Integer ii = (Integer)get_Value(COLUMNNAME_CommitmentOffset_Acct); public int getCommitmentOffsetSales_Acct ()
if (ii == null) {
return 0; Integer ii = (Integer)get_Value(COLUMNNAME_CommitmentOffsetSales_Acct);
return ii.intValue(); if (ii == null)
} return 0;
return ii.intValue();
/** Set Currency Balancing Acct. }
@param CurrencyBalancing_Acct
Account used when a currency is out of balance /** Set Commitment Offset.
*/ @param CommitmentOffset_Acct
public void setCurrencyBalancing_Acct (int CurrencyBalancing_Acct) Budgetary Commitment Offset Account
{ */
set_Value (COLUMNNAME_CurrencyBalancing_Acct, Integer.valueOf(CurrencyBalancing_Acct)); public void setCommitmentOffset_Acct (int CommitmentOffset_Acct)
} {
set_Value (COLUMNNAME_CommitmentOffset_Acct, Integer.valueOf(CommitmentOffset_Acct));
/** Get Currency Balancing Acct. }
@return Account used when a currency is out of balance
*/ /** Get Commitment Offset.
public int getCurrencyBalancing_Acct () @return Budgetary Commitment Offset Account
{ */
Integer ii = (Integer)get_Value(COLUMNNAME_CurrencyBalancing_Acct); public int getCommitmentOffset_Acct ()
if (ii == null) {
return 0; Integer ii = (Integer)get_Value(COLUMNNAME_CommitmentOffset_Acct);
return ii.intValue(); if (ii == null)
} return 0;
return ii.intValue();
/** Set Income Summary Acct. }
@param IncomeSummary_Acct
Income Summary Account /** Set Currency Balancing Acct.
*/ @param CurrencyBalancing_Acct
public void setIncomeSummary_Acct (int IncomeSummary_Acct) Account used when a currency is out of balance
{ */
set_Value (COLUMNNAME_IncomeSummary_Acct, Integer.valueOf(IncomeSummary_Acct)); public void setCurrencyBalancing_Acct (int CurrencyBalancing_Acct)
} {
set_Value (COLUMNNAME_CurrencyBalancing_Acct, Integer.valueOf(CurrencyBalancing_Acct));
/** Get Income Summary Acct. }
@return Income Summary Account
*/ /** Get Currency Balancing Acct.
public int getIncomeSummary_Acct () @return Account used when a currency is out of balance
{ */
Integer ii = (Integer)get_Value(COLUMNNAME_IncomeSummary_Acct); public int getCurrencyBalancing_Acct ()
if (ii == null) {
return 0; Integer ii = (Integer)get_Value(COLUMNNAME_CurrencyBalancing_Acct);
return ii.intValue(); if (ii == null)
} return 0;
return ii.intValue();
/** Set Intercompany Due From Acct. }
@param IntercompanyDueFrom_Acct
Intercompany Due From / Receivables Account /** Set Income Summary Acct.
*/ @param IncomeSummary_Acct
public void setIntercompanyDueFrom_Acct (int IntercompanyDueFrom_Acct) Income Summary Account
{ */
set_Value (COLUMNNAME_IntercompanyDueFrom_Acct, Integer.valueOf(IntercompanyDueFrom_Acct)); public void setIncomeSummary_Acct (int IncomeSummary_Acct)
} {
set_Value (COLUMNNAME_IncomeSummary_Acct, Integer.valueOf(IncomeSummary_Acct));
/** Get Intercompany Due From Acct. }
@return Intercompany Due From / Receivables Account
*/ /** Get Income Summary Acct.
public int getIntercompanyDueFrom_Acct () @return Income Summary Account
{ */
Integer ii = (Integer)get_Value(COLUMNNAME_IntercompanyDueFrom_Acct); public int getIncomeSummary_Acct ()
if (ii == null) {
return 0; Integer ii = (Integer)get_Value(COLUMNNAME_IncomeSummary_Acct);
return ii.intValue(); if (ii == null)
} return 0;
return ii.intValue();
/** Set Intercompany Due To Acct. }
@param IntercompanyDueTo_Acct
Intercompany Due To / Payable Account /** Set Intercompany Due From Acct.
*/ @param IntercompanyDueFrom_Acct
public void setIntercompanyDueTo_Acct (int IntercompanyDueTo_Acct) Intercompany Due From / Receivables Account
{ */
set_Value (COLUMNNAME_IntercompanyDueTo_Acct, Integer.valueOf(IntercompanyDueTo_Acct)); public void setIntercompanyDueFrom_Acct (int IntercompanyDueFrom_Acct)
} {
set_Value (COLUMNNAME_IntercompanyDueFrom_Acct, Integer.valueOf(IntercompanyDueFrom_Acct));
/** Get Intercompany Due To Acct. }
@return Intercompany Due To / Payable Account
*/ /** Get Intercompany Due From Acct.
public int getIntercompanyDueTo_Acct () @return Intercompany Due From / Receivables Account
{ */
Integer ii = (Integer)get_Value(COLUMNNAME_IntercompanyDueTo_Acct); public int getIntercompanyDueFrom_Acct ()
if (ii == null) {
return 0; Integer ii = (Integer)get_Value(COLUMNNAME_IntercompanyDueFrom_Acct);
return ii.intValue(); if (ii == null)
} return 0;
return ii.intValue();
/** Set PPV Offset. }
@param PPVOffset_Acct
Purchase Price Variance Offset Account /** Set Intercompany Due To Acct.
*/ @param IntercompanyDueTo_Acct
public void setPPVOffset_Acct (int PPVOffset_Acct) Intercompany Due To / Payable Account
{ */
set_Value (COLUMNNAME_PPVOffset_Acct, Integer.valueOf(PPVOffset_Acct)); public void setIntercompanyDueTo_Acct (int IntercompanyDueTo_Acct)
} {
set_Value (COLUMNNAME_IntercompanyDueTo_Acct, Integer.valueOf(IntercompanyDueTo_Acct));
/** Get PPV Offset. }
@return Purchase Price Variance Offset Account
*/ /** Get Intercompany Due To Acct.
public int getPPVOffset_Acct () @return Intercompany Due To / Payable Account
{ */
Integer ii = (Integer)get_Value(COLUMNNAME_PPVOffset_Acct); public int getIntercompanyDueTo_Acct ()
if (ii == null) {
return 0; Integer ii = (Integer)get_Value(COLUMNNAME_IntercompanyDueTo_Acct);
return ii.intValue(); if (ii == null)
} return 0;
return ii.intValue();
/** Set Retained Earning Acct. }
@param RetainedEarning_Acct Retained Earning Acct */
public void setRetainedEarning_Acct (int RetainedEarning_Acct) /** Set PPV Offset.
{ @param PPVOffset_Acct
set_Value (COLUMNNAME_RetainedEarning_Acct, Integer.valueOf(RetainedEarning_Acct)); Purchase Price Variance Offset Account
} */
public void setPPVOffset_Acct (int PPVOffset_Acct)
{
set_Value (COLUMNNAME_PPVOffset_Acct, Integer.valueOf(PPVOffset_Acct));
}
/** Get PPV Offset.
@return Purchase Price Variance Offset Account
*/
public int getPPVOffset_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PPVOffset_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Retained Earning Acct.
@param RetainedEarning_Acct Retained Earning Acct */
public void setRetainedEarning_Acct (int RetainedEarning_Acct)
{
set_Value (COLUMNNAME_RetainedEarning_Acct, Integer.valueOf(RetainedEarning_Acct));
}
/** Get Retained Earning Acct. /** Get Retained Earning Acct.
@return Retained Earning Acct */ @return Retained Earning Acct */
public int getRetainedEarning_Acct () public int getRetainedEarning_Acct ()
{ {
Integer ii = (Integer)get_Value(COLUMNNAME_RetainedEarning_Acct); Integer ii = (Integer)get_Value(COLUMNNAME_RetainedEarning_Acct);
if (ii == null) if (ii == null)
return 0; return 0;
return ii.intValue(); return ii.intValue();
} }
/** Set Suspense Balancing Acct. /** Set Suspense Balancing Acct.
@param SuspenseBalancing_Acct Suspense Balancing Acct */ @param SuspenseBalancing_Acct Suspense Balancing Acct */
public void setSuspenseBalancing_Acct (int SuspenseBalancing_Acct) public void setSuspenseBalancing_Acct (int SuspenseBalancing_Acct)
{ {
set_Value (COLUMNNAME_SuspenseBalancing_Acct, Integer.valueOf(SuspenseBalancing_Acct)); set_Value (COLUMNNAME_SuspenseBalancing_Acct, Integer.valueOf(SuspenseBalancing_Acct));
} }
/** Get Suspense Balancing Acct. /** Get Suspense Balancing Acct.
@return Suspense Balancing Acct */ @return Suspense Balancing Acct */
public int getSuspenseBalancing_Acct () public int getSuspenseBalancing_Acct ()
{ {
Integer ii = (Integer)get_Value(COLUMNNAME_SuspenseBalancing_Acct); Integer ii = (Integer)get_Value(COLUMNNAME_SuspenseBalancing_Acct);
if (ii == null) if (ii == null)
return 0; return 0;
return ii.intValue(); return ii.intValue();
} }
/** Set Suspense Error Acct. /** Set Suspense Error Acct.
@param SuspenseError_Acct Suspense Error Acct */ @param SuspenseError_Acct Suspense Error Acct */
public void setSuspenseError_Acct (int SuspenseError_Acct) public void setSuspenseError_Acct (int SuspenseError_Acct)
{ {
set_Value (COLUMNNAME_SuspenseError_Acct, Integer.valueOf(SuspenseError_Acct)); set_Value (COLUMNNAME_SuspenseError_Acct, Integer.valueOf(SuspenseError_Acct));
} }
/** Get Suspense Error Acct. /** Get Suspense Error Acct.
@return Suspense Error Acct */ @return Suspense Error Acct */
public int getSuspenseError_Acct () public int getSuspenseError_Acct ()
{ {
Integer ii = (Integer)get_Value(COLUMNNAME_SuspenseError_Acct); Integer ii = (Integer)get_Value(COLUMNNAME_SuspenseError_Acct);
if (ii == null) if (ii == null)
return 0; return 0;
return ii.intValue(); return ii.intValue();
} }
/** Set Use Currency Balancing. /** Set Use Currency Balancing.
@param UseCurrencyBalancing Use Currency Balancing */ @param UseCurrencyBalancing Use Currency Balancing */
public void setUseCurrencyBalancing (boolean UseCurrencyBalancing) public void setUseCurrencyBalancing (boolean UseCurrencyBalancing)
{ {
set_Value (COLUMNNAME_UseCurrencyBalancing, Boolean.valueOf(UseCurrencyBalancing)); set_Value (COLUMNNAME_UseCurrencyBalancing, Boolean.valueOf(UseCurrencyBalancing));
} }
/** Get Use Currency Balancing. /** Get Use Currency Balancing.
@return Use Currency Balancing */ @return Use Currency Balancing */
public boolean isUseCurrencyBalancing () public boolean isUseCurrencyBalancing ()
{ {
Object oo = get_Value(COLUMNNAME_UseCurrencyBalancing); Object oo = get_Value(COLUMNNAME_UseCurrencyBalancing);
if (oo != null) if (oo != null)
{ {
if (oo instanceof Boolean) if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue(); return ((Boolean)oo).booleanValue();
return "Y".equals(oo); return "Y".equals(oo);
} }
return false; return false;
} }
/** Set Use Suspense Balancing. /** Set Use Suspense Balancing.
@param UseSuspenseBalancing Use Suspense Balancing */ @param UseSuspenseBalancing Use Suspense Balancing */
public void setUseSuspenseBalancing (boolean UseSuspenseBalancing) public void setUseSuspenseBalancing (boolean UseSuspenseBalancing)
{ {
set_Value (COLUMNNAME_UseSuspenseBalancing, Boolean.valueOf(UseSuspenseBalancing)); set_Value (COLUMNNAME_UseSuspenseBalancing, Boolean.valueOf(UseSuspenseBalancing));
} }
/** Get Use Suspense Balancing. /** Get Use Suspense Balancing.
@return Use Suspense Balancing */ @return Use Suspense Balancing */
public boolean isUseSuspenseBalancing () public boolean isUseSuspenseBalancing ()
{ {
Object oo = get_Value(COLUMNNAME_UseSuspenseBalancing); Object oo = get_Value(COLUMNNAME_UseSuspenseBalancing);
if (oo != null) if (oo != null)
{ {
if (oo instanceof Boolean) if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue(); return ((Boolean)oo).booleanValue();
return "Y".equals(oo); return "Y".equals(oo);
} }
return false; return false;
} }
/** Set Use Suspense Error. /** Set Use Suspense Error.
@param UseSuspenseError Use Suspense Error */ @param UseSuspenseError Use Suspense Error */
public void setUseSuspenseError (boolean UseSuspenseError) public void setUseSuspenseError (boolean UseSuspenseError)
{ {
set_Value (COLUMNNAME_UseSuspenseError, Boolean.valueOf(UseSuspenseError)); set_Value (COLUMNNAME_UseSuspenseError, Boolean.valueOf(UseSuspenseError));
} }
/** Get Use Suspense Error. /** Get Use Suspense Error.
@return Use Suspense Error */ @return Use Suspense Error */
public boolean isUseSuspenseError () public boolean isUseSuspenseError ()
{ {
Object oo = get_Value(COLUMNNAME_UseSuspenseError); Object oo = get_Value(COLUMNNAME_UseSuspenseError);
if (oo != null) if (oo != null)
{ {
if (oo instanceof Boolean) if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue(); return ((Boolean)oo).booleanValue();
return "Y".equals(oo); return "Y".equals(oo);
} }
return false; return false;
} }
} }

View File

@ -14,319 +14,339 @@
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html * * or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/ *****************************************************************************/
/** 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.util.logging.Level;
import org.compiere.util.*;
/** Generated Model for GL_BudgetControl
* @author Adempiere (generated)
* @version Release 3.3.0 - $Id$ */
public class X_GL_BudgetControl extends PO implements I_GL_BudgetControl, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_GL_BudgetControl (Properties ctx, int GL_BudgetControl_ID, String trxName)
{
super (ctx, GL_BudgetControl_ID, trxName);
/** if (GL_BudgetControl_ID == 0) { setBudgetControlScope (null);
setC_AcctSchema_ID (0);
setCommitmentType (null);
// C
setGL_BudgetControl_ID (0);
setGL_Budget_ID (0);
setIsBeforeApproval (false);
setName (null);
} */
}
/** Load Constructor */
public X_GL_BudgetControl (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 2 - Client
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_GL_BudgetControl[")
.append(get_ID()).append("]");
return sb.toString();
}
/** BudgetControlScope AD_Reference_ID=361 */ import java.lang.reflect.Constructor;
public static final int BUDGETCONTROLSCOPE_AD_Reference_ID=361;/** Period only = P */ import java.sql.ResultSet;
public static final String BUDGETCONTROLSCOPE_PeriodOnly = "P";/** Total = T */ import java.util.Properties;
public static final String BUDGETCONTROLSCOPE_Total = "T";/** Year To Date = Y */ import java.util.logging.Level;
public static final String BUDGETCONTROLSCOPE_YearToDate = "Y"; import org.compiere.util.KeyNamePair;
/** Set Control Scope.
@param BudgetControlScope
Scope of the Budget Control
*/
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)
{
log.warning("Length > 1 - truncated");
BudgetControlScope = BudgetControlScope.substring(0, 0);
}
set_Value (COLUMNNAME_BudgetControlScope, BudgetControlScope);
}
/** Get Control Scope.
@return Scope of the Budget Control
*/
public String getBudgetControlScope ()
{
return (String)get_Value(COLUMNNAME_BudgetControlScope);
}
public I_C_AcctSchema getI_C_AcctSchema() throws Exception
{
Class<?> clazz = MTable.getClass(I_C_AcctSchema.Table_Name);
I_C_AcctSchema result = null;
try {
Constructor<?> constructor = null;
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
result = (I_C_AcctSchema)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_AcctSchema_ID()), get_TrxName()});
} catch (Exception e) {
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
throw e;
}
return result;
}
/** Set Accounting Schema.
@param C_AcctSchema_ID
Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID)
{
if (C_AcctSchema_ID < 1)
throw new IllegalArgumentException ("C_AcctSchema_ID is mandatory.");
set_Value (COLUMNNAME_C_AcctSchema_ID, Integer.valueOf(C_AcctSchema_ID));
}
/** Get Accounting Schema.
@return Rules for accounting
*/
public int getC_AcctSchema_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_AcctSchema_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** CommitmentType AD_Reference_ID=359 */ /** Generated Model for GL_BudgetControl
public static final int COMMITMENTTYPE_AD_Reference_ID=359;/** Commitment & Reservation = B */ * @author Adempiere (generated)
public static final String COMMITMENTTYPE_CommitmentReservation = "B";/** Commitment only = C */ * @version Release 3.3.0 - $Id$ */
public static final String COMMITMENTTYPE_CommitmentOnly = "C";/** None = N */ public class X_GL_BudgetControl extends PO implements I_GL_BudgetControl, I_Persistent
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) private static final long serialVersionUID = 1L;
{
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) /** Standard Constructor */
{ public X_GL_BudgetControl (Properties ctx, int GL_BudgetControl_ID, String trxName)
log.warning("Length > 1 - truncated"); {
CommitmentType = CommitmentType.substring(0, 0); super (ctx, GL_BudgetControl_ID, trxName);
} /** if (GL_BudgetControl_ID == 0)
set_Value (COLUMNNAME_CommitmentType, CommitmentType); {
} setBudgetControlScope (null);
setC_AcctSchema_ID (0);
/** Get Commitment Type. setCommitmentType (null);
@return Create Commitment and/or Reservations for Budget Control // C
*/ setGL_BudgetControl_ID (0);
public String getCommitmentType () setGL_Budget_ID (0);
{ setIsBeforeApproval (false);
return (String)get_Value(COLUMNNAME_CommitmentType); setName (null);
} } */
}
/** Set Description.
@param Description /** Load Constructor */
Optional short description of the record public X_GL_BudgetControl (Properties ctx, ResultSet rs, String trxName)
*/ {
public void setDescription (String Description) super (ctx, rs, trxName);
{ }
if (Description != null && Description.length() > 255)
{ /** AccessLevel
log.warning("Length > 255 - truncated"); * @return 2 - Client
Description = Description.substring(0, 254); */
} protected int get_AccessLevel()
set_Value (COLUMNNAME_Description, Description); {
} return accessLevel.intValue();
}
/** Get Description.
@return Optional short description of the record /** Load Meta Data */
*/ protected POInfo initPO (Properties ctx)
public String getDescription () {
{ POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
return (String)get_Value(COLUMNNAME_Description); return poi;
} }
/** Set Budget Control. public String toString()
@param GL_BudgetControl_ID {
Budget Control StringBuffer sb = new StringBuffer ("X_GL_BudgetControl[")
*/ .append(get_ID()).append("]");
public void setGL_BudgetControl_ID (int GL_BudgetControl_ID) return sb.toString();
{ }
if (GL_BudgetControl_ID < 1)
throw new IllegalArgumentException ("GL_BudgetControl_ID is mandatory."); /** BudgetControlScope AD_Reference_ID=361 */
set_ValueNoCheck (COLUMNNAME_GL_BudgetControl_ID, Integer.valueOf(GL_BudgetControl_ID)); public static final int BUDGETCONTROLSCOPE_AD_Reference_ID=361;
} /** Period only = P */
public static final String BUDGETCONTROLSCOPE_PeriodOnly = "P";
/** Get Budget Control. /** Year To Date = Y */
@return Budget Control public static final String BUDGETCONTROLSCOPE_YearToDate = "Y";
*/ /** Total = T */
public int getGL_BudgetControl_ID () public static final String BUDGETCONTROLSCOPE_Total = "T";
{ /** Set Control Scope.
Integer ii = (Integer)get_Value(COLUMNNAME_GL_BudgetControl_ID); @param BudgetControlScope
if (ii == null) Scope of the Budget Control
return 0; */
return ii.intValue(); public void setBudgetControlScope (String BudgetControlScope)
} {
if (BudgetControlScope == null) throw new IllegalArgumentException ("BudgetControlScope is mandatory");
public I_GL_Budget getI_GL_Budget() throws Exception 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)
Class<?> clazz = MTable.getClass(I_GL_Budget.Table_Name); {
I_GL_Budget result = null; log.warning("Length > 1 - truncated");
try { BudgetControlScope = BudgetControlScope.substring(0, 1);
Constructor<?> constructor = null; }
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); set_Value (COLUMNNAME_BudgetControlScope, BudgetControlScope);
result = (I_GL_Budget)constructor.newInstance(new Object[] {getCtx(), new Integer(getGL_Budget_ID()), get_TrxName()}); }
} catch (Exception e) {
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); /** Get Control Scope.
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); @return Scope of the Budget Control
throw e; */
} public String getBudgetControlScope ()
return result; {
} return (String)get_Value(COLUMNNAME_BudgetControlScope);
}
/** Set Budget.
@param GL_Budget_ID public I_C_AcctSchema getC_AcctSchema() throws Exception
General Ledger Budget {
*/ Class<?> clazz = MTable.getClass(I_C_AcctSchema.Table_Name);
public void setGL_Budget_ID (int GL_Budget_ID) I_C_AcctSchema result = null;
{ try {
if (GL_Budget_ID < 1) Constructor<?> constructor = null;
throw new IllegalArgumentException ("GL_Budget_ID is mandatory."); constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
set_Value (COLUMNNAME_GL_Budget_ID, Integer.valueOf(GL_Budget_ID)); result = (I_C_AcctSchema)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_AcctSchema_ID()), get_TrxName()});
} } catch (Exception e) {
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
/** Get Budget. log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
@return General Ledger Budget throw e;
*/ }
public int getGL_Budget_ID () return result;
{ }
Integer ii = (Integer)get_Value(COLUMNNAME_GL_Budget_ID);
if (ii == null) /** Set Accounting Schema.
return 0; @param C_AcctSchema_ID
return ii.intValue(); Rules for accounting
} */
public void setC_AcctSchema_ID (int C_AcctSchema_ID)
/** Set Comment/Help. {
@param Help if (C_AcctSchema_ID < 1)
Comment or Hint throw new IllegalArgumentException ("C_AcctSchema_ID is mandatory.");
*/ set_Value (COLUMNNAME_C_AcctSchema_ID, Integer.valueOf(C_AcctSchema_ID));
public void setHelp (String Help) }
{
if (Help != null && Help.length() > 2000) /** Get Accounting Schema.
{ @return Rules for accounting
log.warning("Length > 2000 - truncated"); */
Help = Help.substring(0, 1999); public int getC_AcctSchema_ID ()
} {
set_Value (COLUMNNAME_Help, Help); Integer ii = (Integer)get_Value(COLUMNNAME_C_AcctSchema_ID);
} if (ii == null)
return 0;
/** Get Comment/Help. return ii.intValue();
@return Comment or Hint }
*/
public String getHelp () /** CommitmentType AD_Reference_ID=359 */
{ public static final int COMMITMENTTYPE_AD_Reference_ID=359;
return (String)get_Value(COLUMNNAME_Help); /** PO Commitment only = C */
} public static final String COMMITMENTTYPE_POCommitmentOnly = "C";
/** PO Commitment & Reservation = B */
/** Set Before Approval. public static final String COMMITMENTTYPE_POCommitmentReservation = "B";
@param IsBeforeApproval /** None = N */
The Check is before the (manual) approval public static final String COMMITMENTTYPE_None = "N";
*/ /** PO/SO Commitment & Reservation = A */
public void setIsBeforeApproval (boolean IsBeforeApproval) public static final String COMMITMENTTYPE_POSOCommitmentReservation = "A";
{ /** SO Commitment only = S */
set_Value (COLUMNNAME_IsBeforeApproval, Boolean.valueOf(IsBeforeApproval)); public static final String COMMITMENTTYPE_SOCommitmentOnly = "S";
} /** PO/SO Commitment = O */
public static final String COMMITMENTTYPE_POSOCommitment = "O";
/** Get Before Approval. /** Set Commitment Type.
@return The Check is before the (manual) approval @param CommitmentType
*/ Create Commitment and/or Reservations for Budget Control
public boolean isBeforeApproval () */
{ public void setCommitmentType (String CommitmentType)
Object oo = get_Value(COLUMNNAME_IsBeforeApproval); {
if (oo != null) 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 (oo instanceof Boolean) if (CommitmentType.length() > 1)
return ((Boolean)oo).booleanValue(); {
return "Y".equals(oo); log.warning("Length > 1 - truncated");
} CommitmentType = CommitmentType.substring(0, 1);
return false; }
} set_Value (COLUMNNAME_CommitmentType, CommitmentType);
}
/** Set Name.
@param Name /** Get Commitment Type.
Alphanumeric identifier of the entity @return Create Commitment and/or Reservations for Budget Control
*/ */
public void setName (String Name) public String getCommitmentType ()
{ {
if (Name == null) return (String)get_Value(COLUMNNAME_CommitmentType);
throw new IllegalArgumentException ("Name is mandatory."); }
if (Name.length() > 120)
{ /** Set Description.
log.warning("Length > 120 - truncated"); @param Description
Name = Name.substring(0, 119); Optional short description of the record
} */
set_Value (COLUMNNAME_Name, Name); public void setDescription (String Description)
} {
/** Get Name. if (Description != null && Description.length() > 255)
@return Alphanumeric identifier of the entity {
*/ log.warning("Length > 255 - truncated");
public String getName () Description = Description.substring(0, 255);
{ }
return (String)get_Value(COLUMNNAME_Name); set_Value (COLUMNNAME_Description, Description);
} }
/** Get Record ID/ColumnName /** Get Description.
@return ID/ColumnName pair @return Optional short description of the record
*/ */
public KeyNamePair getKeyNamePair() public String getDescription ()
{ {
return new KeyNamePair(get_ID(), getName()); return (String)get_Value(COLUMNNAME_Description);
} }
/** Set Budget Control.
@param GL_BudgetControl_ID
Budget Control
*/
public void setGL_BudgetControl_ID (int GL_BudgetControl_ID)
{
if (GL_BudgetControl_ID < 1)
throw new IllegalArgumentException ("GL_BudgetControl_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_GL_BudgetControl_ID, Integer.valueOf(GL_BudgetControl_ID));
}
/** Get Budget Control.
@return Budget Control
*/
public int getGL_BudgetControl_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_GL_BudgetControl_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_GL_Budget getGL_Budget() throws Exception
{
Class<?> clazz = MTable.getClass(I_GL_Budget.Table_Name);
I_GL_Budget result = null;
try {
Constructor<?> constructor = null;
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
result = (I_GL_Budget)constructor.newInstance(new Object[] {getCtx(), new Integer(getGL_Budget_ID()), get_TrxName()});
} catch (Exception e) {
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
throw e;
}
return result;
}
/** Set Budget.
@param GL_Budget_ID
General Ledger Budget
*/
public void setGL_Budget_ID (int GL_Budget_ID)
{
if (GL_Budget_ID < 1)
throw new IllegalArgumentException ("GL_Budget_ID is mandatory.");
set_Value (COLUMNNAME_GL_Budget_ID, Integer.valueOf(GL_Budget_ID));
}
/** Get Budget.
@return General Ledger Budget
*/
public int getGL_Budget_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_GL_Budget_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Comment/Help.
@param Help
Comment or Hint
*/
public void setHelp (String Help)
{
if (Help != null && Help.length() > 2000)
{
log.warning("Length > 2000 - truncated");
Help = Help.substring(0, 2000);
}
set_Value (COLUMNNAME_Help, Help);
}
/** Get Comment/Help.
@return Comment or Hint
*/
public String getHelp ()
{
return (String)get_Value(COLUMNNAME_Help);
}
/** Set Before Approval.
@param IsBeforeApproval
The Check is before the (manual) approval
*/
public void setIsBeforeApproval (boolean IsBeforeApproval)
{
set_Value (COLUMNNAME_IsBeforeApproval, Boolean.valueOf(IsBeforeApproval));
}
/** Get Before Approval.
@return The Check is before the (manual) approval
*/
public boolean isBeforeApproval ()
{
Object oo = get_Value(COLUMNNAME_IsBeforeApproval);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
if (Name == null)
throw new IllegalArgumentException ("Name is mandatory.");
if (Name.length() > 120)
{
log.warning("Length > 120 - truncated");
Name = Name.substring(0, 120);
}
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
} }

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
/