Package org.compiere.model
Class MInOutLine
java.lang.Object
org.compiere.model.PO
org.compiere.model.X_M_InOutLine
org.compiere.model.MInOutLine
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_M_InOutLine
,I_Persistent
,Evaluatee
InOut Line
- Version:
- $Id: MInOutLine.java,v 1.5 2006/07/30 00:51:03 jjanke Exp $
- Author:
- Jorg Janke, Teo Sarca, www.arhipac.ro
- BF [ 2784194 ] Check Warehouse-Locator conflict https://sourceforge.net/p/adempiere/bugs/1871/
- 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_InOutLine
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_AD_OrgTrx_ID, COLUMNNAME_C_Activity_ID, COLUMNNAME_C_Campaign_ID, COLUMNNAME_C_Charge_ID, COLUMNNAME_C_OrderLine_ID, COLUMNNAME_C_Project_ID, COLUMNNAME_C_ProjectPhase_ID, COLUMNNAME_C_ProjectTask_ID, COLUMNNAME_C_UOM_ID, COLUMNNAME_ConfirmedQty, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_Description, COLUMNNAME_IsActive, COLUMNNAME_IsAutoProduce, COLUMNNAME_IsDescription, COLUMNNAME_IsInvoiced, COLUMNNAME_Line, COLUMNNAME_M_AttributeSetInstance_ID, COLUMNNAME_M_InOut_ID, COLUMNNAME_M_InOutLine_ID, COLUMNNAME_M_InOutLine_UU, COLUMNNAME_M_Locator_ID, COLUMNNAME_M_Product_ID, COLUMNNAME_M_RMALine_ID, COLUMNNAME_MovementQty, COLUMNNAME_PickedQty, COLUMNNAME_Processed, COLUMNNAME_QtyEntered, COLUMNNAME_Ref_InOutLine_ID, COLUMNNAME_ReversalLine_ID, COLUMNNAME_ScrappedQty, COLUMNNAME_TargetQty, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, COLUMNNAME_User1_ID, COLUMNNAME_User2_ID, Model, Table_ID, Table_Name
-
Constructor Summary
ConstructorDescriptionMInOutLine
(Properties ctx, int M_InOutLine_ID, String trxName) Standard ConstructorMInOutLine
(Properties ctx, int M_InOutLine_ID, String trxName, String... virtualColumns) MInOutLine
(Properties ctx, String M_InOutLine_UU, String trxName) UUID based ConstructorMInOutLine
(Properties ctx, ResultSet rs, String trxName) Load ConstructorMInOutLine
(MInOut inout) Parent Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDescription
(String description) Add to Descriptionprotected boolean
Before Deleteprotected boolean
beforeSave
(boolean newRecord) Before Savestatic MInOutLine[]
get
(Properties ctx, int C_OrderLine_ID, String trxName) Get shipment/receipt lines Of Order Lineint
Get AD_OrgTrx_IDGet Base value for Cost Distributionint
Get C_Activity_IDint
Get C_Campaign_IDint
Get C_Project_IDint
Get Warehousestatic MInOutLine[]
getOfOrderLine
(Properties ctx, int C_OrderLine_ID, String where, String trxName) Get Shipment/Receipt lines Of Order Linestatic MInOutLine[]
getOfProduct
(Properties ctx, int M_Product_ID, String where, String trxName) Get Shipment/Receipt lines Of Productstatic MInOutLine[]
getOfRMALine
(Properties ctx, int M_RMALine_ID, String where, String trxName) Get shipment/receipt lines Of RMA LineGet ParentGet Productint
Get User1_IDint
Get User2_IDboolean
matchToInvoiceLine
(int C_InvoiceLine_ID, BigDecimal qty) Match this material receipt line with invoice lineboolean
matchToOrderLine
(int C_OrderLine_ID, BigDecimal qty) Match this material receipt line with order lineboolean
void
setInvoiceLine
(MInvoiceLine iLine, int M_Locator_ID, BigDecimal Qty) Set Invoice Line.void
setM_Locator_ID
(int M_Locator_ID) Set M_Locator_ID.void
Set (default) Locator based on qty.void
setM_Product_ID
(int M_Product_ID, boolean setUOM) Set M_Product_IDvoid
setM_Product_ID
(int M_Product_ID, int C_UOM_ID) Set Product and UOMvoid
setM_Warehouse_ID
(int warehouse_ID) Set Warehousevoid
setMovementQty
(BigDecimal MovementQty) Set Movement Qty - enforce Product UOM precisionvoid
setOrderLine
(MOrderLine oLine, int M_Locator_ID, BigDecimal Qty) Set Order Line.void
setProduct
(MProduct product) Set Productvoid
setQty
(BigDecimal Qty) Set Entered and Movement Qtyvoid
setQtyEntered
(BigDecimal QtyEntered) Set Qty Entered - enforce UOM precisiontoString()
String RepresentationMethods inherited from class org.compiere.model.X_M_InOutLine
get_AccessLevel, getC_Activity, getC_Campaign, getC_Charge, getC_Charge_ID, getC_OrderLine, getC_OrderLine_ID, getC_Project, getC_ProjectPhase, getC_ProjectPhase_ID, getC_ProjectTask, getC_ProjectTask_ID, getC_UOM, getC_UOM_ID, getConfirmedQty, getDescription, getKeyNamePair, getLine, getM_AttributeSetInstance, getM_AttributeSetInstance_ID, getM_InOut, getM_InOut_ID, getM_InOutLine_ID, getM_InOutLine_UU, getM_Locator, getM_Locator_ID, getM_Product, getM_Product_ID, getM_RMALine, getM_RMALine_ID, getMovementQty, getPickedQty, getQtyEntered, getRef_InOutLine_ID, getReversalLine, getReversalLine_ID, getScrappedQty, getTargetQty, getUser1, getUser2, initPO, isAutoProduce, isDescription, isInvoiced, isProcessed, setAD_OrgTrx_ID, setC_Activity_ID, setC_Campaign_ID, setC_Charge_ID, setC_OrderLine_ID, setC_Project_ID, setC_ProjectPhase_ID, setC_ProjectTask_ID, setC_UOM_ID, setConfirmedQty, setDescription, setIsAutoProduce, setIsDescription, setIsInvoiced, setLine, setM_AttributeSetInstance_ID, setM_InOut_ID, setM_InOutLine_ID, setM_InOutLine_UU, setM_Product_ID, setM_RMALine_ID, setPickedQty, setProcessed, setRef_InOutLine_ID, setReversalLine_ID, setScrappedQty, setTargetQty, setUser1_ID, setUser2_ID
Methods inherited from class org.compiere.model.PO
afterDelete, afterSave, 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_InOutLine
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
-
MInOutLine
UUID based Constructor- Parameters:
ctx
- ContextM_InOutLine_UU
- UUID keytrxName
- Transaction
-
MInOutLine
Standard Constructor- Parameters:
ctx
- contextM_InOutLine_ID
- idtrxName
- trx name
-
MInOutLine
- Parameters:
ctx
-M_InOutLine_ID
-trxName
-virtualColumns
-
-
MInOutLine
Load Constructor- Parameters:
ctx
- contextrs
- result set recordtrxName
- transaction
-
MInOutLine
Parent Constructor- Parameters:
inout
- parent
-
-
Method Details
-
getOfProduct
public static MInOutLine[] getOfProduct(Properties ctx, int M_Product_ID, String where, String trxName) Get Shipment/Receipt lines Of Product- Parameters:
ctx
- contextM_Product_ID
- productwhere
- optional addition where clausetrxName
- transaction- Returns:
- array of shipment/receipt lines
-
getOfOrderLine
public static MInOutLine[] getOfOrderLine(Properties ctx, int C_OrderLine_ID, String where, String trxName) Get Shipment/Receipt lines Of Order Line- Parameters:
ctx
- contextC_OrderLine_ID
- linewhere
- optional addition where clausetrxName
- transaction- Returns:
- array of shipment/receipt lines
-
getOfRMALine
public static MInOutLine[] getOfRMALine(Properties ctx, int M_RMALine_ID, String where, String trxName) Get shipment/receipt lines Of RMA Line- Parameters:
ctx
- contextM_RMALine_ID
- linewhere
- optional addition where clausetrxName
- transaction- Returns:
- array of shipment/receipt lines
-
get
Get shipment/receipt lines Of Order Line- Parameters:
ctx
- contextC_OrderLine_ID
- linetrxName
- transaction- Returns:
- array of shipment/receipt lines
-
getParent
Get Parent- Returns:
- parent
-
setOrderLine
Set Order Line. Does not set Quantity!- Parameters:
oLine
- order lineM_Locator_ID
- optional locator idQty
- used to find locator if M_Locator_ID parameter is 0
-
setInvoiceLine
Set Invoice Line. Does not set Quantity!- Parameters:
iLine
- invoice lineM_Locator_ID
- optional locator idQty
- used to find locator if M_Locator_ID parameter is 0
-
getM_Warehouse_ID
public int getM_Warehouse_ID()Get Warehouse- Returns:
- Returns the m_Warehouse_ID.
-
setM_Warehouse_ID
public void setM_Warehouse_ID(int warehouse_ID) Set Warehouse- Parameters:
warehouse_ID
- The m_Warehouse_ID to set.
-
setM_Locator_ID
public void setM_Locator_ID(int M_Locator_ID) Set M_Locator_ID. Throw IllegalArgumentException if M_Locator_ID < 0.- Specified by:
setM_Locator_ID
in interfaceI_M_InOutLine
- Overrides:
setM_Locator_ID
in classX_M_InOutLine
- Parameters:
M_Locator_ID
- id
-
setM_Locator_ID
Set (default) Locator based on qty. Assumes Warehouse is set.- Parameters:
Qty
- quantity
-
setQty
Set Entered and Movement Qty- Parameters:
Qty
- Entered/Movement Qty
-
setQtyEntered
Set Qty Entered - enforce UOM precision- Specified by:
setQtyEntered
in interfaceI_M_InOutLine
- Overrides:
setQtyEntered
in classX_M_InOutLine
- Parameters:
QtyEntered
-
-
setMovementQty
Set Movement Qty - enforce Product UOM precision- Specified by:
setMovementQty
in interfaceI_M_InOutLine
- Overrides:
setMovementQty
in classX_M_InOutLine
- Parameters:
MovementQty
-
-
getProduct
Get Product- Returns:
- product or null
-
setProduct
Set Product- Parameters:
product
- product
-
setM_Product_ID
public void setM_Product_ID(int M_Product_ID, boolean setUOM) Set M_Product_ID- Parameters:
M_Product_ID
- productsetUOM
- true to also set UOM from product
-
setM_Product_ID
public void setM_Product_ID(int M_Product_ID, int C_UOM_ID) Set Product and UOM- Parameters:
M_Product_ID
- productC_UOM_ID
- uom
-
addDescription
Add to Description- Parameters:
description
- text
-
getC_Project_ID
public int getC_Project_ID()Get C_Project_ID- Specified by:
getC_Project_ID
in interfaceI_M_InOutLine
- Overrides:
getC_Project_ID
in classX_M_InOutLine
- Returns:
- C_Project_ID
-
getC_Activity_ID
public int getC_Activity_ID()Get C_Activity_ID- Specified by:
getC_Activity_ID
in interfaceI_M_InOutLine
- Overrides:
getC_Activity_ID
in classX_M_InOutLine
- Returns:
- C_Activity_ID
-
getC_Campaign_ID
public int getC_Campaign_ID()Get C_Campaign_ID- Specified by:
getC_Campaign_ID
in interfaceI_M_InOutLine
- Overrides:
getC_Campaign_ID
in classX_M_InOutLine
- Returns:
- C_Campaign_ID
-
getUser1_ID
public int getUser1_ID()Get User1_ID- Specified by:
getUser1_ID
in interfaceI_M_InOutLine
- Overrides:
getUser1_ID
in classX_M_InOutLine
- Returns:
- User1_ID
-
getUser2_ID
public int getUser2_ID()Get User2_ID- Specified by:
getUser2_ID
in interfaceI_M_InOutLine
- Overrides:
getUser2_ID
in classX_M_InOutLine
- Returns:
- User2_ID
-
getAD_OrgTrx_ID
public int getAD_OrgTrx_ID()Get AD_OrgTrx_ID- Specified by:
getAD_OrgTrx_ID
in interfaceI_M_InOutLine
- Overrides:
getAD_OrgTrx_ID
in classX_M_InOutLine
- Returns:
- AD_OrgTrx_ID
-
beforeSave
protected boolean beforeSave(boolean newRecord) Before Save- Overrides:
beforeSave
in classPO
- Parameters:
newRecord
- new- Returns:
- save
-
beforeDelete
protected boolean beforeDelete()Before Delete- Overrides:
beforeDelete
in classPO
- Returns:
- true if drafted
-
toString
String Representation- Overrides:
toString
in classX_M_InOutLine
- Returns:
- info
-
getBase
Get Base value for Cost Distribution- Parameters:
CostDistribution
- cost Distribution (MLandedCost.LANDEDCOSTDISTRIBUTION_*)- Returns:
- base number
-
sameOrderLineUOM
public boolean sameOrderLineUOM()- Returns:
- true if has same UOM with order line
-
matchToInvoiceLine
Match this material receipt line with invoice line- Parameters:
C_InvoiceLine_ID
-qty
-- Returns:
- true if matching is ok
-
matchToOrderLine
Match this material receipt line with order line- Parameters:
C_OrderLine_ID
-qty
-- Returns:
- true if matching is ok
-