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
public class MInOutLine extends X_M_InOutLine
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:
- 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_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
Constructors Constructor Description MInOutLine(Properties ctx, int M_InOutLine_ID, String trxName)
Standard ConstructorMInOutLine(Properties ctx, ResultSet rs, String trxName)
Load ConstructorMInOutLine(MInOut inout)
Parent Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDescription(String description)
Add to Descriptionprotected boolean
beforeDelete()
Before Deleteprotected boolean
beforeSave(boolean newRecord)
Before Savestatic MInOutLine[]
get(Properties ctx, int C_OrderLine_ID, String trxName)
Get Ship lines Of Order Lineint
getAD_OrgTrx_ID()
Get AD_OrgTrx_IDBigDecimal
getBase(String CostDistribution)
Get Base value for Cost Distributionint
getC_Activity_ID()
Get C_Activity_IDint
getC_Campaign_ID()
Get C_Campaign_IDint
getC_Project_ID()
Get C_Project_IDint
getM_Warehouse_ID()
Get Warehousestatic MInOutLine[]
getOfOrderLine(Properties ctx, int C_OrderLine_ID, String where, String trxName)
Get Ship lines Of Order Linestatic MInOutLine[]
getOfRMALine(Properties ctx, int M_RMALine_ID, String where, String trxName)
Get Ship lines Of RMA LineMInOut
getParent()
Get ParentMProduct
getProduct()
Get Productint
getUser1_ID()
Get User2_IDint
getUser2_ID()
Get User2_IDboolean
sameOrderLineUOM()
void
setInvoiceLine(MInvoiceLine iLine, int M_Locator_ID, BigDecimal Qty)
Set Invoice Line.void
setM_Locator_ID(int M_Locator_ID)
Set M_Locator_IDvoid
setM_Locator_ID(BigDecimal Qty)
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 UOMvoid
setOrderLine(MOrderLine oLine, int M_Locator_ID, BigDecimal Qty)
Set Order Line.void
setProduct(MProduct product)
Set Productvoid
setQty(BigDecimal Qty)
Set Movement/Movement Qtyvoid
setQtyEntered(BigDecimal QtyEntered)
Set Qty Entered - enforce entered UOMString
toString()
String Representation-
Methods 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, 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_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 Detail
-
MInOutLine
public MInOutLine(Properties ctx, int M_InOutLine_ID, String trxName)
Standard Constructor- Parameters:
ctx
- contextM_InOutLine_ID
- idtrxName
- trx name
-
MInOutLine
public MInOutLine(Properties ctx, ResultSet rs, String trxName)
Load Constructor- Parameters:
ctx
- contextrs
- result set recordtrxName
- transaction
-
MInOutLine
public MInOutLine(MInOut inout)
Parent Constructor- Parameters:
inout
- parent
-
-
Method Detail
-
getOfOrderLine
public static MInOutLine[] getOfOrderLine(Properties ctx, int C_OrderLine_ID, String where, String trxName)
Get Ship lines Of Order Line- Parameters:
ctx
- contextC_OrderLine_ID
- linewhere
- optional addition where clausetrxName
- transaction- Returns:
- array of receipt lines
-
getOfRMALine
public static MInOutLine[] getOfRMALine(Properties ctx, int M_RMALine_ID, String where, String trxName)
Get Ship lines Of RMA Line- Parameters:
ctx
- contextM_RMALine_ID
- linewhere
- optional addition where clausetrxName
- transaction- Returns:
- array of receipt lines
-
get
public static MInOutLine[] get(Properties ctx, int C_OrderLine_ID, String trxName)
Get Ship lines Of Order Line- Parameters:
ctx
- contextC_OrderLine_ID
- linetrxName
- transaction- Returns:
- array of receipt lines2
-
getParent
public MInOut getParent()
Get Parent- Returns:
- parent
-
setOrderLine
public void setOrderLine(MOrderLine oLine, int M_Locator_ID, BigDecimal Qty)
Set Order Line. Does not set Quantity!- Parameters:
oLine
- order lineM_Locator_ID
- locatorQty
- used only to find suitable locator
-
setInvoiceLine
public void setInvoiceLine(MInvoiceLine iLine, int M_Locator_ID, BigDecimal Qty)
Set Invoice Line. Does not set Quantity!- Parameters:
iLine
- invoice lineM_Locator_ID
- locatorQty
- qty only fo find suitable locator
-
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- 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
public void setM_Locator_ID(BigDecimal Qty)
Set (default) Locator based on qty.- Parameters:
Qty
- quantity Assumes Warehouse is set
-
setQty
public void setQty(BigDecimal Qty)
Set Movement/Movement Qty- Parameters:
Qty
- Entered/Movement Qty
-
setQtyEntered
public void setQtyEntered(BigDecimal QtyEntered)
Set Qty Entered - enforce entered UOM- Specified by:
setQtyEntered
in interfaceI_M_InOutLine
- Overrides:
setQtyEntered
in classX_M_InOutLine
- Parameters:
QtyEntered
-
-
setMovementQty
public void setMovementQty(BigDecimal MovementQty)
Set Movement Qty - enforce Product UOM- Specified by:
setMovementQty
in interfaceI_M_InOutLine
- Overrides:
setMovementQty
in classX_M_InOutLine
- Parameters:
MovementQty
-
-
getProduct
public MProduct getProduct()
Get Product- Returns:
- product or null
-
setProduct
public void setProduct(MProduct product)
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
- 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
public void addDescription(String description)
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:
- project
-
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:
- Activity
-
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:
- Campaign
-
getUser1_ID
public int getUser1_ID()
Get User2_ID- Specified by:
getUser1_ID
in interfaceI_M_InOutLine
- Overrides:
getUser1_ID
in classX_M_InOutLine
- Returns:
- User2
-
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
-
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:
- trx org
-
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
public String toString()
String Representation- Overrides:
toString
in classX_M_InOutLine
- Returns:
- info
-
getBase
public BigDecimal getBase(String CostDistribution)
Get Base value for Cost Distribution- Parameters:
CostDistribution
- cost Distribution- Returns:
- base number
-
sameOrderLineUOM
public boolean sameOrderLineUOM()
-
-