Package org.compiere.model
Class ProductCost
java.lang.Object
org.compiere.model.ProductCost
Product Cost Model.
Summarizes Info in MCost.
- Version:
- $Id: ProductCost.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $
- Author:
- Jorg Janke
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Product Asset Acctstatic final int
Average costing variancestatic final int
Burdenstatic final int
Product COGS Acctstatic final int
Cost Adjustmentstatic final int
Cost Productionstatic final int
Product Expense Acctstatic final int
Floor Stockstatic final int
Inventory Clearingstatic final int
Invoice Price Variancestatic final int
Laborstatic final int
Landed cost clearingstatic final int
Method Change Variancestatic final int
Mix Variancestatic final int
Outside Processingstatic final int
Outside Overheadstatic final int
Purchase Price Variancestatic final int
Material Rate Variancestatic final int
Product Revenue Acctstatic final int
Outside Processingstatic final int
Trade Discount Costsstatic final int
Trade Discount Revenuestatic final int
Material Usage Variancestatic final int
Work in Process -
Constructor Summary
ConstructorDescriptionProductCost
(Properties ctx, int M_Product_ID, int M_AttributeSetInstance_ID, String trxName) Constructor -
Method Summary
Modifier and TypeMethodDescriptiongetAccount
(int AcctType, MAcctSchema as) Get Account from ProductgetAccountDefault
(int AcctType, MAcctSchema as) Get Account from Default Product CategoryGet ProductgetProductCosts
(MAcctSchema as, int AD_Org_ID, String costingMethod, int C_OrderLine_ID, boolean zeroCostsOK) Get Total Costs (amt*qty) in Accounting Schema CurrencygetQty()
Get quantity in storage UOMboolean
Is this a Servicevoid
setM_M_AttributeSetInstance_ID
(int M_AttributeSetInstance_ID) Set M_AttributeSetInstance_IDvoid
setQty
(BigDecimal qty) Set Quantity in Storage UOMvoid
setQty
(BigDecimal qty, int C_UOM_ID) Set Quantity in UOMtoString()
String Representation
-
Field Details
-
ACCTTYPE_P_Revenue
public static final int ACCTTYPE_P_RevenueProduct Revenue Acct- See Also:
-
ACCTTYPE_P_Expense
public static final int ACCTTYPE_P_ExpenseProduct Expense Acct- See Also:
-
ACCTTYPE_P_Asset
public static final int ACCTTYPE_P_AssetProduct Asset Acct- See Also:
-
ACCTTYPE_P_Cogs
public static final int ACCTTYPE_P_CogsProduct COGS Acct- See Also:
-
ACCTTYPE_P_PPV
public static final int ACCTTYPE_P_PPVPurchase Price Variance- See Also:
-
ACCTTYPE_P_IPV
public static final int ACCTTYPE_P_IPVInvoice Price Variance- See Also:
-
ACCTTYPE_P_TDiscountRec
public static final int ACCTTYPE_P_TDiscountRecTrade Discount Revenue- See Also:
-
ACCTTYPE_P_TDiscountGrant
public static final int ACCTTYPE_P_TDiscountGrantTrade Discount Costs- See Also:
-
ACCTTYPE_P_CostAdjustment
public static final int ACCTTYPE_P_CostAdjustmentCost Adjustment- See Also:
-
ACCTTYPE_P_InventoryClearing
public static final int ACCTTYPE_P_InventoryClearingInventory Clearing- See Also:
-
ACCTTYPE_P_WorkInProcess
public static final int ACCTTYPE_P_WorkInProcessWork in Process- See Also:
-
ACCTTYPE_P_MethodChangeVariance
public static final int ACCTTYPE_P_MethodChangeVarianceMethod Change Variance- See Also:
-
ACCTTYPE_P_UsageVariance
public static final int ACCTTYPE_P_UsageVarianceMaterial Usage Variance- See Also:
-
ACCTTYPE_P_RateVariance
public static final int ACCTTYPE_P_RateVarianceMaterial Rate Variance- See Also:
-
ACCTTYPE_P_MixVariance
public static final int ACCTTYPE_P_MixVarianceMix Variance- See Also:
-
ACCTTYPE_P_FloorStock
public static final int ACCTTYPE_P_FloorStockFloor Stock- See Also:
-
ACCTTYPE_P_CostOfProduction
public static final int ACCTTYPE_P_CostOfProductionCost Production- See Also:
-
ACCTTYPE_P_Labor
public static final int ACCTTYPE_P_LaborLabor- See Also:
-
ACCTTYPE_P_Burden
public static final int ACCTTYPE_P_BurdenBurden- See Also:
-
ACCTTYPE_P_OutsideProcessing
public static final int ACCTTYPE_P_OutsideProcessingOutside Processing- See Also:
-
ACCTTYPE_P_Overhead
public static final int ACCTTYPE_P_OverheadOutside Overhead- See Also:
-
ACCTTYPE_P_Scrap
public static final int ACCTTYPE_P_ScrapOutside Processing- See Also:
-
ACCTTYPE_P_AverageCostVariance
public static final int ACCTTYPE_P_AverageCostVarianceAverage costing variance- See Also:
-
ACCTTYPE_P_LandedCostClearing
public static final int ACCTTYPE_P_LandedCostClearingLanded cost clearing- See Also:
-
-
Constructor Details
-
ProductCost
Constructor- Parameters:
ctx
- contextM_Product_ID
- productM_AttributeSetInstance_ID
- asitrxName
- trx
-
-
Method Details
-
getProduct
Get Product- Returns:
- Product might be null
-
isService
public boolean isService()Is this a Service- Returns:
- true if service
-
setQty
Set Quantity in Storage UOM- Parameters:
qty
- quantity
-
setQty
Set Quantity in UOM- Parameters:
qty
- quantityC_UOM_ID
- UOM
-
getQty
Get quantity in storage UOM- Returns:
- qty
-
getAccount
Get Account from Product- Parameters:
AcctType
- see ACCTTYPE_* (1..8)as
- Accounting Schema- Returns:
- Requested Product Account
-
getAccountDefault
Get Account from Default Product Category- Parameters:
AcctType
- see ACCTTYPE_* (1..8)as
- accounting schema- Returns:
- Requested Product Account
-
getProductCosts
public BigDecimal getProductCosts(MAcctSchema as, int AD_Org_ID, String costingMethod, int C_OrderLine_ID, boolean zeroCostsOK) Get Total Costs (amt*qty) in Accounting Schema Currency- Parameters:
as
- accounting schemaAD_Org_ID
- trx orgcostingMethod
- if null uses Accounting Schema - AcctSchema.COSTINGMETHOD_*C_OrderLine_ID
- optional order linezeroCostsOK
- zero/no costs are OK- Returns:
- cost or null, if qty or costs cannot be determined
-
toString
String Representation -
setM_M_AttributeSetInstance_ID
public void setM_M_AttributeSetInstance_ID(int M_AttributeSetInstance_ID) Set M_AttributeSetInstance_ID- Parameters:
M_AttributeSetInstance_ID
- the m_M_AttributeSetInstance_ID to set
-