vpj-cd 2009-01-13 17:49:50 +00:00
parent 16eec660c3
commit 3622215a72
8 changed files with 6510 additions and 1 deletions

View File

@ -72,6 +72,60 @@ public interface I_T_BOMLine
public I_AD_PInstance getAD_PInstance() throws RuntimeException;
/** Column name C_AcctSchema_ID */
public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID";
/** Set Accounting Schema.
* Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID);
/** Get Accounting Schema.
* Rules for accounting
*/
public int getC_AcctSchema_ID();
public I_C_AcctSchema getC_AcctSchema() throws RuntimeException;
/** Column name Cost */
public static final String COLUMNNAME_Cost = "Cost";
/** Set Cost.
* Cost information
*/
public void setCost (int Cost);
/** Get Cost.
* Cost information
*/
public int getCost();
/** Column name CurrentCostPrice */
public static final String COLUMNNAME_CurrentCostPrice = "CurrentCostPrice";
/** Set Current Cost Price.
* The currently used cost price
*/
public void setCurrentCostPrice (BigDecimal CurrentCostPrice);
/** Get Current Cost Price.
* The currently used cost price
*/
public BigDecimal getCurrentCostPrice();
/** Column name CurrentCostPriceLL */
public static final String COLUMNNAME_CurrentCostPriceLL = "CurrentCostPriceLL";
/** Set Current Cost Price Lower Level.
* Current Price Lower Level Is the sum of the costs of the components of this product manufactured for this level.
*/
public void setCurrentCostPriceLL (BigDecimal CurrentCostPriceLL);
/** Get Current Cost Price Lower Level.
* Current Price Lower Level Is the sum of the costs of the components of this product manufactured for this level.
*/
public BigDecimal getCurrentCostPriceLL();
/** Column name Implosion */
public static final String COLUMNNAME_Implosion = "Implosion";
@ -103,6 +157,21 @@ public interface I_T_BOMLine
/** Get Levels */
public String getLevels();
/** Column name M_CostElement_ID */
public static final String COLUMNNAME_M_CostElement_ID = "M_CostElement_ID";
/** Set Cost Element.
* Product Cost Element
*/
public void setM_CostElement_ID (int M_CostElement_ID);
/** Get Cost Element.
* Product Cost Element
*/
public int getM_CostElement_ID();
public I_M_CostElement getM_CostElement() throws RuntimeException;
/** Column name M_Product_ID */
public static final String COLUMNNAME_M_Product_ID = "M_Product_ID";
@ -148,6 +217,19 @@ public interface I_T_BOMLine
public org.eevolution.model.I_PP_Product_BOM getPP_Product_BOM() throws RuntimeException;
/** Column name QtyBOM */
public static final String COLUMNNAME_QtyBOM = "QtyBOM";
/** Set Quantity.
* Indicate the Quantity use in this BOM
*/
public void setQtyBOM (BigDecimal QtyBOM);
/** Get Quantity.
* Indicate the Quantity use in this BOM
*/
public BigDecimal getQtyBOM();
/** Column name Sel_Product_ID */
public static final String COLUMNNAME_Sel_Product_ID = "Sel_Product_ID";

View File

