Class MInventoryLine

    • Field Detail

      • m_product

        protected MProduct m_product
        Product
    • Constructor Detail

      • MInventoryLine

        public MInventoryLine​(Properties ctx,
                              int M_InventoryLine_ID,
                              String trxName)
        Default Constructor
        Parameters:
        ctx - context
        M_InventoryLine_ID - line
        trxName - transaction
      • MInventoryLine

        public MInventoryLine​(Properties ctx,
                              ResultSet rs,
                              String trxName)
        Load Constructor
        Parameters:
        ctx - context
        rs - result set
        trxName - transaction
      • MInventoryLine

        public MInventoryLine​(MInventory inventory,
                              int M_Locator_ID,
                              int M_Product_ID,
                              int M_AttributeSetInstance_ID,
                              BigDecimal QtyBook,
                              BigDecimal QtyCount,
                              BigDecimal QtyInternalUse)
        Detail Constructor. Locator/Product/AttributeSetInstance must be unique
        Parameters:
        inventory - parent
        M_Locator_ID - locator
        M_Product_ID - product
        M_AttributeSetInstance_ID - instance
        QtyBook - book value
        QtyCount - count value
        QtyInternalUse - internal use value
      • MInventoryLine

        public MInventoryLine​(MInventory inventory,
                              int M_Locator_ID,
                              int M_Product_ID,
                              int M_AttributeSetInstance_ID,
                              BigDecimal QtyBook,
                              BigDecimal QtyCount)
      • MInventoryLine

        public MInventoryLine​(MInventoryLine copy)
        Parameters:
        copy -
    • Method Detail

      • get

        public static MInventoryLine get​(MInventory inventory,
                                         int M_Locator_ID,
                                         int M_Product_ID,
                                         int M_AttributeSetInstance_ID)
        Get Inventory Line with parameters
        Parameters:
        inventory - inventory
        M_Locator_ID - locator
        M_Product_ID - product
        M_AttributeSetInstance_ID - asi
        Returns:
        line or null
      • getProduct

        public MProduct getProduct()
        Get Product
        Returns:
        product or null if not defined
      • addDescription

        public void addDescription​(String description)
        Add to Description
        Parameters:
        description - text
      • setParent

        protected void setParent​(MInventory parent)
        Get Parent
        Parameters:
        parent - parent
      • getParent

        public MInventory getParent()
        Get Parent
        Returns:
        parent
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Before Save
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new
        Returns:
        true if can be saved
      • isInternalUseInventory

        public boolean isInternalUseInventory()
        Is Internal Use Inventory
        Returns:
        true if is internal use inventory
      • getMovementQty

        public BigDecimal getMovementQty()
        Get Movement Qty (absolute value)
      • negative value means outgoing trx
      • positive value means incoming trx
Returns:
movement qty