|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.model.PO
org.compiere.model.X_C_UOM_Conversion
org.compiere.model.MUOMConversion
public class MUOMConversion
Unit of Measure Conversion Model
| Field Summary |
|---|
| Fields inherited from class org.compiere.model.X_C_UOM_Conversion |
|---|
C_UOM_ID_AD_Reference_ID, C_UOM_TO_ID_AD_Reference_ID |
| Fields inherited from class org.compiere.model.PO |
|---|
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID |
| Fields inherited from interface org.compiere.model.I_C_UOM_Conversion |
|---|
accessLevel, COLUMNNAME_C_UOM_Conversion_ID, COLUMNNAME_C_UOM_ID, COLUMNNAME_C_UOM_To_ID, COLUMNNAME_DivideRate, COLUMNNAME_M_Product_ID, COLUMNNAME_MultiplyRate, Model, Table_ID, Table_Name |
| Constructor Summary | |
|---|---|
MUOMConversion(MProduct parent)
Parent Constructor |
|
MUOMConversion(MUOM parent)
Parent Constructor |
|
MUOMConversion(Properties ctx,
int C_UOM_Conversion_ID,
String trxName)
Default Constructor |
|
MUOMConversion(Properties ctx,
ResultSet rs,
String trxName)
Load Constructor |
|
| Method Summary | |
|---|---|
protected boolean |
beforeSave(boolean newRecord)
Before Save |
static BigDecimal |
convert(int C_UOM_From_ID,
int C_UOM_To_ID,
BigDecimal qty,
boolean StdPrecision)
Get Converted Qty from Server (no cache) |
static BigDecimal |
convert(Properties ctx,
int C_UOM_ID,
int C_UOM_To_ID,
BigDecimal qty)
Convert qty to target UOM and round. |
static BigDecimal |
convertProductFrom(Properties ctx,
int M_Product_ID,
int C_UOM_To_ID,
BigDecimal qtyPrice)
Convert Qty/Amt FROM product UOM to entered UOM and round. |
static BigDecimal |
convertProductTo(Properties ctx,
int M_Product_ID,
int C_UOM_To_ID,
BigDecimal qtyPrice)
Convert Qty/Amt from entered UOM TO product UoM and round. |
static int |
convertToMinutes(Properties ctx,
int C_UOM_ID,
BigDecimal qty)
Convert qty to target UOM and round. |
static BigDecimal |
deriveRate(Properties ctx,
int C_UOM_ID,
int C_UOM_To_ID)
Derive Standard Conversions |
static Timestamp |
getEndDate(Properties ctx,
Timestamp startDate,
int C_UOM_ID,
BigDecimal qty)
Calculate End Date based on start date and qty |
static MUOMConversion[] |
getProductConversions(Properties ctx,
int M_Product_ID)
Get Product Conversions (cached) |
static BigDecimal |
getProductRateFrom(Properties ctx,
int M_Product_ID,
int C_UOM_To_ID)
Get Divide Rate FROM product UOM to entered UOM and round. |
static BigDecimal |
getProductRateTo(Properties ctx,
int M_Product_ID,
int C_UOM_To_ID)
Get Multiplier Rate from entered UOM TO product UoM |
static BigDecimal |
getRate(int C_UOM_ID,
int C_UOM_To_ID)
Get Conversion Multiplier Rate from Server |
static BigDecimal |
getRate(Properties ctx,
int C_UOM_ID,
int C_UOM_To_ID)
Get Multiplier Rate to target UOM |
String |
toString()
String Representation |
| Methods inherited from class org.compiere.model.X_C_UOM_Conversion |
|---|
get_AccessLevel, getC_UOM_Conversion_ID, getC_UOM_ID, getC_UOM_To_ID, getC_UOM, getDivideRate, getKeyNamePair, getM_Product_ID, getM_Product, getMultiplyRate, initPO, setC_UOM_Conversion_ID, setC_UOM_ID, setC_UOM_To_ID, setDivideRate, setM_Product_ID, setMultiplyRate |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.compiere.model.I_Persistent |
|---|
save |
| Constructor Detail |
|---|
public MUOMConversion(Properties ctx,
int C_UOM_Conversion_ID,
String trxName)
ctx - contextC_UOM_Conversion_ID - idtrxName - transaction
public MUOMConversion(Properties ctx,
ResultSet rs,
String trxName)
ctx - contextrs - result settrxName - transactionpublic MUOMConversion(MUOM parent)
parent - uom parentpublic MUOMConversion(MProduct parent)
parent - product parent| Method Detail |
|---|
public static BigDecimal convert(Properties ctx,
int C_UOM_ID,
int C_UOM_To_ID,
BigDecimal qty)
ctx - contextC_UOM_ID - from UOMC_UOM_To_ID - to UOMqty - qty
public static BigDecimal getRate(Properties ctx,
int C_UOM_ID,
int C_UOM_To_ID)
ctx - contextC_UOM_ID - from UOMC_UOM_To_ID - to UOM
public static int convertToMinutes(Properties ctx,
int C_UOM_ID,
BigDecimal qty)
ctx - contextC_UOM_ID - from UOMqty - qty
public static Timestamp getEndDate(Properties ctx,
Timestamp startDate,
int C_UOM_ID,
BigDecimal qty)
ctx - contextstartDate - dateC_UOM_ID - UOMqty - qty
public static BigDecimal deriveRate(Properties ctx,
int C_UOM_ID,
int C_UOM_To_ID)
ctx - contextC_UOM_ID - from UOMC_UOM_To_ID - to UOM
public static BigDecimal getRate(int C_UOM_ID,
int C_UOM_To_ID)
C_UOM_ID - from UOMC_UOM_To_ID - to UOM
public static BigDecimal convert(int C_UOM_From_ID,
int C_UOM_To_ID,
BigDecimal qty,
boolean StdPrecision)
qty - The quantity to be convertedC_UOM_From_ID - The C_UOM_ID of the qtyC_UOM_To_ID - The targeted UOMStdPrecision - if true, standard precision, if false costing precision
public static BigDecimal convertProductTo(Properties ctx,
int M_Product_ID,
int C_UOM_To_ID,
BigDecimal qtyPrice)
ctx - contextM_Product_ID - productC_UOM_To_ID - entered UOMqtyPrice - entered quantity or price
public static BigDecimal getProductRateTo(Properties ctx,
int M_Product_ID,
int C_UOM_To_ID)
ctx - contextM_Product_ID - productC_UOM_To_ID - entered UOM
public static BigDecimal convertProductFrom(Properties ctx,
int M_Product_ID,
int C_UOM_To_ID,
BigDecimal qtyPrice)
ctx - contextM_Product_ID - productC_UOM_To_ID - entered UOMqtyPrice - quantity or price
public static BigDecimal getProductRateFrom(Properties ctx,
int M_Product_ID,
int C_UOM_To_ID)
ctx - contextM_Product_ID - productC_UOM_To_ID - entered UOM
public static MUOMConversion[] getProductConversions(Properties ctx,
int M_Product_ID)
ctx - contextM_Product_ID - product
protected boolean beforeSave(boolean newRecord)
beforeSave in class POnewRecord - new
public String toString()
toString in class X_C_UOM_Conversion
|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||