@ -18,10 +18,12 @@
package org.eevolution.model;
import java.lang.reflect.Constructor;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.model.*;
import org.compiere.util.Env;
/** Generated Model for T_BOMLine
* @author Adempiere (generated)
@ -112,6 +114,105 @@ public class X_T_BOMLine extends PO implements I_T_BOMLine, I_Persistent
return ii.intValue();
}
public I_C_AcctSchema getC_AcctSchema() throws RuntimeException
{
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 new RuntimeException( 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)
set_Value (COLUMNNAME_C_AcctSchema_ID, null);
else
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();
}
/** Set Cost.
@param Cost
Cost information
*/
public void setCost (int Cost)
{
set_Value (COLUMNNAME_Cost, Integer.valueOf(Cost));
}
/** Get Cost.
@return Cost information
*/
public int getCost ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Cost);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Current Cost Price.
@param CurrentCostPrice
The currently used cost price
*/
public void setCurrentCostPrice (BigDecimal CurrentCostPrice)
{
set_Value (COLUMNNAME_CurrentCostPrice, CurrentCostPrice);
}
/** Get Current Cost Price.
@return The currently used cost price
*/
public BigDecimal getCurrentCostPrice ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CurrentCostPrice);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Current Cost Price Lower Level.
@param CurrentCostPriceLL
Current Price Lower Level Is the sum of the costs of the components of this product manufactured for this level.
*/
public void setCurrentCostPriceLL (BigDecimal CurrentCostPriceLL)
{
set_Value (COLUMNNAME_CurrentCostPriceLL, CurrentCostPriceLL);
}
/** Get Current Cost Price Lower Level.
@return Current Price Lower Level Is the sum of the costs of the components of this product manufactured for this level.
*/
public BigDecimal getCurrentCostPriceLL ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CurrentCostPriceLL);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Implosion.
@param Implosion
Implosion of a Bill of Materials refers to finding all the BOM''s in which a component is used.
@ -167,6 +268,45 @@ public class X_T_BOMLine extends PO implements I_T_BOMLine, I_Persistent
return (String)get_Value(COLUMNNAME_Levels);
}
public I_M_CostElement getM_CostElement() throws RuntimeException
{
Class<?> clazz = MTable.getClass(I_M_CostElement.Table_Name);
I_M_CostElement result = null;
try {
Constructor<?> constructor = null;
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
result = (I_M_CostElement)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_CostElement_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 new RuntimeException( e );
}
return result;
}
/** Set Cost Element.
@param M_CostElement_ID
Product Cost Element
*/
public void setM_CostElement_ID (int M_CostElement_ID)
{
if (M_CostElement_ID < 1)
set_Value (COLUMNNAME_M_CostElement_ID, null);
else
set_Value (COLUMNNAME_M_CostElement_ID, Integer.valueOf(M_CostElement_ID));
}
/** Get Cost Element.
@return Product Cost Element
*/
public int getM_CostElement_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_CostElement_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_M_Product getM_Product() throws RuntimeException
{
Class<?> clazz = MTable.getClass(I_M_Product.Table_Name);
@ -284,6 +424,26 @@ public class X_T_BOMLine extends PO implements I_T_BOMLine, I_Persistent
return ii.intValue();
}
/** Set Quantity.
@param QtyBOM
Indicate the Quantity use in this BOM
*/
public void setQtyBOM (BigDecimal QtyBOM)
{
set_Value (COLUMNNAME_QtyBOM, QtyBOM);
}
/** Get Quantity.
@return Indicate the Quantity use in this BOM
*/
public BigDecimal getQtyBOM ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyBOM);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Selected Product.
@param Sel_Product_ID Selected Product */
public void setSel_Product_ID (int Sel_Product_ID)

View File

@ -0,0 +1,12 @@
CREATE OR REPLACE VIEW rv_pp_cost_bomline
AS
SELECT t.seqno, t.levelno, t.levels, t.ad_client_id,t.C_AcctSchema_ID,
t.ad_org_id, t.createdby, t.updatedby, t.updated,
t.created, t.ad_pinstance_id, t.implosion, t.sel_product_id as m_product_id,t.m_costelement_id, t.currentcostprice,currentcostpricell,t.qtybom, t.currentcostprice + currentcostpricell as cost,
bl.isactive, bl.pp_product_bom_id, bl.pp_product_bomline_id, bl.description,
bl.iscritical, bl.componenttype, t.m_product_id as tm_product_id, bl.c_uom_id,
bl.issuemethod, bl.line, bl.m_attributesetinstance_id, bl.scrap,
bl.validfrom, bl.validto, bl.isqtypercentage
FROM t_bomline t LEFT OUTER JOIN pp_product_bomline bl
ON t.pp_product_bomline_id = bl.pp_product_bomline_id
;

View File

@ -0,0 +1,12 @@
CREATE OR REPLACE VIEW rv_pp_cost_bomline
AS
SELECT t.seqno, t.levelno, t.levels, t.ad_client_id,t.C_AcctSchema_ID,
t.ad_org_id, t.createdby, t.updatedby, t.updated,
t.created, t.ad_pinstance_id, t.implosion, t.sel_product_id as m_product_id,t.m_costelement_id, t.currentcostprice,currentcostpricell,t.qtybom, t.currentcostprice + currentcostpricell as cost,
bl.isactive, bl.pp_product_bom_id, bl.pp_product_bomline_id, bl.description,
bl.iscritical, bl.componenttype, t.m_product_id as tm_product_id, bl.c_uom_id,
bl.issuemethod, bl.line, bl.m_attributesetinstance_id, bl.scrap,
bl.validfrom, bl.validto, bl.isqtypercentage
FROM t_bomline t LEFT OUTER JOIN pp_product_bomline bl
ON t.pp_product_bomline_id = bl.pp_product_bomline_id
;

View File

@ -1,3 +1,5 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Jan 7, 2009 1:32:53 PM ECT
-- Manufacturing Cost
UPDATE AD_Element SET Help='The Floor Stock is used for accounting the component with Issue method is set Floor stock into Bill of Material & Formula Window.

View File

@ -37,4 +37,3 @@ UPDATE AD_Ref_List SET Description='Create a Manufacturing Order, Receipt the fi
-- New BOM Type for KIT
UPDATE AD_Ref_List_Trl SET IsTranslated='N' WHERE AD_Ref_List_ID=53450
;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff