FR [2962094] - Finish implementation of weighted average costing - Created the default account P_AverageCostVariance_Acct

Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2962094
This commit is contained in:
Carlos Ruiz 2010-03-09 02:59:57 +00:00
parent 2e49d21ca4
commit f59b902a34
15 changed files with 1084 additions and 23 deletions

View File

@ -526,6 +526,21 @@ public interface I_C_AcctSchema_Default
public I_C_ValidCombination getP_Asset_A() throws RuntimeException; public I_C_ValidCombination getP_Asset_A() throws RuntimeException;
/** Column name P_AverageCostVariance_Acct */
public static final String COLUMNNAME_P_AverageCostVariance_Acct = "P_AverageCostVariance_Acct";
/** Set Average Cost Variance.
* Average Cost Variance
*/
public void setP_AverageCostVariance_Acct (int P_AverageCostVariance_Acct);
/** Get Average Cost Variance.
* Average Cost Variance
*/
public int getP_AverageCostVariance_Acct();
public I_C_ValidCombination getP_AverageCostVariance_A() throws RuntimeException;
/** Column name PayDiscount_Exp_Acct */ /** Column name PayDiscount_Exp_Acct */
public static final String COLUMNNAME_PayDiscount_Exp_Acct = "PayDiscount_Exp_Acct"; public static final String COLUMNNAME_PayDiscount_Exp_Acct = "PayDiscount_Exp_Acct";
@ -1095,12 +1110,12 @@ public interface I_C_AcctSchema_Default
public static final String COLUMNNAME_V_Liability_Services_Acct = "V_Liability_Services_Acct"; public static final String COLUMNNAME_V_Liability_Services_Acct = "V_Liability_Services_Acct";
/** Set Vendor Service Liability. /** Set Vendor Service Liability.
* Account for Vender Service Liability * Account for Vendor Service Liability
*/ */
public void setV_Liability_Services_Acct (int V_Liability_Services_Acct); public void setV_Liability_Services_Acct (int V_Liability_Services_Acct);
/** Get Vendor Service Liability. /** Get Vendor Service Liability.
* Account for Vender Service Liability * Account for Vendor Service Liability
*/ */
public int getV_Liability_Services_Acct(); public int getV_Liability_Services_Acct();

View File

@ -136,6 +136,21 @@ public interface I_M_Product_Acct
public I_C_ValidCombination getP_Asset_A() throws RuntimeException; public I_C_ValidCombination getP_Asset_A() throws RuntimeException;
/** Column name P_AverageCostVariance_Acct */
public static final String COLUMNNAME_P_AverageCostVariance_Acct = "P_AverageCostVariance_Acct";
/** Set Average Cost Variance.
* Average Cost Variance
*/
public void setP_AverageCostVariance_Acct (int P_AverageCostVariance_Acct);
/** Get Average Cost Variance.
* Average Cost Variance
*/
public int getP_AverageCostVariance_Acct();
public I_C_ValidCombination getP_AverageCostVariance_A() throws RuntimeException;
/** Column name P_Burden_Acct */ /** Column name P_Burden_Acct */
public static final String COLUMNNAME_P_Burden_Acct = "P_Burden_Acct"; public static final String COLUMNNAME_P_Burden_Acct = "P_Burden_Acct";

View File

@ -162,6 +162,21 @@ public interface I_M_Product_Category_Acct
public I_C_ValidCombination getP_Asset_A() throws RuntimeException; public I_C_ValidCombination getP_Asset_A() throws RuntimeException;
/** Column name P_AverageCostVariance_Acct */
public static final String COLUMNNAME_P_AverageCostVariance_Acct = "P_AverageCostVariance_Acct";
/** Set Average Cost Variance.
* Average Cost Variance
*/
public void setP_AverageCostVariance_Acct (int P_AverageCostVariance_Acct);
/** Get Average Cost Variance.
* Average Cost Variance
*/
public int getP_AverageCostVariance_Acct();
public I_C_ValidCombination getP_AverageCostVariance_A() throws RuntimeException;
/** Column name P_Burden_Acct */ /** Column name P_Burden_Acct */
public static final String COLUMNNAME_P_Burden_Acct = "P_Burden_Acct"; public static final String COLUMNNAME_P_Burden_Acct = "P_Burden_Acct";

View File

@ -161,7 +161,8 @@ public class ProductCost
public static final int ACCTTYPE_P_Overhead = 21; public static final int ACCTTYPE_P_Overhead = 21;
/** Outside Processing */ /** Outside Processing */
public static final int ACCTTYPE_P_Scrap = 22; public static final int ACCTTYPE_P_Scrap = 22;
/** Outside Processing */
public static final int ACCTTYPE_P_AverageCostVariance = 23;
/** /**
* Line Account from Product * Line Account from Product
@ -172,7 +173,7 @@ public class ProductCost
*/ */
public MAccount getAccount(int AcctType, MAcctSchema as) public MAccount getAccount(int AcctType, MAcctSchema as)
{ {
if (AcctType < 1 || AcctType > 22) if (AcctType < 1 || AcctType > 23)
return null; return null;
// No Product - get Default from Product Category // No Product - get Default from Product Category
@ -186,7 +187,7 @@ public class ProductCost
+ "P_WIP_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct," // 11.12.13 + "P_WIP_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct," // 11.12.13
+ "P_RateVariance_Acct,P_MixVariance_Acct,P_FloorStock_Acct," // 14.15.16 + "P_RateVariance_Acct,P_MixVariance_Acct,P_FloorStock_Acct," // 14.15.16
+ "P_CostOfProduction_Acct,P_Labor_Acct,P_Burden_Acct,P_OutsideProcessing_Acct," // 17.18,19,20 + "P_CostOfProduction_Acct,P_Labor_Acct,P_Burden_Acct,P_OutsideProcessing_Acct," // 17.18,19,20
+ "P_Overhead_Acct,P_Scrap_Acct " // 21,22 + "P_Overhead_Acct,P_Scrap_Acct,P_AverageCostVariance_Acct " // 21,23
+ "FROM M_Product_Acct " + "FROM M_Product_Acct "
+ "WHERE M_Product_ID=? AND C_AcctSchema_ID=?"; + "WHERE M_Product_ID=? AND C_AcctSchema_ID=?";
// //
@ -224,7 +225,7 @@ public class ProductCost
*/ */
public MAccount getAccountDefault (int AcctType, MAcctSchema as) public MAccount getAccountDefault (int AcctType, MAcctSchema as)
{ {
if (AcctType < 1 || AcctType > 22) if (AcctType < 1 || AcctType > 23)
return null; return null;
String sql = "SELECT P_Revenue_Acct, P_Expense_Acct, P_Asset_Acct, P_Cogs_Acct, " String sql = "SELECT P_Revenue_Acct, P_Expense_Acct, P_Asset_Acct, P_Cogs_Acct, "
@ -234,7 +235,7 @@ public class ProductCost
+ "P_WIP_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct," // 11.12.13 + "P_WIP_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct," // 11.12.13
+ "P_RateVariance_Acct,P_MixVariance_Acct,P_FloorStock_Acct," // 14.15.16 + "P_RateVariance_Acct,P_MixVariance_Acct,P_FloorStock_Acct," // 14.15.16
+ "P_CostOfProduction_Acct,P_Labor_Acct,P_Burden_Acct,P_OutsideProcessing_Acct," // 17.18,19,20 + "P_CostOfProduction_Acct,P_Labor_Acct,P_Burden_Acct,P_OutsideProcessing_Acct," // 17.18,19,20
+ "P_Overhead_Acct,P_Scrap_Acct " // 21,22 + "P_Overhead_Acct,P_Scrap_Acct,P_AverageCostVariance_Acct " // 21,23
+ "FROM M_Product_Category pc, M_Product_Category_Acct pca " + "FROM M_Product_Category pc, M_Product_Category_Acct pca "
+ "WHERE pc.M_Product_Category_ID=pca.M_Product_Category_ID" + "WHERE pc.M_Product_Category_ID=pca.M_Product_Category_ID"
+ " AND pca.C_AcctSchema_ID=? " + " AND pca.C_AcctSchema_ID=? "

View File

@ -30,7 +30,7 @@ public class X_C_AcctSchema_Default extends PO implements I_C_AcctSchema_Default
/** /**
* *
*/ */
private static final long serialVersionUID = 20090915L; private static final long serialVersionUID = 20100308L;
/** Standard Constructor */ /** Standard Constructor */
public X_C_AcctSchema_Default (Properties ctx, int C_AcctSchema_Default_ID, String trxName) public X_C_AcctSchema_Default (Properties ctx, int C_AcctSchema_Default_ID, String trxName)
@ -878,6 +878,31 @@ public class X_C_AcctSchema_Default extends PO implements I_C_AcctSchema_Default
return ii.intValue(); return ii.intValue();
} }
public I_C_ValidCombination getP_AverageCostVariance_A() throws RuntimeException
{
return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name)
.getPO(getP_AverageCostVariance_Acct(), get_TrxName()); }
/** Set Average Cost Variance.
@param P_AverageCostVariance_Acct
Average Cost Variance
*/
public void setP_AverageCostVariance_Acct (int P_AverageCostVariance_Acct)
{
set_Value (COLUMNNAME_P_AverageCostVariance_Acct, Integer.valueOf(P_AverageCostVariance_Acct));
}
/** Get Average Cost Variance.
@return Average Cost Variance
*/
public int getP_AverageCostVariance_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_P_AverageCostVariance_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
public I_C_ValidCombination getPayDiscount_Exp_A() throws RuntimeException public I_C_ValidCombination getPayDiscount_Exp_A() throws RuntimeException
{ {
return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name)
@ -1806,7 +1831,7 @@ public class X_C_AcctSchema_Default extends PO implements I_C_AcctSchema_Default
/** Set Vendor Service Liability. /** Set Vendor Service Liability.
@param V_Liability_Services_Acct @param V_Liability_Services_Acct
Account for Vender Service Liability Account for Vendor Service Liability
*/ */
public void setV_Liability_Services_Acct (int V_Liability_Services_Acct) public void setV_Liability_Services_Acct (int V_Liability_Services_Acct)
{ {
@ -1814,7 +1839,7 @@ public class X_C_AcctSchema_Default extends PO implements I_C_AcctSchema_Default
} }
/** Get Vendor Service Liability. /** Get Vendor Service Liability.
@return Account for Vender Service Liability @return Account for Vendor Service Liability
*/ */
public int getV_Liability_Services_Acct () public int getV_Liability_Services_Acct ()
{ {

View File

@ -29,7 +29,7 @@ public class X_M_Product_Acct extends PO implements I_M_Product_Acct, I_Persiste
/** /**
* *
*/ */
private static final long serialVersionUID = 20090915L; private static final long serialVersionUID = 20100308L;
/** Standard Constructor */ /** Standard Constructor */
public X_M_Product_Acct (Properties ctx, int M_Product_Acct_ID, String trxName) public X_M_Product_Acct (Properties ctx, int M_Product_Acct_ID, String trxName)
@ -173,6 +173,31 @@ public class X_M_Product_Acct extends PO implements I_M_Product_Acct, I_Persiste
return ii.intValue(); return ii.intValue();
} }
public I_C_ValidCombination getP_AverageCostVariance_A() throws RuntimeException
{
return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name)
.getPO(getP_AverageCostVariance_Acct(), get_TrxName()); }
/** Set Average Cost Variance.
@param P_AverageCostVariance_Acct
Average Cost Variance
*/
public void setP_AverageCostVariance_Acct (int P_AverageCostVariance_Acct)
{
set_Value (COLUMNNAME_P_AverageCostVariance_Acct, Integer.valueOf(P_AverageCostVariance_Acct));
}
/** Get Average Cost Variance.
@return Average Cost Variance
*/
public int getP_AverageCostVariance_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_P_AverageCostVariance_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
public I_C_ValidCombination getP_Burden_A() throws RuntimeException public I_C_ValidCombination getP_Burden_A() throws RuntimeException
{ {
return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name)

View File

@ -29,7 +29,7 @@ public class X_M_Product_Category_Acct extends PO implements I_M_Product_Categor
/** /**
* *
*/ */
private static final long serialVersionUID = 20090915L; private static final long serialVersionUID = 20100308L;
/** Standard Constructor */ /** Standard Constructor */
public X_M_Product_Category_Acct (Properties ctx, int M_Product_Category_Acct_ID, String trxName) public X_M_Product_Category_Acct (Properties ctx, int M_Product_Category_Acct_ID, String trxName)
@ -237,6 +237,31 @@ public class X_M_Product_Category_Acct extends PO implements I_M_Product_Categor
return ii.intValue(); return ii.intValue();
} }
public I_C_ValidCombination getP_AverageCostVariance_A() throws RuntimeException
{
return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name)
.getPO(getP_AverageCostVariance_Acct(), get_TrxName()); }
/** Set Average Cost Variance.
@param P_AverageCostVariance_Acct
Average Cost Variance
*/
public void setP_AverageCostVariance_Acct (int P_AverageCostVariance_Acct)
{
set_Value (COLUMNNAME_P_AverageCostVariance_Acct, Integer.valueOf(P_AverageCostVariance_Acct));
}
/** Get Average Cost Variance.
@return Average Cost Variance
*/
public int getP_AverageCostVariance_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_P_AverageCostVariance_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
public I_C_ValidCombination getP_Burden_A() throws RuntimeException public I_C_ValidCombination getP_Burden_A() throws RuntimeException
{ {
return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name)

View File

@ -94,6 +94,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
+ ", P_COGS_Acct=" + acct.getP_COGS_Acct() + ", P_COGS_Acct=" + acct.getP_COGS_Acct()
+ ", P_PurchasePriceVariance_Acct=" + acct.getP_PurchasePriceVariance_Acct() + ", P_PurchasePriceVariance_Acct=" + acct.getP_PurchasePriceVariance_Acct()
+ ", P_InvoicePriceVariance_Acct=" + acct.getP_InvoicePriceVariance_Acct() + ", P_InvoicePriceVariance_Acct=" + acct.getP_InvoicePriceVariance_Acct()
+ ", P_AverageCostVariance_Acct=" + acct.getP_AverageCostVariance_Acct()
+ ", P_TradeDiscountRec_Acct=" + acct.getP_TradeDiscountRec_Acct() + ", P_TradeDiscountRec_Acct=" + acct.getP_TradeDiscountRec_Acct()
+ ", P_TradeDiscountGrant_Acct=" + acct.getP_TradeDiscountGrant_Acct() + ", P_TradeDiscountGrant_Acct=" + acct.getP_TradeDiscountGrant_Acct()
+ ", P_WIP_Acct=" + acct.getP_WIP_Acct() + ", P_WIP_Acct=" + acct.getP_WIP_Acct()
@ -121,14 +122,14 @@ public class AcctSchemaDefaultCopy extends SvrProcess
+ "(M_Product_Category_ID, C_AcctSchema_ID," + "(M_Product_Category_ID, C_AcctSchema_ID,"
+ " AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy," + " AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,"
+ " P_Revenue_Acct, P_Expense_Acct, P_CostAdjustment_Acct, P_InventoryClearing_Acct, P_Asset_Acct, P_CoGs_Acct," + " P_Revenue_Acct, P_Expense_Acct, P_CostAdjustment_Acct, P_InventoryClearing_Acct, P_Asset_Acct, P_CoGs_Acct,"
+ " P_PurchasePriceVariance_Acct, P_InvoicePriceVariance_Acct," + " P_PurchasePriceVariance_Acct, P_InvoicePriceVariance_Acct, P_AverageCostVariance_Acct,"
+ " P_TradeDiscountRec_Acct, P_TradeDiscountGrant_Acct," + " P_TradeDiscountRec_Acct, P_TradeDiscountGrant_Acct,"
+ " P_WIP_Acct,P_FloorStock_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct,P_RateVariance_Acct," + " P_WIP_Acct,P_FloorStock_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct,P_RateVariance_Acct,"
+ " P_MixVariance_Acct,P_Labor_Acct,P_Burden_Acct,P_CostOfProduction_Acct,P_OutsideProcessing_Acct,P_Overhead_Acct,P_Scrap_Acct) " + " P_MixVariance_Acct,P_Labor_Acct,P_Burden_Acct,P_CostOfProduction_Acct,P_OutsideProcessing_Acct,P_Overhead_Acct,P_Scrap_Acct) "
+ " SELECT p.M_Product_Category_ID, acct.C_AcctSchema_ID," + " SELECT p.M_Product_Category_ID, acct.C_AcctSchema_ID,"
+ " p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0," + " p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,"
+ " acct.P_Revenue_Acct, acct.P_Expense_Acct, acct.P_CostAdjustment_Acct, acct.P_InventoryClearing_Acct, acct.P_Asset_Acct, acct.P_CoGs_Acct," + " acct.P_Revenue_Acct, acct.P_Expense_Acct, acct.P_CostAdjustment_Acct, acct.P_InventoryClearing_Acct, acct.P_Asset_Acct, acct.P_CoGs_Acct,"
+ " acct.P_PurchasePriceVariance_Acct, acct.P_InvoicePriceVariance_Acct," + " acct.P_PurchasePriceVariance_Acct, acct.P_InvoicePriceVariance_Acct, acct.P_AverageCostVariance_Acct,"
+ " acct.P_TradeDiscountRec_Acct, acct.P_TradeDiscountGrant_Acct," + " acct.P_TradeDiscountRec_Acct, acct.P_TradeDiscountGrant_Acct,"
+ " acct.P_WIP_Acct,acct.P_FloorStock_Acct,acct.P_MethodChangeVariance_Acct,acct.P_UsageVariance_Acct,acct.P_RateVariance_Acct," + " acct.P_WIP_Acct,acct.P_FloorStock_Acct,acct.P_MethodChangeVariance_Acct,acct.P_UsageVariance_Acct,acct.P_RateVariance_Acct,"
+ " acct.P_MixVariance_Acct,acct.P_Labor_Acct,acct.P_Burden_Acct,acct.P_CostOfProduction_Acct,acct.P_OutsideProcessing_Acct,P_Overhead_Acct,P_Scrap_Acct " + " acct.P_MixVariance_Acct,acct.P_Labor_Acct,acct.P_Burden_Acct,acct.P_CostOfProduction_Acct,acct.P_OutsideProcessing_Acct,P_Overhead_Acct,P_Scrap_Acct "
@ -147,14 +148,14 @@ public class AcctSchemaDefaultCopy extends SvrProcess
+ "(M_Product_ID, C_AcctSchema_ID," + "(M_Product_ID, C_AcctSchema_ID,"
+ " AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy," + " AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,"
+ " P_Revenue_Acct, P_Expense_Acct, P_CostAdjustment_Acct, P_InventoryClearing_Acct, P_Asset_Acct, P_CoGs_Acct," + " P_Revenue_Acct, P_Expense_Acct, P_CostAdjustment_Acct, P_InventoryClearing_Acct, P_Asset_Acct, P_CoGs_Acct,"
+ " P_PurchasePriceVariance_Acct, P_InvoicePriceVariance_Acct," + " P_PurchasePriceVariance_Acct, P_InvoicePriceVariance_Acct, P_AverageCostVariance_Acct,"
+ " P_TradeDiscountRec_Acct, P_TradeDiscountGrant_Acct, " + " P_TradeDiscountRec_Acct, P_TradeDiscountGrant_Acct, "
+ " P_WIP_Acct,P_FloorStock_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct,P_RateVariance_Acct," + " P_WIP_Acct,P_FloorStock_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct,P_RateVariance_Acct,"
+ " P_MixVariance_Acct,P_Labor_Acct,P_Burden_Acct,P_CostOfProduction_Acct,P_OutsideProcessing_Acct,P_Overhead_Acct,P_Scrap_Acct) " + " P_MixVariance_Acct,P_Labor_Acct,P_Burden_Acct,P_CostOfProduction_Acct,P_OutsideProcessing_Acct,P_Overhead_Acct,P_Scrap_Acct) "
+ "SELECT p.M_Product_ID, acct.C_AcctSchema_ID," + "SELECT p.M_Product_ID, acct.C_AcctSchema_ID,"
+ " p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0," + " p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,"
+ " acct.P_Revenue_Acct, acct.P_Expense_Acct, acct.P_CostAdjustment_Acct, acct.P_InventoryClearing_Acct, acct.P_Asset_Acct, acct.P_CoGs_Acct," + " acct.P_Revenue_Acct, acct.P_Expense_Acct, acct.P_CostAdjustment_Acct, acct.P_InventoryClearing_Acct, acct.P_Asset_Acct, acct.P_CoGs_Acct,"
+ " acct.P_PurchasePriceVariance_Acct, acct.P_InvoicePriceVariance_Acct," + " acct.P_PurchasePriceVariance_Acct, acct.P_InvoicePriceVariance_Acct, acct.P_AverageCostVariance_Acct,"
+ " acct.P_TradeDiscountRec_Acct, acct.P_TradeDiscountGrant_Acct," + " acct.P_TradeDiscountRec_Acct, acct.P_TradeDiscountGrant_Acct,"
+ " acct.P_WIP_Acct,acct.P_FloorStock_Acct,acct.P_MethodChangeVariance_Acct,acct.P_UsageVariance_Acct,acct.P_RateVariance_Acct," + " acct.P_WIP_Acct,acct.P_FloorStock_Acct,acct.P_MethodChangeVariance_Acct,acct.P_UsageVariance_Acct,acct.P_RateVariance_Acct,"
+ " acct.P_MixVariance_Acct,acct.P_Labor_Acct,acct.P_Burden_Acct,acct.P_CostOfProduction_Acct,acct.P_OutsideProcessing_Acct,acct.P_Overhead_Acct,acct.P_Scrap_Acct " + " acct.P_MixVariance_Acct,acct.P_Labor_Acct,acct.P_Burden_Acct,acct.P_CostOfProduction_Acct,acct.P_OutsideProcessing_Acct,acct.P_Overhead_Acct,acct.P_Scrap_Acct "

View File

@ -74,12 +74,12 @@ public class ProductCategoryAcctCopy extends SvrProcess
// Update // Update
String sql = "UPDATE M_Product_Acct pa " String sql = "UPDATE M_Product_Acct pa "
+ "SET (P_Revenue_Acct,P_Expense_Acct,P_CostAdjustment_Acct,P_InventoryClearing_Acct,P_Asset_Acct,P_COGS_Acct," + "SET (P_Revenue_Acct,P_Expense_Acct,P_CostAdjustment_Acct,P_InventoryClearing_Acct,P_Asset_Acct,P_COGS_Acct,"
+ " P_PurchasePriceVariance_Acct,P_InvoicePriceVariance_Acct," + " P_PurchasePriceVariance_Acct,P_InvoicePriceVariance_Acct,P_AverageCostVariance_Acct,"
+ " P_TradeDiscountRec_Acct,P_TradeDiscountGrant_Acct," + " P_TradeDiscountRec_Acct,P_TradeDiscountGrant_Acct,"
+ " P_WIP_Acct,P_FloorStock_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct,P_RateVariance_Acct," + " P_WIP_Acct,P_FloorStock_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct,P_RateVariance_Acct,"
+ " P_MixVariance_Acct,P_Labor_Acct,P_Burden_Acct,P_CostOfProduction_Acct,P_OutsideProcessing_Acct,P_Overhead_Acct,P_Scrap_Acct)=" + " P_MixVariance_Acct,P_Labor_Acct,P_Burden_Acct,P_CostOfProduction_Acct,P_OutsideProcessing_Acct,P_Overhead_Acct,P_Scrap_Acct)="
+ " (SELECT P_Revenue_Acct,P_Expense_Acct,P_CostAdjustment_Acct,P_InventoryClearing_Acct,P_Asset_Acct,P_COGS_Acct," + " (SELECT P_Revenue_Acct,P_Expense_Acct,P_CostAdjustment_Acct,P_InventoryClearing_Acct,P_Asset_Acct,P_COGS_Acct,"
+ " P_PurchasePriceVariance_Acct,P_InvoicePriceVariance_Acct," + " P_PurchasePriceVariance_Acct,P_InvoicePriceVariance_Acct,P_AverageCostVariance_Acct,"
+ " P_TradeDiscountRec_Acct,P_TradeDiscountGrant_Acct," + " P_TradeDiscountRec_Acct,P_TradeDiscountGrant_Acct,"
+ " P_WIP_Acct,P_FloorStock_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct,P_RateVariance_Acct," + " P_WIP_Acct,P_FloorStock_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct,P_RateVariance_Acct,"
+ " P_MixVariance_Acct,P_Labor_Acct,P_Burden_Acct,P_CostOfProduction_Acct,P_OutsideProcessing_Acct,P_Overhead_Acct,P_Scrap_Acct" + " P_MixVariance_Acct,P_Labor_Acct,P_Burden_Acct,P_CostOfProduction_Acct,P_OutsideProcessing_Acct,P_Overhead_Acct,P_Scrap_Acct"
@ -99,14 +99,14 @@ public class ProductCategoryAcctCopy extends SvrProcess
+ "(M_Product_ID, C_AcctSchema_ID," + "(M_Product_ID, C_AcctSchema_ID,"
+ " AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy," + " AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,"
+ " P_Revenue_Acct, P_Expense_Acct, P_CostAdjustment_Acct, P_InventoryClearing_Acct, P_Asset_Acct, P_CoGs_Acct," + " P_Revenue_Acct, P_Expense_Acct, P_CostAdjustment_Acct, P_InventoryClearing_Acct, P_Asset_Acct, P_CoGs_Acct,"
+ " P_PurchasePriceVariance_Acct, P_InvoicePriceVariance_Acct," + " P_PurchasePriceVariance_Acct, P_InvoicePriceVariance_Acct, P_AverageCostVariance_Acct,"
+ " P_TradeDiscountRec_Acct, P_TradeDiscountGrant_Acct, " + " P_TradeDiscountRec_Acct, P_TradeDiscountGrant_Acct, "
+ " P_WIP_Acct,P_FloorStock_Acct, P_MethodChangeVariance_Acct, P_UsageVariance_Acct, P_RateVariance_Acct," + " P_WIP_Acct,P_FloorStock_Acct, P_MethodChangeVariance_Acct, P_UsageVariance_Acct, P_RateVariance_Acct,"
+ " P_MixVariance_Acct, P_Labor_Acct, P_Burden_Acct, P_CostOfProduction_Acct, P_OutsideProcessing_Acct, P_Overhead_Acct, P_Scrap_Acct) " + " P_MixVariance_Acct, P_Labor_Acct, P_Burden_Acct, P_CostOfProduction_Acct, P_OutsideProcessing_Acct, P_Overhead_Acct, P_Scrap_Acct) "
+ "SELECT p.M_Product_ID, acct.C_AcctSchema_ID," + "SELECT p.M_Product_ID, acct.C_AcctSchema_ID,"
+ " p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0," + " p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,"
+ " acct.P_Revenue_Acct, acct.P_Expense_Acct, acct.P_CostAdjustment_Acct, acct.P_InventoryClearing_Acct, acct.P_Asset_Acct, acct.P_CoGs_Acct," + " acct.P_Revenue_Acct, acct.P_Expense_Acct, acct.P_CostAdjustment_Acct, acct.P_InventoryClearing_Acct, acct.P_Asset_Acct, acct.P_CoGs_Acct,"
+ " acct.P_PurchasePriceVariance_Acct, acct.P_InvoicePriceVariance_Acct," + " acct.P_PurchasePriceVariance_Acct, acct.P_InvoicePriceVariance_Acct, acct.P_AverageCostVariance_Acct,"
+ " acct.P_TradeDiscountRec_Acct, acct.P_TradeDiscountGrant_Acct, " + " acct.P_TradeDiscountRec_Acct, acct.P_TradeDiscountGrant_Acct, "
+ " acct.P_WIP_Acct, acct.P_FloorStock_Acct, acct.P_MethodChangeVariance_Acct, acct.P_UsageVariance_Acct, acct.P_RateVariance_Acct," + " acct.P_WIP_Acct, acct.P_FloorStock_Acct, acct.P_MethodChangeVariance_Acct, acct.P_UsageVariance_Acct, acct.P_RateVariance_Acct,"
+ " acct.P_MixVariance_Acct, acct.P_Labor_Acct, acct.P_Burden_Acct, acct.P_CostOfProduction_Acct, acct.P_OutsideProcessing_Acct, acct.P_Overhead_Acct, acct.P_Scrap_Acct " + " acct.P_MixVariance_Acct, acct.P_Labor_Acct, acct.P_Burden_Acct, acct.P_CostOfProduction_Acct, acct.P_OutsideProcessing_Acct, acct.P_Overhead_Acct, acct.P_Scrap_Acct "

View File

@ -193,6 +193,7 @@
58500,"Method Change Variance","Account for Method Change Variance","Expense",,"Yes","No","P_METHODCHANGEVARIANCE_ACCT",58,,,,,,,,,, 58500,"Method Change Variance","Account for Method Change Variance","Expense",,"Yes","No","P_METHODCHANGEVARIANCE_ACCT",58,,,,,,,,,,
58600,"Rate Variance","Account for Rate Variance","Expense",,"Yes","No","P_RATEVARIANCE_ACCT",58,,,,,,,,,, 58600,"Rate Variance","Account for Rate Variance","Expense",,"Yes","No","P_RATEVARIANCE_ACCT",58,,,,,,,,,,
58700,"Mix Variance","Account for Mix Variance","Expense",,"Yes","No","P_MIXVARIANCE_ACCT",58,,,,,,,,,, 58700,"Mix Variance","Account for Mix Variance","Expense",,"Yes","No","P_MIXVARIANCE_ACCT",58,,,,,,,,,,
58800,"Average Cost Variance","Account for Average Cost Variance","Expense",,"Yes","No","P_AVERAGECOSTVARIANCE_ACCT",58,,,,,,,,,,
59,"CoGs Discounts",,"Expense",,,"Yes",,5,,,,,59,"CoGS Discounts",2,,, 59,"CoGs Discounts",,"Expense",,,"Yes",,5,,,,,59,"CoGS Discounts",2,,,
59100,"Trade discounts received","Received Trade Discounts (corrects Product expense)","Expense",,"Yes","No","P_TRADEDISCOUNTREC_ACCT",59,,,,,,,,,, 59100,"Trade discounts received","Received Trade Discounts (corrects Product expense)","Expense",,"Yes","No","P_TRADEDISCOUNTREC_ACCT",59,,,,,,,,,,
59200,"Payment discount revenue","Granted early payment discount from vendors","Expense",,"Yes","No","PAYDISCOUNT_REV_ACCT",59,,,,,,,,,, 59200,"Payment discount revenue","Granted early payment discount from vendors","Expense",,"Yes","No","PAYDISCOUNT_REV_ACCT",59,,,,,,,,,,

1 [Account_Value] [Account_Name] [Account_Description] [Account_Type] [Account_Sign] [Account_Document] [Account_Summary] [Default_Account] [Account_Parent] [Balance Sheet] [Balance Sheet_Name] [US 1120 Balance Sheet] US 1120 Balance Sheet_Name [Profit & Loss] [Profit & Loss_Name] [US 1120 Income Statement] [US 1120 Income Statement_Name] [Cash Flow] [Cash Flow_Name]
193 58500 Method Change Variance Account for Method Change Variance Expense Yes No P_METHODCHANGEVARIANCE_ACCT 58
194 58600 Rate Variance Account for Rate Variance Expense Yes No P_RATEVARIANCE_ACCT 58
195 58700 Mix Variance Account for Mix Variance Expense Yes No P_MIXVARIANCE_ACCT 58
196 58800 Average Cost Variance Account for Average Cost Variance Expense Yes No P_AVERAGECOSTVARIANCE_ACCT 58
197 59 CoGs Discounts Expense Yes 5 59 CoGS Discounts 2
198 59100 Trade discounts received Received Trade Discounts (corrects Product expense) Expense Yes No P_TRADEDISCOUNTREC_ACCT 59
199 59200 Payment discount revenue Granted early payment discount from vendors Expense Yes No PAYDISCOUNT_REV_ACCT 59

Binary file not shown.

View File

@ -0,0 +1,413 @@
-- Mar 8, 2010 8:44:44 PM COT
-- FR2962094_Finish implementation of weighted average costing
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,54132,0,'P_AverageCostVariance_Acct',TO_DATE('2010-03-08 20:44:43','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance','D','The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Average Cost Variance','Average Cost Variance',TO_DATE('2010-03-08 20:44:43','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Mar 8, 2010 8:44:44 PM COT
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=54132 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Mar 8, 2010 8:46:06 PM COT
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,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59071,54132,0,25,315,'P_AverageCostVariance_Acct',TO_DATE('2010-03-08 20:46:05','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance','D',10,'The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Average Cost Variance',TO_DATE('2010-03-08 20:46:05','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 8, 2010 8:46:06 PM COT
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=59071 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 8, 2010 8:46:19 PM COT
ALTER TABLE C_AcctSchema_Default ADD P_AverageCostVariance_Acct NUMBER(10) DEFAULT NULL
;
-- Mar 8, 2010 8:46:45 PM COT
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,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59072,54132,0,25,401,'P_AverageCostVariance_Acct',TO_DATE('2010-03-08 20:46:45','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance','D',10,'The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Average Cost Variance',TO_DATE('2010-03-08 20:46:45','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 8, 2010 8:46:45 PM COT
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=59072 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 8, 2010 8:46:50 PM COT
ALTER TABLE M_Product_Category_Acct ADD P_AverageCostVariance_Acct NUMBER(10) DEFAULT NULL
;
-- Mar 8, 2010 8:47:12 PM COT
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,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59073,54132,0,25,273,'P_AverageCostVariance_Acct',TO_DATE('2010-03-08 20:47:11','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance','D',10,'The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Average Cost Variance',TO_DATE('2010-03-08 20:47:11','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 8, 2010 8:47:12 PM COT
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=59073 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 8, 2010 8:47:17 PM COT
ALTER TABLE M_Product_Acct ADD P_AverageCostVariance_Acct NUMBER(10) DEFAULT NULL
;
-- Mar 8, 2010 8:49:30 PM COT
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_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,SortNo,Updated,UpdatedBy) VALUES (0,59071,106,58783,0,252,TO_DATE('2010-03-08 20:49:29','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance',26,'D','The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','Y','N','N','N','N','N','Average Cost Variance',770,0,TO_DATE('2010-03-08 20:49:29','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Mar 8, 2010 8:49:30 PM COT
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=58783 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=58783
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=4861
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=4862
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=2663
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=4863
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=2662
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=3824
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=2654
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=3835
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=56529
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=56522
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=56524
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=56528
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=56527
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y' WHERE AD_Field_ID=56525
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=430,IsDisplayed='Y' WHERE AD_Field_ID=56523
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=440,IsDisplayed='Y' WHERE AD_Field_ID=56520
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=450,IsDisplayed='Y' WHERE AD_Field_ID=56521
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=460,IsDisplayed='Y' WHERE AD_Field_ID=56526
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=470,IsDisplayed='Y' WHERE AD_Field_ID=56550
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=480,IsDisplayed='Y' WHERE AD_Field_ID=56551
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=490,IsDisplayed='Y' WHERE AD_Field_ID=3842
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=500,IsDisplayed='Y' WHERE AD_Field_ID=3841
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=510,IsDisplayed='Y' WHERE AD_Field_ID=3846
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=520,IsDisplayed='Y' WHERE AD_Field_ID=5133
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=530,IsDisplayed='Y' WHERE AD_Field_ID=5132
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=540,IsDisplayed='Y' WHERE AD_Field_ID=3843
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=550,IsDisplayed='Y' WHERE AD_Field_ID=3845
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=560,IsDisplayed='Y' WHERE AD_Field_ID=3844
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=570,IsDisplayed='Y' WHERE AD_Field_ID=3849
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=580,IsDisplayed='Y' WHERE AD_Field_ID=3850
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=590,IsDisplayed='Y' WHERE AD_Field_ID=5138
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=600,IsDisplayed='Y' WHERE AD_Field_ID=3847
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=610,IsDisplayed='Y' WHERE AD_Field_ID=3839
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=620,IsDisplayed='Y' WHERE AD_Field_ID=3837
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=630,IsDisplayed='Y' WHERE AD_Field_ID=3840
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=640,IsDisplayed='Y' WHERE AD_Field_ID=3838
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=650,IsDisplayed='Y' WHERE AD_Field_ID=3836
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=660,IsDisplayed='Y' WHERE AD_Field_ID=3851
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=670,IsDisplayed='Y' WHERE AD_Field_ID=3852
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=680,IsDisplayed='Y' WHERE AD_Field_ID=3830
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=690,IsDisplayed='Y' WHERE AD_Field_ID=3831
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=700,IsDisplayed='Y' WHERE AD_Field_ID=3832
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=710,IsDisplayed='Y' WHERE AD_Field_ID=3833
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=720,IsDisplayed='Y' WHERE AD_Field_ID=4092
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=730,IsDisplayed='Y' WHERE AD_Field_ID=4093
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=740,IsDisplayed='Y' WHERE AD_Field_ID=5134
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=750,IsDisplayed='Y' WHERE AD_Field_ID=4094
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=760,IsDisplayed='Y' WHERE AD_Field_ID=4095
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=770,IsDisplayed='Y' WHERE AD_Field_ID=3823
;
-- Mar 8, 2010 8:50:56 PM COT
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,SortNo,Updated,UpdatedBy) VALUES (0,59072,58784,0,324,TO_DATE('2010-03-08 20:50:55','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance',26,'D','The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','Y','N','N','N','N','N','Average Cost Variance',310,0,TO_DATE('2010-03-08 20:50:55','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Mar 8, 2010 8:50:56 PM COT
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=58784 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=58784
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=4872
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=4873
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=3944
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=56539
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=56532
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=56534
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=56538
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=56537
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=56535
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=56533
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=56530
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=56531
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=56536
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=56552
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=56553
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=3945
;
-- Mar 8, 2010 8:51:50 PM COT
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,SortNo,Updated,UpdatedBy) VALUES (0,59073,58785,0,210,TO_DATE('2010-03-08 20:51:49','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance',26,'D','The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','Y','N','N','N','N','N','Average Cost Variance',280,0,TO_DATE('2010-03-08 20:51:49','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Mar 8, 2010 8:51:50 PM COT
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=58785 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=58785
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=4868
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=4869
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=2608
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=56549
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=56542
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=56544
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=56548
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=56547
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=56545
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=56543
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=56540
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=56541
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=56546
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=56554
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=56555
;
-- Mar 8, 2010 9:03:21 PM COT
UPDATE AD_Field SET IsMandatory='Y',Updated=TO_DATE('2010-03-08 21:03:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58783
;
-- Mar 8, 2010 9:03:44 PM COT
UPDATE AD_Field SET IsMandatory='Y',Updated=TO_DATE('2010-03-08 21:03:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58784
;
-- Mar 8, 2010 9:04:06 PM COT
UPDATE AD_Field SET IsMandatory='Y',Updated=TO_DATE('2010-03-08 21:04:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58785
;

View File

@ -0,0 +1,56 @@
-- Mar 8, 2010 8:56:27 PM COT
-- FR2962094_Finish implementation of weighted average costing
INSERT INTO C_ElementValue (AccountSign,AccountType,AD_Client_ID,AD_Org_ID,C_Element_ID,C_ElementValue_ID,Created,CreatedBy,Description,IsActive,IsBankAccount,IsDocControlled,IsForeignCurrency,IsSummary,Name,PostActual,PostBudget,PostEncumbrance,PostStatistical,Updated,UpdatedBy,Value) VALUES ('N','E',11,0,105,50017,TO_DATE('2010-03-08 20:56:26','YYYY-MM-DD HH24:MI:SS'),100,'Account for Average Cost Variance','Y','N','Y','N','N','Average Cost Variance','Y','Y','Y','Y',TO_DATE('2010-03-08 20:56:26','YYYY-MM-DD HH24:MI:SS'),100,'58800')
;
-- Mar 8, 2010 8:56:27 PM COT
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=50017 AND NOT EXISTS (SELECT * FROM C_ElementValue_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_ElementValue_ID=t.C_ElementValue_ID)
;
-- Mar 8, 2010 8:56:27 PM COT
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, 100, SysDate, 100,t.AD_Tree_ID, 50017, 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=50017)
;
-- Mar 8, 2010 8:56:34 PM COT
UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=101 AND Node_ID=444
;
-- Mar 8, 2010 8:56:34 PM COT
UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=101 AND Node_ID=445
;
-- Mar 8, 2010 8:56:34 PM COT
UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=101 AND Node_ID=635
;
-- Mar 8, 2010 8:56:34 PM COT
UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=101 AND Node_ID=50001
;
-- Mar 8, 2010 8:56:34 PM COT
UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=101 AND Node_ID=50002
;
-- Mar 8, 2010 8:56:34 PM COT
UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=101 AND Node_ID=50003
;
-- Mar 8, 2010 8:56:34 PM COT
UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=101 AND Node_ID=50004
;
-- Mar 8, 2010 8:56:34 PM COT
UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=101 AND Node_ID=50017
;
-- Mar 8, 2010 8:58:19 PM COT
INSERT INTO C_ValidCombination (Account_ID,AD_Client_ID,AD_Org_ID,C_AcctSchema_ID,Combination,Created,CreatedBy,C_ValidCombination_ID,Description,IsActive,IsFullyQualified,Updated,UpdatedBy) VALUES (50017,11,11,101,'HQ-58800-_-_-_-_',TO_DATE('2010-03-08 20:58:18','YYYY-MM-DD HH24:MI:SS'),100,50013,'HQ-Average Cost Variance-_-_-_-_','Y','Y',TO_DATE('2010-03-08 20:58:18','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Mar 8, 2010 8:58:32 PM COT
UPDATE C_AcctSchema_Default SET P_AverageCostVariance_Acct=50013,Updated=TO_DATE('2010-03-08 20:58:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctSchema_ID=101
;
UPDATE M_Product_Category_Acct SET P_AverageCostVariance_Acct=50013,Updated=TO_DATE('2010-03-08 20:58:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctSchema_ID=101;
UPDATE M_Product_Acct SET P_AverageCostVariance_Acct=50013,Updated=TO_DATE('2010-03-08 20:58:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctSchema_ID=101;

View File

@ -0,0 +1,413 @@
-- Mar 8, 2010 8:44:44 PM COT
-- FR2962094_Finish implementation of weighted average costing
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,54132,0,'P_AverageCostVariance_Acct',TO_TIMESTAMP('2010-03-08 20:44:43','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance','D','The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Average Cost Variance','Average Cost Variance',TO_TIMESTAMP('2010-03-08 20:44:43','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Mar 8, 2010 8:44:44 PM COT
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=54132 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Mar 8, 2010 8:46:06 PM COT
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,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59071,54132,0,25,315,'P_AverageCostVariance_Acct',TO_TIMESTAMP('2010-03-08 20:46:05','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance','D',10,'The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Average Cost Variance',TO_TIMESTAMP('2010-03-08 20:46:05','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 8, 2010 8:46:06 PM COT
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=59071 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 8, 2010 8:46:19 PM COT
ALTER TABLE C_AcctSchema_Default ADD COLUMN P_AverageCostVariance_Acct NUMERIC(10) DEFAULT NULL
;
-- Mar 8, 2010 8:46:45 PM COT
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,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59072,54132,0,25,401,'P_AverageCostVariance_Acct',TO_TIMESTAMP('2010-03-08 20:46:45','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance','D',10,'The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Average Cost Variance',TO_TIMESTAMP('2010-03-08 20:46:45','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 8, 2010 8:46:45 PM COT
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=59072 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 8, 2010 8:46:50 PM COT
ALTER TABLE M_Product_Category_Acct ADD COLUMN P_AverageCostVariance_Acct NUMERIC(10) DEFAULT NULL
;
-- Mar 8, 2010 8:47:12 PM COT
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,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59073,54132,0,25,273,'P_AverageCostVariance_Acct',TO_TIMESTAMP('2010-03-08 20:47:11','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance','D',10,'The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Average Cost Variance',TO_TIMESTAMP('2010-03-08 20:47:11','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 8, 2010 8:47:12 PM COT
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=59073 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 8, 2010 8:47:17 PM COT
ALTER TABLE M_Product_Acct ADD COLUMN P_AverageCostVariance_Acct NUMERIC(10) DEFAULT NULL
;
-- Mar 8, 2010 8:49:30 PM COT
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_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,SortNo,Updated,UpdatedBy) VALUES (0,59071,106,58783,0,252,TO_TIMESTAMP('2010-03-08 20:49:29','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance',26,'D','The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','Y','N','N','N','N','N','Average Cost Variance',770,0,TO_TIMESTAMP('2010-03-08 20:49:29','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Mar 8, 2010 8:49:30 PM COT
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=58783 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=58783
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=4861
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=4862
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=2663
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=4863
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=2662
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=3824
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=2654
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=3835
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=56529
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=56522
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=56524
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=56528
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=56527
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y' WHERE AD_Field_ID=56525
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=430,IsDisplayed='Y' WHERE AD_Field_ID=56523
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=440,IsDisplayed='Y' WHERE AD_Field_ID=56520
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=450,IsDisplayed='Y' WHERE AD_Field_ID=56521
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=460,IsDisplayed='Y' WHERE AD_Field_ID=56526
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=470,IsDisplayed='Y' WHERE AD_Field_ID=56550
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=480,IsDisplayed='Y' WHERE AD_Field_ID=56551
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=490,IsDisplayed='Y' WHERE AD_Field_ID=3842
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=500,IsDisplayed='Y' WHERE AD_Field_ID=3841
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=510,IsDisplayed='Y' WHERE AD_Field_ID=3846
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=520,IsDisplayed='Y' WHERE AD_Field_ID=5133
;
-- Mar 8, 2010 8:50:01 PM COT
UPDATE AD_Field SET SeqNo=530,IsDisplayed='Y' WHERE AD_Field_ID=5132
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=540,IsDisplayed='Y' WHERE AD_Field_ID=3843
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=550,IsDisplayed='Y' WHERE AD_Field_ID=3845
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=560,IsDisplayed='Y' WHERE AD_Field_ID=3844
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=570,IsDisplayed='Y' WHERE AD_Field_ID=3849
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=580,IsDisplayed='Y' WHERE AD_Field_ID=3850
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=590,IsDisplayed='Y' WHERE AD_Field_ID=5138
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=600,IsDisplayed='Y' WHERE AD_Field_ID=3847
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=610,IsDisplayed='Y' WHERE AD_Field_ID=3839
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=620,IsDisplayed='Y' WHERE AD_Field_ID=3837
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=630,IsDisplayed='Y' WHERE AD_Field_ID=3840
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=640,IsDisplayed='Y' WHERE AD_Field_ID=3838
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=650,IsDisplayed='Y' WHERE AD_Field_ID=3836
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=660,IsDisplayed='Y' WHERE AD_Field_ID=3851
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=670,IsDisplayed='Y' WHERE AD_Field_ID=3852
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=680,IsDisplayed='Y' WHERE AD_Field_ID=3830
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=690,IsDisplayed='Y' WHERE AD_Field_ID=3831
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=700,IsDisplayed='Y' WHERE AD_Field_ID=3832
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=710,IsDisplayed='Y' WHERE AD_Field_ID=3833
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=720,IsDisplayed='Y' WHERE AD_Field_ID=4092
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=730,IsDisplayed='Y' WHERE AD_Field_ID=4093
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=740,IsDisplayed='Y' WHERE AD_Field_ID=5134
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=750,IsDisplayed='Y' WHERE AD_Field_ID=4094
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=760,IsDisplayed='Y' WHERE AD_Field_ID=4095
;
-- Mar 8, 2010 8:50:02 PM COT
UPDATE AD_Field SET SeqNo=770,IsDisplayed='Y' WHERE AD_Field_ID=3823
;
-- Mar 8, 2010 8:50:56 PM COT
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,SortNo,Updated,UpdatedBy) VALUES (0,59072,58784,0,324,TO_TIMESTAMP('2010-03-08 20:50:55','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance',26,'D','The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','Y','N','N','N','N','N','Average Cost Variance',310,0,TO_TIMESTAMP('2010-03-08 20:50:55','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Mar 8, 2010 8:50:56 PM COT
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=58784 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=58784
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=4872
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=4873
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=3944
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=56539
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=56532
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=56534
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=56538
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=56537
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=56535
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=56533
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=56530
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=56531
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=56536
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=56552
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=56553
;
-- Mar 8, 2010 8:51:06 PM COT
UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=3945
;
-- Mar 8, 2010 8:51:50 PM COT
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,SortNo,Updated,UpdatedBy) VALUES (0,59073,58785,0,210,TO_TIMESTAMP('2010-03-08 20:51:49','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance',26,'D','The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','Y','N','N','N','N','N','Average Cost Variance',280,0,TO_TIMESTAMP('2010-03-08 20:51:49','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Mar 8, 2010 8:51:50 PM COT
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=58785 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=58785
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=4868
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=4869
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=2608
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=56549
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=56542
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=56544
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=56548
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=56547
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=56545
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=56543
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=56540
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=56541
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=56546
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=56554
;
-- Mar 8, 2010 8:51:59 PM COT
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=56555
;
-- Mar 8, 2010 9:03:21 PM COT
UPDATE AD_Field SET IsMandatory='Y',Updated=TO_TIMESTAMP('2010-03-08 21:03:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58783
;
-- Mar 8, 2010 9:03:44 PM COT
UPDATE AD_Field SET IsMandatory='Y',Updated=TO_TIMESTAMP('2010-03-08 21:03:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58784
;
-- Mar 8, 2010 9:04:06 PM COT
UPDATE AD_Field SET IsMandatory='Y',Updated=TO_TIMESTAMP('2010-03-08 21:04:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58785
;

View File

@ -0,0 +1,56 @@
-- Mar 8, 2010 8:56:27 PM COT
-- FR2962094_Finish implementation of weighted average costing
INSERT INTO C_ElementValue (AccountSign,AccountType,AD_Client_ID,AD_Org_ID,C_Element_ID,C_ElementValue_ID,Created,CreatedBy,Description,IsActive,IsBankAccount,IsDocControlled,IsForeignCurrency,IsSummary,Name,PostActual,PostBudget,PostEncumbrance,PostStatistical,Updated,UpdatedBy,Value) VALUES ('N','E',11,0,105,50017,TO_TIMESTAMP('2010-03-08 20:56:26','YYYY-MM-DD HH24:MI:SS'),100,'Account for Average Cost Variance','Y','N','Y','N','N','Average Cost Variance','Y','Y','Y','Y',TO_TIMESTAMP('2010-03-08 20:56:26','YYYY-MM-DD HH24:MI:SS'),100,'58800')
;
-- Mar 8, 2010 8:56:27 PM COT
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=50017 AND NOT EXISTS (SELECT * FROM C_ElementValue_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_ElementValue_ID=t.C_ElementValue_ID)
;
-- Mar 8, 2010 8:56:27 PM COT
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, 100, CURRENT_TIMESTAMP, 100,t.AD_Tree_ID, 50017, 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=50017)
;
-- Mar 8, 2010 8:56:34 PM COT
UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=444
;
-- Mar 8, 2010 8:56:34 PM COT
UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=445
;
-- Mar 8, 2010 8:56:34 PM COT
UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=635
;
-- Mar 8, 2010 8:56:34 PM COT
UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=50001
;
-- Mar 8, 2010 8:56:34 PM COT
UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=50002
;
-- Mar 8, 2010 8:56:34 PM COT
UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=50003
;
-- Mar 8, 2010 8:56:34 PM COT
UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=6, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=50004
;
-- Mar 8, 2010 8:56:34 PM COT
UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=7, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=50017
;
-- Mar 8, 2010 8:58:19 PM COT
INSERT INTO C_ValidCombination (Account_ID,AD_Client_ID,AD_Org_ID,C_AcctSchema_ID,Combination,Created,CreatedBy,C_ValidCombination_ID,Description,IsActive,IsFullyQualified,Updated,UpdatedBy) VALUES (50017,11,11,101,'HQ-58800-_-_-_-_',TO_TIMESTAMP('2010-03-08 20:58:18','YYYY-MM-DD HH24:MI:SS'),100,50013,'HQ-Average Cost Variance-_-_-_-_','Y','Y',TO_TIMESTAMP('2010-03-08 20:58:18','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Mar 8, 2010 8:58:32 PM COT
UPDATE C_AcctSchema_Default SET P_AverageCostVariance_Acct=50013,Updated=TO_TIMESTAMP('2010-03-08 20:58:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctSchema_ID=101
;
UPDATE M_Product_Category_Acct SET P_AverageCostVariance_Acct=50013,Updated=TO_TIMESTAMP('2010-03-08 20:58:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctSchema_ID=101;
UPDATE M_Product_Acct SET P_AverageCostVariance_Acct=50013,Updated=TO_TIMESTAMP('2010-03-08 20:58:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctSchema_ID=101;