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
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:
-
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, UUID_NEW_RECORD, 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
ConstructorDescriptionMRequisitionLine
(Properties ctx, int M_RequisitionLine_ID, String trxName) Standard ConstructorMRequisitionLine
(Properties ctx, int M_RequisitionLine_ID, String trxName, String... virtualColumns) MRequisitionLine
(Properties ctx, String M_RequisitionLine_UU, String trxName) UUID based ConstructorMRequisitionLine
(Properties ctx, ResultSet rs, String trxName) Load ConstructorParent Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
afterDelete
(boolean success) After Deleteprotected boolean
afterSave
(boolean newRecord, boolean success) After Save.protected boolean
beforeSave
(boolean newRecord) Before Savestatic MRequisitionLine[]
forC_Order_ID
(Properties ctx, int C_Order_ID, String trxName) Get corresponding Requisition Line for given Orderstatic MRequisitionLine[]
forC_OrderLine_ID
(Properties ctx, int C_OrderLine_ID, String trxName) Get corresponding Requisition Line(s) for given Order LineGet ParentGet Ordered Qtyvoid
Calculate Line Net Amtvoid
setPrice()
Set Pricevoid
setPrice
(int M_PriceList_ID) Set Price for Product and PriceListstatic void
unlinkC_Order_ID
(Properties ctx, int C_Order_ID, String trxName) UnLink Requisition Lines from Orderstatic void
unlinkC_OrderLine_ID
(Properties ctx, int C_OrderLine_ID, String trxName) UnLink Requisition Lines from Order LineMethods 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, buildInsertSQL, 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_UUID, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, 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, loadByUU, loadComplete, loadDefaults, loadPO, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveCrossTenantSafe, saveCrossTenantSafeEx, saveCrossTenantSafeEx, 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, toInsertSQL, 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 Details
-
MRequisitionLine
UUID based Constructor- Parameters:
ctx
- ContextM_RequisitionLine_UU
- UUID keytrxName
- Transaction
-
MRequisitionLine
Standard Constructor- Parameters:
ctx
- contextM_RequisitionLine_ID
- idtrxName
- transaction
-
MRequisitionLine
public MRequisitionLine(Properties ctx, int M_RequisitionLine_ID, String trxName, String... virtualColumns) - Parameters:
ctx
-M_RequisitionLine_ID
-trxName
-virtualColumns
-
-
MRequisitionLine
Load Constructor- Parameters:
ctx
- contextrs
- result settrxName
- transaction
-
MRequisitionLine
Parent Constructor- Parameters:
req
- requisition
-
-
Method Details
-
forC_Order_ID
Get corresponding Requisition Line for given Order- Parameters:
ctx
-C_Order_ID
- ordertrxName
-- Returns:
- Requisition Line array
-
unlinkC_Order_ID
UnLink Requisition Lines from 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
UnLink Requisition Lines from Order Line- Parameters:
ctx
-C_OrderLine_ID
-trxName
-
-
getQtyOrdered
Get Ordered Qty- Returns:
- Ordered Qty
-
getParent
Get Parent- Returns:
- parent
-
getM_Requisition
- Specified by:
getM_Requisition
in interfaceI_M_RequisitionLine
- Overrides:
getM_Requisition
in classX_M_RequisitionLine
-
getDateRequired
- Returns:
- Date when this product is required by planner
- See Also:
-
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:
beforeSave
in 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:
afterDelete
in classPO
- Parameters:
success
-- Returns:
- true/false
-
getM_Product
- Specified by:
getM_Product
in interfaceI_M_RequisitionLine
- Overrides:
getM_Product
in classX_M_RequisitionLine
-