Class MStorageReservation

    • Constructor Detail

      • MStorageReservation

        public MStorageReservation​(Properties ctx,
                                   int M_StorageReservation_ID,
                                   String trxName)
    • Method Detail

      • get

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

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

        public static MStorageReservation[] getOfProduct​(Properties ctx,
                                                         int M_Product_ID,
                                                         String trxName)
        Get Storage Info for Product across warehouses
        Parameters:
        ctx - context
        M_Product_ID - product
        trxName - transaction
        Returns:
        existing or null
      • 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 -
        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. The call is accurate only if there is a storage record and assumes that the product is stocked
        Parameters:
        M_Warehouse_ID - wh
        M_Product_ID - product
        M_AttributeSetInstance_ID - masi
        trxName - transaction
        Returns:
        qty available (QtyOnHand-QtyReserved) or null
      • 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)
        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)
        Parameters:
        ctx -
        M_Warehouse_ID -
        M_Product_ID -
        M_AttributeSetInstance_ID -
        diffQty -
        isSOTrx -
        trxName -
        tracer -
        Returns:
        true if ok
      • addQty

        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 quantity on hand directly - 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 Storage Info add. 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 Storage Info
        Parameters:
        ctx - context
        M_Warehouse_ID -
        M_Product_ID - product
        M_AttributeSetInstance_ID - instance
        isSOTrx -
        trxName - transaction
        Returns:
        existing/new or null