Package org.compiere.model
Class MRequisitionLine
- java.lang.Object
-
- org.compiere.model.PO
-
- org.compiere.model.X_M_RequisitionLine
-
- org.compiere.model.MRequisitionLine
-
- All Implemented Interfaces:
Serializable,Cloneable,Comparator<Object>,I_M_RequisitionLine,I_Persistent,Evaluatee
public class MRequisitionLine extends X_M_RequisitionLine
Requisition Line Model- Version:
- $Id: MRequisitionLine.java,v 1.2 2006/07/30 00:51:03 jjanke Exp $
- Author:
- Jorg Janke, Teo Sarca, www.arhipac.ro
- BF [ 2419978 ] Voiding PO, requisition don't set on NULL
- BF [ 2608617 ] Error when I want to delete a PO document
- BF [ 2609604 ] Add M_RequisitionLine.C_BPartner_ID
- FR [ 2841841 ] Requisition Improvements https://sourceforge.net/p/adempiere/feature-requests/792/
- See Also:
- Serialized Form
-
-
Field Summary
-
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, LOCAL_TRX_PREFIX, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
-
Fields inherited from interface org.compiere.model.I_M_RequisitionLine
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_C_BPartner_ID, COLUMNNAME_C_Charge_ID, COLUMNNAME_C_OrderLine_ID, COLUMNNAME_C_UOM_ID, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_Description, COLUMNNAME_IsActive, COLUMNNAME_Line, COLUMNNAME_LineNetAmt, COLUMNNAME_M_AttributeSetInstance_ID, COLUMNNAME_M_Product_ID, COLUMNNAME_M_Requisition_ID, COLUMNNAME_M_RequisitionLine_ID, COLUMNNAME_M_RequisitionLine_UU, COLUMNNAME_PriceActual, COLUMNNAME_Qty, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, Model, Table_ID, Table_Name
-
-
Constructor Summary
Constructors Constructor Description MRequisitionLine(Properties ctx, int M_RequisitionLine_ID, String trxName)Standard ConstructorMRequisitionLine(Properties ctx, ResultSet rs, String trxName)Load ConstructorMRequisitionLine(MRequisition req)Parent Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanafterDelete(boolean success)After Deleteprotected booleanafterSave(boolean newRecord, boolean success)After Save.protected booleanbeforeSave(boolean newRecord)Before Savestatic MRequisitionLine[]forC_Order_ID(Properties ctx, int C_Order_ID, String trxName)Get corresponding Requisition Line for given Order Linestatic MRequisitionLine[]forC_OrderLine_ID(Properties ctx, int C_OrderLine_ID, String trxName)Get corresponding Requisition Line(s) for given Order LineTimestampgetDateRequired()I_M_ProductgetM_Product()I_M_RequisitiongetM_Requisition()MRequisitiongetParent()Get ParentBigDecimalgetQtyOrdered()Get Ordered QtyvoidsetLineNetAmt()Calculate Line Net AmtvoidsetPrice()Set PricevoidsetPrice(int M_PriceList_ID)Set Price for Product and PriceListstatic voidunlinkC_Order_ID(Properties ctx, int C_Order_ID, String trxName)UnLink Requisition Lines for given Orderstatic voidunlinkC_OrderLine_ID(Properties ctx, int C_OrderLine_ID, String trxName)UnLink Requisition Lines for given Order Line-
Methods inherited from class org.compiere.model.X_M_RequisitionLine
get_AccessLevel, getC_BPartner, getC_BPartner_ID, getC_Charge, getC_Charge_ID, getC_OrderLine, getC_OrderLine_ID, getC_UOM, getC_UOM_ID, getDescription, getKeyNamePair, getLine, getLineNetAmt, getM_AttributeSetInstance, getM_AttributeSetInstance_ID, getM_Product_ID, getM_Requisition_ID, getM_RequisitionLine_ID, getM_RequisitionLine_UU, getPriceActual, getQty, initPO, setC_BPartner_ID, setC_Charge_ID, setC_OrderLine_ID, setC_UOM_ID, setDescription, setLine, setLineNetAmt, setM_AttributeSetInstance_ID, setM_Product_ID, setM_Requisition_ID, setM_RequisitionLine_ID, setM_RequisitionLine_UU, setPriceActual, setQty, toString
-
Methods inherited from class org.compiere.model.PO
beforeDelete, checkImmutable, clearCrossTenantSafe, clone, columnExists, columnExists, compare, copyPO, copyValues, copyValues, createAttachment, delete, delete, delete_Accounting, delete_Tree, deleteEx, deleteEx, dump, dump, equals, get_Attribute, get_Attributes, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_OptimisticLockingColumns, get_Table_ID, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getUUIDColumnName, getUUIDColumnName, hashCode, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_Immutable, is_new, is_UseOptimisticLocking, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, load, loadByUU, loadComplete, loadDefaults, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveEx, saveEx, saveNew_afterSetID, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_Attribute, set_ColumnUpdateable, set_CustomColumn, set_CustomColumnReturningBoolean, set_OptimisticLockingColumns, set_TrxName, set_TrxName, set_UseOptimisticLocking, set_Value, set_Value, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, set_ValueOfColumnReturningBoolean, set_ValueOfColumnReturningBoolean, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setCrossTenantSafe, setDoc, setDocWorkflowMgr, setIsActive, setProcessedOn, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, unlock, update_Tree, validForeignKeys
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Methods inherited from interface org.compiere.model.I_M_RequisitionLine
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActive
-
Methods inherited from interface org.compiere.model.I_Persistent
save
-
-
-
-
Constructor Detail
-
MRequisitionLine
public MRequisitionLine(Properties ctx, int M_RequisitionLine_ID, String trxName)
Standard Constructor- Parameters:
ctx- contextM_RequisitionLine_ID- idtrxName- transaction
-
MRequisitionLine
public MRequisitionLine(Properties ctx, ResultSet rs, String trxName)
Load Constructor- Parameters:
ctx- contextrs- result settrxName- transaction
-
MRequisitionLine
public MRequisitionLine(MRequisition req)
Parent Constructor- Parameters:
req- requisition
-
-
Method Detail
-
forC_Order_ID
public static MRequisitionLine[] forC_Order_ID(Properties ctx, int C_Order_ID, String trxName)
Get corresponding Requisition Line for given Order Line- Parameters:
ctx-C_Order_ID- order linetrxName-- Returns:
- Requisition Line array
-
unlinkC_Order_ID
public static void unlinkC_Order_ID(Properties ctx, int C_Order_ID, String trxName)
UnLink Requisition Lines for given Order- Parameters:
ctx-C_Order_ID-trxName-
-
forC_OrderLine_ID
public static MRequisitionLine[] forC_OrderLine_ID(Properties ctx, int C_OrderLine_ID, String trxName)
Get corresponding Requisition Line(s) for given Order Line- Parameters:
ctx-C_OrderLine_ID- order linetrxName-- Returns:
- array of Requisition Line(s)
-
unlinkC_OrderLine_ID
public static void unlinkC_OrderLine_ID(Properties ctx, int C_OrderLine_ID, String trxName)
UnLink Requisition Lines for given Order Line- Parameters:
ctx-C_OrderLine_ID-trxName-
-
getQtyOrdered
public BigDecimal getQtyOrdered()
Get Ordered Qty- Returns:
- Ordered Qty
-
getParent
public MRequisition getParent()
Get Parent- Returns:
- parent
-
getM_Requisition
public I_M_Requisition getM_Requisition()
- Specified by:
getM_Requisitionin interfaceI_M_RequisitionLine- Overrides:
getM_Requisitionin classX_M_RequisitionLine
-
getDateRequired
public Timestamp getDateRequired()
- Returns:
- Date when this product is required by planner
- See Also:
X_M_Requisition.getDateRequired()
-
setPrice
public void setPrice()
Set Price
-
setPrice
public void setPrice(int M_PriceList_ID)
Set Price for Product and PriceList- Parameters:
M_PriceList_ID- price list
-
setLineNetAmt
public void setLineNetAmt()
Calculate Line Net Amt
-
beforeSave
protected boolean beforeSave(boolean newRecord)
Before Save- Overrides:
beforeSavein classPO- Parameters:
newRecord- new- Returns:
- true
-
afterSave
protected boolean afterSave(boolean newRecord, boolean success)After Save. Update Total on Header
-
afterDelete
protected boolean afterDelete(boolean success)
After Delete- Overrides:
afterDeletein classPO- Parameters:
success-- Returns:
- true/false
-
getM_Product
public I_M_Product getM_Product()
- Specified by:
getM_Productin interfaceI_M_RequisitionLine- Overrides:
getM_Productin classX_M_RequisitionLine
-
-