Package org.compiere.model
Class MStorageOnHand
- java.lang.Object
-
- org.compiere.model.PO
-
- org.compiere.model.X_M_StorageOnHand
-
- org.compiere.model.MStorageOnHand
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_M_StorageOnHand
,I_Persistent
,Evaluatee
public class MStorageOnHand extends X_M_StorageOnHand
Inventory Storage Model- Version:
- $Id: MStorageOnHand.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
- Author:
- Jorg Janke
- 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_StorageOnHand
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_DateLastInventory, COLUMNNAME_DateMaterialPolicy, COLUMNNAME_IsActive, COLUMNNAME_M_AttributeSetInstance_ID, COLUMNNAME_M_Locator_ID, COLUMNNAME_M_Product_ID, COLUMNNAME_M_StorageOnHand_UU, COLUMNNAME_QtyOnHand, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, Model, Table_ID, Table_Name
-
-
Constructor Summary
Constructors Constructor Description MStorageOnHand(Properties ctx, int ignored, String trxName)
Persistency ConstructorMStorageOnHand(Properties ctx, ResultSet rs, String trxName)
Load Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
add(Properties ctx, int M_Warehouse_ID, int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID, BigDecimal diffQtyOnHand, String trxName)
Deprecated.static boolean
add(Properties ctx, int M_Warehouse_ID, int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID, BigDecimal diffQtyOnHand, Timestamp dateMPolicy, String trxName)
Deprecated.static boolean
add(Properties ctx, int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID, BigDecimal diffQtyOnHand, Timestamp dateMPolicy, String trxName)
Update Storage Info add.void
addQtyOnHand(BigDecimal addition)
Add quantity on hand directly - not using cached value - solving IDEMPIERE-2629protected boolean
beforeSave(boolean newRecord)
Before Savestatic MStorageOnHand
get(Properties ctx, int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID, String trxName)
Deprecated.static MStorageOnHand
get(Properties ctx, int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp dateMPolicy, String trxName)
Get Storage Infostatic MStorageOnHand[]
getAll(Properties ctx, int M_Product_ID, int M_Locator_ID, boolean locatorPriority, boolean fifo, String trxName, boolean forUpdate, int timeout)
Get all Storages for Product where QtyOnHand <> 0static MStorageOnHand[]
getAll(Properties ctx, int M_Product_ID, int M_Locator_ID, String trxName)
Get all Storages for Product where QtyOnHand <> 0static MStorageOnHand[]
getAll(Properties ctx, int M_Product_ID, int M_Locator_ID, String trxName, boolean forUpdate, int timeout)
Get all Storages for Product where QtyOnHand <> 0static MStorageOnHand[]
getAllWithASI(Properties ctx, int M_Product_ID, int M_Locator_ID, boolean FiFo, String trxName)
Get all Storages for Product with ASI and QtyOnHand <> 0static MStorageOnHand
getCreate(Properties ctx, int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp dateMPolicy, String trxName)
Create or Get Storage Infostatic MStorageOnHand
getCreate(Properties ctx, int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp dateMPolicy, String trxName, boolean forUpdate)
Create or Get Storage Infostatic MStorageOnHand
getCreate(Properties ctx, int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp dateMPolicy, String trxName, boolean forUpdate, int timeout)
Create or Get Storage Infostatic Timestamp
getDateMaterialPolicy(int M_Product_ID, int M_AttributeSetInstance_ID, int M_Locator_ID, String trxName)
static Timestamp
getDateMaterialPolicy(int M_Product_ID, int M_AttributeSetInstance_ID, String trxName)
static int
getM_Locator_ID(int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, BigDecimal Qty, String trxName)
Get Location with highest Locator Priority and a sufficient OnHand Qtyint
getM_Warehouse_ID()
Get M_Warehouse_ID of Locatorstatic MStorageOnHand[]
getOfProduct(Properties ctx, int M_Product_ID, String trxName)
Get Storage Info for Product across warehousesstatic BigDecimal
getQtyOnHand(int M_Product_ID, int M_Warehouse_ID, int M_AttributeSetInstance_ID, String trxName)
Get Quantity On Hand of Warehousestatic BigDecimal
getQtyOnHandForLocator(int M_Product_ID, int M_Locator_ID, int M_AttributeSetInstance_ID, String trxName)
Get Quantity On Hand of Locatorstatic BigDecimal
getQtyOnHandForLocatorWithASIZero(int M_Product_ID, int M_Locator_ID, String trxName)
Get Quantity On Hand of Locator wtih ASI=0static BigDecimal
getQtyOnHandForReservation(int M_Product_ID, int M_Warehouse_ID, int M_AttributeSetInstance_ID, String trxName)
Get Quantity On Hand of Warehouse Available for Reservationstatic BigDecimal
getQtyOnHandForReservationWithASIZero(int M_Product_ID, int M_Warehouse_ID, String trxName)
Get Quantity On Hand of Warehouse Available for Reservation with ASI=0static BigDecimal
getQtyOnHandForShipping(int M_Product_ID, int M_Warehouse_ID, int M_AttributeSetInstance_ID, String trxName)
Get Quantity On Hand of Warehouse that's available for shippingstatic BigDecimal
getQtyOnHandForShippingWithASIZero(int M_Product_ID, int M_Warehouse_ID, String trxName)
Get Quantity On Hand of Warehouse that's available for shipping with ASI=0static BigDecimal
getQtyOnHandWithASIZero(int M_Product_ID, int M_Warehouse_ID, String trxName)
Get Quantity On Hand of Warehouse with ASI=0static MStorageOnHand[]
getWarehouse(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, int M_AttributeSet_ID, boolean allAttributeInstances, Timestamp minGuaranteeDate, boolean FiFo, String trxName)
Deprecated.static MStorageOnHand[]
getWarehouse(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp minGuaranteeDate, boolean FiFo, boolean positiveOnly, int M_Locator_ID, String trxName)
Get Storage Info for Warehouse or locatorstatic MStorageOnHand[]
getWarehouse(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp minGuaranteeDate, boolean FiFo, boolean positiveOnly, int M_Locator_ID, String trxName, boolean forUpdate)
Get Storage Info for Warehouse or locatorstatic MStorageOnHand[]
getWarehouse(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp minGuaranteeDate, boolean FiFo, boolean positiveOnly, int M_Locator_ID, String trxName, boolean forUpdate, int timeout)
Get Storage Info for Warehouse or locatorstatic MStorageOnHand[]
getWarehouseNegative(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp minGuaranteeDate, boolean FiFo, int M_Locator_ID, String trxName)
Get Storage Info for Warehouse or locatorstatic MStorageOnHand[]
getWarehouseNegative(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp minGuaranteeDate, boolean FiFo, int M_Locator_ID, String trxName, boolean forUpdate)
Get Storage Info for Warehouse or locatorstatic MStorageOnHand[]
getWarehouseNegative(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp minGuaranteeDate, boolean FiFo, int M_Locator_ID, String trxName, boolean forUpdate, int timeout)
Get Storage Info for Warehouse or locatorString
toString()
String Representation-
Methods inherited from class org.compiere.model.X_M_StorageOnHand
get_AccessLevel, getDateLastInventory, getDateMaterialPolicy, getM_AttributeSetInstance, getM_AttributeSetInstance_ID, getM_Locator, getM_Locator_ID, getM_Product, getM_Product_ID, getM_StorageOnHand_UU, getQtyOnHand, initPO, setDateLastInventory, setDateMaterialPolicy, setM_AttributeSetInstance_ID, setM_Locator_ID, setM_Product_ID, setM_StorageOnHand_UU, setQtyOnHand
-
Methods inherited from class org.compiere.model.PO
afterDelete, afterSave, 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_StorageOnHand
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
-
MStorageOnHand
public MStorageOnHand(Properties ctx, int ignored, String trxName)
Persistency Constructor- Parameters:
ctx
- contextignored
- ignoredtrxName
- transaction
-
MStorageOnHand
public MStorageOnHand(Properties ctx, ResultSet rs, String trxName)
Load Constructor- Parameters:
ctx
- contextrs
- result settrxName
- transaction
-
-
Method Detail
-
get
public static MStorageOnHand get(Properties ctx, int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID, String trxName)
Deprecated.- Parameters:
ctx
-M_Locator_ID
-M_Product_ID
-M_AttributeSetInstance_ID
-trxName
-- Returns:
- MStorageOnHand
-
get
public static MStorageOnHand get(Properties ctx, int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp dateMPolicy, String trxName)
Get Storage Info- Parameters:
ctx
- contextM_Locator_ID
- locatorM_Product_ID
- productM_AttributeSetInstance_ID
- instancedateMPolicy
-trxName
- transaction- Returns:
- existing or null
-
getAllWithASI
public static MStorageOnHand[] getAllWithASI(Properties ctx, int M_Product_ID, int M_Locator_ID, boolean FiFo, String trxName)
Get all Storages for Product with ASI and QtyOnHand <> 0- Parameters:
ctx
- contextM_Product_ID
- productM_Locator_ID
- locatorFiFo
- first in-first-outtrxName
- transaction- Returns:
- existing or null
-
getAll
public static MStorageOnHand[] getAll(Properties ctx, int M_Product_ID, int M_Locator_ID, String trxName)
Get all Storages for Product where QtyOnHand <> 0- Parameters:
ctx
- contextM_Product_ID
- productM_Locator_ID
- locator, 0 to match all locatortrxName
- transaction- Returns:
- existing or null
-
getAll
public static MStorageOnHand[] getAll(Properties ctx, int M_Product_ID, int M_Locator_ID, String trxName, boolean forUpdate, int timeout)
Get all Storages for Product where QtyOnHand <> 0- Parameters:
ctx
- contextM_Product_ID
- productM_Locator_ID
- locator, 0 to match all locatortrxName
- transactionforUpdate
-timeout
-- Returns:
- existing or null
-
getAll
public static MStorageOnHand[] getAll(Properties ctx, int M_Product_ID, int M_Locator_ID, boolean locatorPriority, boolean fifo, String trxName, boolean forUpdate, int timeout)
Get all Storages for Product where QtyOnHand <> 0- Parameters:
ctx
- contextM_Product_ID
- productM_Locator_ID
- locator, 0 to match all locatorlocatorPriority
- If true, sort descending by locator Priority Nofifo
- Sort ascending(fifo) or descending(lifo) by date material policy, m_attributesetinstance_idtrxName
- transactionforUpdate
- If true, acquire db lock for updatetimeout
- timeout for the acquisition of db update lock- Returns:
- existing or null
-
getOfProduct
public static MStorageOnHand[] getOfProduct(Properties ctx, int M_Product_ID, String trxName)
Get Storage Info for Product across warehouses- Parameters:
ctx
- contextM_Product_ID
- producttrxName
- transaction- Returns:
- existing or null
-
getWarehouse
public static MStorageOnHand[] getWarehouse(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, int M_AttributeSet_ID, boolean allAttributeInstances, Timestamp minGuaranteeDate, boolean FiFo, String trxName)
Deprecated.Get Storage Info for Warehouse- Parameters:
ctx
- contextM_Warehouse_ID
-M_Product_ID
- productM_AttributeSetInstance_ID
- instanceM_AttributeSet_ID
- attribute set (NOT USED)allAttributeInstances
- if true, all attribute set instances (NOT USED)minGuaranteeDate
- optional minimum guarantee date if all attribute instancesFiFo
- first in-first-outtrxName
- transaction- Returns:
- existing - ordered by location priority (desc) and/or guarantee date
-
getWarehouse
public static MStorageOnHand[] getWarehouse(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp minGuaranteeDate, boolean FiFo, boolean positiveOnly, int M_Locator_ID, String trxName)
Get Storage Info for Warehouse or locator- Parameters:
ctx
- contextM_Warehouse_ID
- ignore if M_Locator_ID > 0M_Product_ID
- productM_AttributeSetInstance_ID
- instance id, 0 to retrieve all instanceminGuaranteeDate
- optional minimum guarantee date if all attribute instancesFiFo
- first in-first-outpositiveOnly
- if true, only return storage records with qtyOnHand > 0M_Locator_ID
- optional locator idtrxName
- transaction- Returns:
- existing - ordered by location priority (desc) and/or guarantee date
-
getWarehouse
public static MStorageOnHand[] getWarehouse(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp minGuaranteeDate, boolean FiFo, boolean positiveOnly, int M_Locator_ID, String trxName, boolean forUpdate)
Get Storage Info for Warehouse or locator- Parameters:
ctx
- contextM_Warehouse_ID
- ignore if M_Locator_ID > 0M_Product_ID
- productM_AttributeSetInstance_ID
- instance id, 0 to retrieve all instanceminGuaranteeDate
- optional minimum guarantee date if all attribute instancesFiFo
- first in-first-outpositiveOnly
- if true, only return storage records with qtyOnHand > 0M_Locator_ID
- optional locator idtrxName
- transactionforUpdate
-- Returns:
- existing - ordered by location priority (desc) and/or guarantee date
-
getWarehouse
public static MStorageOnHand[] getWarehouse(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp minGuaranteeDate, boolean FiFo, boolean positiveOnly, int M_Locator_ID, String trxName, boolean forUpdate, int timeout)
Get Storage Info for Warehouse or locator- Parameters:
ctx
- contextM_Warehouse_ID
- ignore if M_Locator_ID > 0M_Product_ID
- productM_AttributeSetInstance_ID
- instance id, 0 to retrieve all instanceminGuaranteeDate
- optional minimum guarantee date if all attribute instancesFiFo
- first in-first-outpositiveOnly
- if true, only return storage records with qtyOnHand > 0M_Locator_ID
- optional locator idtrxName
- transactionforUpdate
-timeout
-- Returns:
- existing - ordered by location priority (desc) and/or guarantee date
-
getWarehouseNegative
public static MStorageOnHand[] getWarehouseNegative(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp minGuaranteeDate, boolean FiFo, int M_Locator_ID, String trxName)
Get Storage Info for Warehouse or locator- Parameters:
ctx
- contextM_Warehouse_ID
- ignore if M_Locator_ID > 0M_Product_ID
- productM_AttributeSetInstance_ID
- instance id, 0 to retrieve all instanceminGuaranteeDate
- optional minimum guarantee date if all attribute instancesFiFo
- first in-first-outM_Locator_ID
- optional locator idtrxName
- transaction- Returns:
- existing - ordered by location priority (desc) and/or guarantee date
-
getWarehouseNegative
public static MStorageOnHand[] getWarehouseNegative(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp minGuaranteeDate, boolean FiFo, int M_Locator_ID, String trxName, boolean forUpdate)
Get Storage Info for Warehouse or locator- Parameters:
ctx
- contextM_Warehouse_ID
- ignore if M_Locator_ID > 0M_Product_ID
- productM_AttributeSetInstance_ID
- instance id, 0 to retrieve storages that don't have asi, -1 to retrieve all instanceminGuaranteeDate
- optional minimum guarantee date if all attribute instancesFiFo
- first in-first-outM_Locator_ID
- optional locator idtrxName
- transactionforUpdate
-- Returns:
- existing - ordered by location priority (desc) and/or guarantee date
-
getWarehouseNegative
public static MStorageOnHand[] getWarehouseNegative(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp minGuaranteeDate, boolean FiFo, int M_Locator_ID, String trxName, boolean forUpdate, int timeout)
Get Storage Info for Warehouse or locator- Parameters:
ctx
- contextM_Warehouse_ID
- ignore if M_Locator_ID > 0M_Product_ID
- productM_AttributeSetInstance_ID
- instance id, 0 to retrieve storages that don't have asi, -1 to retrieve all instanceminGuaranteeDate
- optional minimum guarantee date if all attribute instancesFiFo
- first in-first-outM_Locator_ID
- optional locator idtrxName
- transactionforUpdate
-timeout
-- Returns:
- existing - ordered by location priority (desc) and/or guarantee date
-
getCreate
public static MStorageOnHand getCreate(Properties ctx, int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp dateMPolicy, String trxName)
Create or Get Storage Info- Parameters:
ctx
- contextM_Locator_ID
- locatorM_Product_ID
- productM_AttributeSetInstance_ID
- instancetrxName
- transaction- Returns:
- existing/new or null
-
getCreate
public static MStorageOnHand getCreate(Properties ctx, int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp dateMPolicy, String trxName, boolean forUpdate)
Create or Get Storage Info- Parameters:
ctx
- contextM_Locator_ID
- locatorM_Product_ID
- productM_AttributeSetInstance_ID
- instancetrxName
- transactionforUpdate
-- Returns:
- existing/new or null
-
getCreate
public static MStorageOnHand getCreate(Properties ctx, int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID, Timestamp dateMPolicy, String trxName, boolean forUpdate, int timeout)
Create or Get Storage Info- Parameters:
ctx
- contextM_Locator_ID
- locatorM_Product_ID
- productM_AttributeSetInstance_ID
- instancetrxName
- transactionforUpdate
-timeout
-- Returns:
- existing/new or null
-
add
@Deprecated public static boolean add(Properties ctx, int M_Warehouse_ID, int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID, BigDecimal diffQtyOnHand, String trxName)
Deprecated.Update Storage Info add. Called from MProjectIssue- Parameters:
ctx
- contextM_Warehouse_ID
- warehouseM_Locator_ID
- locatorM_Product_ID
- productM_AttributeSetInstance_ID
- AS InstancediffQtyOnHand
- add on handtrxName
- transaction- Returns:
- true if updated
-
add
public static boolean add(Properties ctx, int M_Warehouse_ID, int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID, BigDecimal diffQtyOnHand, Timestamp dateMPolicy, String trxName)
Deprecated.Update Storage Info add. Called from MProjectIssue- Parameters:
ctx
- contextM_Warehouse_ID
- warehouse, not useM_Locator_ID
- locatorM_Product_ID
- productM_AttributeSetInstance_ID
- AS InstancediffQtyOnHand
- add on handdateMPolicy
-trxName
- transaction- Returns:
- true if updated
-
add
public static boolean add(Properties ctx, int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID, BigDecimal diffQtyOnHand, Timestamp dateMPolicy, String trxName)
Update Storage Info add. Called from MProjectIssue- Parameters:
ctx
- contextM_Locator_ID
- locatorM_Product_ID
- productM_AttributeSetInstance_ID
- AS InstancediffQtyOnHand
- add on handdateMPolicy
-trxName
- transaction- Returns:
- true if updated
-
addQtyOnHand
public void addQtyOnHand(BigDecimal addition)
Add quantity on hand directly - not using cached value - solving IDEMPIERE-2629- Parameters:
addition
-
-
getM_Locator_ID
public static int getM_Locator_ID(int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, BigDecimal Qty, String trxName)
Get Location with highest Locator Priority and a sufficient OnHand Qty- Parameters:
M_Warehouse_ID
- warehouseM_Product_ID
- productM_AttributeSetInstance_ID
- asi id, use negative value (for e.g -1) to match all asi including 0Qty
- qtytrxName
- transaction- Returns:
- locator id (0 if no match found)
-
getM_Warehouse_ID
public int getM_Warehouse_ID()
Get M_Warehouse_ID of Locator- Returns:
- warehouse
-
beforeSave
protected boolean beforeSave(boolean newRecord)
Before Save- Overrides:
beforeSave
in classPO
- Parameters:
newRecord
- new- Returns:
- success
-
getQtyOnHand
public static BigDecimal getQtyOnHand(int M_Product_ID, int M_Warehouse_ID, int M_AttributeSetInstance_ID, String trxName)
Get Quantity On Hand of Warehouse- Parameters:
M_Product_ID
-M_Warehouse_ID
-M_AttributeSetInstance_ID
-trxName
-- Returns:
- QtyOnHand
-
getQtyOnHandWithASIZero
public static BigDecimal getQtyOnHandWithASIZero(int M_Product_ID, int M_Warehouse_ID, String trxName)
Get Quantity On Hand of Warehouse with ASI=0- Parameters:
M_Product_ID
-M_Warehouse_ID
-trxName
-- Returns:
- QtyOnHand
-
getQtyOnHandForReservation
public static BigDecimal getQtyOnHandForReservation(int M_Product_ID, int M_Warehouse_ID, int M_AttributeSetInstance_ID, String trxName)
Get Quantity On Hand of Warehouse Available for Reservation- Parameters:
M_Product_ID
-M_Warehouse_ID
-M_AttributeSetInstance_ID
-trxName
-- Returns:
- QtyOnHand
-
getQtyOnHandForReservationWithASIZero
public static BigDecimal getQtyOnHandForReservationWithASIZero(int M_Product_ID, int M_Warehouse_ID, String trxName)
Get Quantity On Hand of Warehouse Available for Reservation with ASI=0- Parameters:
M_Product_ID
-M_Warehouse_ID
-trxName
-- Returns:
- QtyOnHand
-
getQtyOnHandForShipping
public static BigDecimal getQtyOnHandForShipping(int M_Product_ID, int M_Warehouse_ID, int M_AttributeSetInstance_ID, String trxName)
Get Quantity On Hand of Warehouse that's available for shipping- Parameters:
M_Product_ID
-M_Warehouse_ID
-M_AttributeSetInstance_ID
-trxName
-- Returns:
- QtyOnHand
-
getQtyOnHandForShippingWithASIZero
public static BigDecimal getQtyOnHandForShippingWithASIZero(int M_Product_ID, int M_Warehouse_ID, String trxName)
Get Quantity On Hand of Warehouse that's available for shipping with ASI=0- Parameters:
M_Product_ID
-M_Warehouse_ID
-trxName
-- Returns:
- QtyOnHand
-
getQtyOnHandForLocator
public static BigDecimal getQtyOnHandForLocator(int M_Product_ID, int M_Locator_ID, int M_AttributeSetInstance_ID, String trxName)
Get Quantity On Hand of Locator- Parameters:
M_Product_ID
-M_Locator_ID
-M_AttributeSetInstance_ID
-trxName
-- Returns:
- QtyOnHand
-
getQtyOnHandForLocatorWithASIZero
public static BigDecimal getQtyOnHandForLocatorWithASIZero(int M_Product_ID, int M_Locator_ID, String trxName)
Get Quantity On Hand of Locator wtih ASI=0- Parameters:
M_Product_ID
-M_Locator_ID
-trxName
-- Returns:
- QtyOnHand
-
toString
public String toString()
String Representation- Overrides:
toString
in classX_M_StorageOnHand
- Returns:
- info
-
getDateMaterialPolicy
public static Timestamp getDateMaterialPolicy(int M_Product_ID, int M_AttributeSetInstance_ID, String trxName)
- Parameters:
M_Product_ID
-M_AttributeSetInstance_ID
-trxName
-- Returns:
- datempolicy timestamp
-
-