Class MStorageReservation

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_M_StorageReservation, I_Persistent, Evaluatee

public class MStorageReservation extends X_M_StorageReservation
Inventory reservation storage model
See Also:
  • Constructor Details

    • MStorageReservation

      public MStorageReservation(Properties ctx, String M_StorageReservation_UU, String trxName)
      UUID based Constructor
      Parameters:
      ctx - Context
      M_StorageReservation_UU - UUID key
      trxName - Transaction
    • MStorageReservation

      public MStorageReservation(Properties ctx, int M_StorageReservation_ID, String trxName)
      Parameters:
      ctx -
      M_StorageReservation_ID -
      trxName -
    • MStorageReservation

      public MStorageReservation(Properties ctx, ResultSet rs, String trxName)
      Parameters:
      ctx -
      rs -
      trxName -
  • Method Details

    • get

      public static MStorageReservation get(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, boolean isSOTrx, String trxName)
      Get Reservation Storage
      Parameters:
      ctx - context
      M_Warehouse_ID - warehouse
      M_Product_ID - product
      M_AttributeSetInstance_ID - instance
      isSOTrx -
      trxName - transaction
      Returns:
      existing MStorageReservation or null
    • get

      public static MStorageReservation[] get(Properties ctx, int m_Warehouse_ID, int m_Product_ID, int i, String trxName)
      Get Reservation Storage for Product on specified Warehouse
      Parameters:
      ctx -
      m_Warehouse_ID -
      m_Product_ID -
      i - not use
      trxName -
      Returns:
      array of MStorageReservation
    • getOfProduct

      public static MStorageReservation[] getOfProduct(Properties ctx, int M_Product_ID, String trxName)
      Get Reservation Storage for Product across warehouses
      Parameters:
      ctx - context
      M_Product_ID - product
      trxName - transaction
      Returns:
      array of MStorageReservation
    • getQty

      public static BigDecimal getQty(int M_Product_ID, int M_Warehouse_ID, int M_AttributeSetInstance_ID, boolean isSOTrx, String trxName)
      Get Quantity Reserved/Ordered of Warehouse
      Parameters:
      M_Product_ID -
      M_Warehouse_ID -
      M_AttributeSetInstance_ID - M_AttributeSetInstance_ID filter if > 0
      isSOTrx - - true to get reserved, false to get ordered
      trxName -
      Returns:
      quantity reserved/ordered
    • getQtyAvailable

      public static BigDecimal getQtyAvailable(int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, String trxName)
      Get Available Qty (On Hand - Reserved)
      Parameters:
      M_Warehouse_ID - wh
      M_Product_ID - product
      M_AttributeSetInstance_ID - masi
      trxName - transaction
      Returns:
      qty available (QtyOnHand-QtyReserved)
    • add

      @Deprecated public static boolean add(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, BigDecimal diffQty, boolean isSOTrx, String trxName)
      Deprecated.
      Parameters:
      ctx -
      M_Warehouse_ID -
      M_Product_ID -
      M_AttributeSetInstance_ID -
      diffQty -
      isSOTrx -
      trxName -
      Returns:
      true if ok
    • add

      public static boolean add(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, BigDecimal diffQty, boolean isSOTrx, String trxName, IReservationTracer tracer)
      Add diffQty to quantity reserved/ordered
      Parameters:
      ctx -
      M_Warehouse_ID -
      M_Product_ID -
      M_AttributeSetInstance_ID -
      diffQty - difference to add to quantity reserved/ordered
      isSOTrx - true for quantity reserved, false for quantity ordered
      trxName -
      tracer -
      Returns:
      true if ok
    • addQty

      @Deprecated public void addQty(BigDecimal addition)
      Deprecated.
      Add quantity on hand directly - not using cached value - solving IDEMPIERE-2629
      Parameters:
      addition -
    • addQty

      public void addQty(BigDecimal addition, IReservationTracer tracer)
      Add addition to Qty of this record using direct SQL - not using cached value - solving IDEMPIERE-2629
      Parameters:
      addition -
    • add

      @Deprecated public static boolean add(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, int reservationAttributeSetInstance_ID, BigDecimal diffQty, boolean isSOTrx, String trxName)
      Deprecated.
      Update Reservation Storage Called from MProjectIssue
      Parameters:
      ctx - context
      M_Warehouse_ID - warehouse
      M_Product_ID - product
      M_AttributeSetInstance_ID - AS Instance
      reservationAttributeSetInstance_ID - reservation AS Instance
      diffQty - add
      isSOTrx -
      trxName - transaction
      Returns:
      true if updated
    • getCreate

      public static MStorageReservation getCreate(Properties ctx, int M_Warehouse_ID, int M_Product_ID, int M_AttributeSetInstance_ID, boolean isSOTrx, String trxName)
      Create or Get Reservation Storage
      Parameters:
      ctx - context
      M_Warehouse_ID -
      M_Product_ID - product
      M_AttributeSetInstance_ID - instance
      isSOTrx - true for quantity reserved, false for quantity ordered
      trxName - transaction
      Returns:
      existing or new MStorageReservation
    • toString

      public String toString()
      String Representation
      Overrides:
      toString in class X_M_StorageReservation
      Returns:
      info