|
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_M_DiscountSchema
org.compiere.model.MDiscountSchema
public class MDiscountSchema
Discount Schema Model
| Field Summary |
|---|
| Fields inherited from class org.compiere.model.X_M_DiscountSchema |
|---|
CUMULATIVELEVEL_AD_Reference_ID, CUMULATIVELEVEL_Line, DISCOUNTTYPE_AD_Reference_ID, DISCOUNTTYPE_Breaks, DISCOUNTTYPE_FlatPercent, DISCOUNTTYPE_Formula, DISCOUNTTYPE_Pricelist |
| 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_M_DiscountSchema |
|---|
accessLevel, COLUMNNAME_CumulativeLevel, COLUMNNAME_Description, COLUMNNAME_DiscountType, COLUMNNAME_FlatDiscount, COLUMNNAME_IsBPartnerFlatDiscount, COLUMNNAME_IsQuantityBased, COLUMNNAME_M_DiscountSchema_ID, COLUMNNAME_Name, COLUMNNAME_Processing, COLUMNNAME_Script, COLUMNNAME_ValidFrom, Model, Table_ID, Table_Name |
| Constructor Summary | |
|---|---|
MDiscountSchema(Properties ctx,
int M_DiscountSchema_ID,
String trxName)
Standard Constructor |
|
MDiscountSchema(Properties ctx,
ResultSet rs,
String trxName)
Load Constructor |
|
| Method Summary | |
|---|---|
protected boolean |
beforeSave(boolean newRecord)
Before Save |
BigDecimal |
calculateDiscount(BigDecimal Qty,
BigDecimal Price,
int M_Product_ID,
int M_Product_Category_ID,
BigDecimal BPartnerFlatDiscount)
Calculate Discount Percentage |
BigDecimal |
calculatePrice(BigDecimal Qty,
BigDecimal Price,
int M_Product_ID,
int M_Product_Category_ID,
BigDecimal BPartnerFlatDiscount)
Calculate Discounted Price |
static MDiscountSchema |
get(Properties ctx,
int M_DiscountSchema_ID)
Get Discount Schema from Cache |
MDiscountSchemaBreak[] |
getBreaks(boolean reload)
Get Breaks |
MDiscountSchemaLine[] |
getLines(boolean reload)
Get Lines |
int |
reSeq()
Renumber |
| Methods inherited from class org.compiere.model.X_M_DiscountSchema |
|---|
get_AccessLevel, getCumulativeLevel, getDescription, getDiscountType, getFlatDiscount, getKeyNamePair, getM_DiscountSchema_ID, getName, getScript, getValidFrom, initPO, isBPartnerFlatDiscount, isProcessing, isQuantityBased, setCumulativeLevel, setDescription, setDiscountType, setFlatDiscount, setIsBPartnerFlatDiscount, setIsQuantityBased, setM_DiscountSchema_ID, setName, setProcessing, setScript, setValidFrom, toString |
| 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 MDiscountSchema(Properties ctx,
int M_DiscountSchema_ID,
String trxName)
ctx - contextM_DiscountSchema_ID - idtrxName - transaction
public MDiscountSchema(Properties ctx,
ResultSet rs,
String trxName)
ctx - contextrs - result settrxName - transaction| Method Detail |
|---|
public static MDiscountSchema get(Properties ctx,
int M_DiscountSchema_ID)
ctx - contextM_DiscountSchema_ID - id
public MDiscountSchemaBreak[] getBreaks(boolean reload)
reload - reload
public MDiscountSchemaLine[] getLines(boolean reload)
reload - reload
public BigDecimal calculatePrice(BigDecimal Qty,
BigDecimal Price,
int M_Product_ID,
int M_Product_Category_ID,
BigDecimal BPartnerFlatDiscount)
Qty - quantityPrice - priceM_Product_ID - productM_Product_Category_ID - categoryBPartnerFlatDiscount - flat discount
public BigDecimal calculateDiscount(BigDecimal Qty,
BigDecimal Price,
int M_Product_ID,
int M_Product_Category_ID,
BigDecimal BPartnerFlatDiscount)
Qty - quantityPrice - priceM_Product_ID - productM_Product_Category_ID - categoryBPartnerFlatDiscount - flat discount
protected boolean beforeSave(boolean newRecord)
beforeSave in class POnewRecord - new
public int reSeq()
|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||