Class MDDOrderLine

    • Constructor Detail

      • MDDOrderLine

        public MDDOrderLine​(Properties ctx,
                            int C_OrderLine_ID,
                            String trxName)
        Default Constructor
        Parameters:
        ctx - context
        C_OrderLine_ID - order line to load
        trxName - trx name
      • MDDOrderLine

        public MDDOrderLine​(MDDOrder order)
        Parent Constructor. ol.setM_Product_ID(wbl.getM_Product_ID()); ol.setQtyOrdered(wbl.getQuantity()); ol.setPrice(); ol.setPriceActual(wbl.getPrice()); ol.setTax(); ol.saveEx();
        Parameters:
        order - parent order
      • MDDOrderLine

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

      • getNotReserved

        public static BigDecimal getNotReserved​(Properties ctx,
                                                int M_Locator_ID,
                                                int M_Product_ID,
                                                int M_AttributeSetInstance_ID,
                                                int excludeDD_OrderLine_ID)
        Get Order Unreserved Qty
        Parameters:
        ctx - context
        M_Locator_ID - wh
        M_Product_ID - product
        M_AttributeSetInstance_ID - asi
        excludeDD_OrderLine_ID - exclude DD_OrderLine_ID
        Returns:
        Unreserved Qty
      • setOrder

        public void setOrder​(MDDOrder order)
        Set Defaults from Order. Does not set Parent !!
        Parameters:
        order - order
      • setHeaderInfo

        public void setHeaderInfo​(MDDOrder order)
        Set Header Info
        Parameters:
        order - order
      • getParent

        public MDDOrder getParent()
        Get Parent
        Returns:
        parent
      • 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 - product
        setUOM - set also UOM
      • setM_Product_ID

        public void setM_Product_ID​(int M_Product_ID,
                                    int C_UOM_ID)
        Set Product and UOM
        Parameters:
        M_Product_ID - product
        C_UOM_ID - uom
      • getProduct

        public MProduct getProduct()
        Get Product
        Returns:
        product or null
      • canChangeWarehouse

        public boolean canChangeWarehouse()
        Can Change Warehouse
        Returns:
        true if warehouse can be changed
      • addDescription

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

        public String getDescriptionText()
        Get Description Text. For jsp access (vs. isDescription)
        Returns:
        description
      • getName

        public String getName()
        Get Name
        Returns:
        get the name of the line (from Product)
      • setQty

        public void setQty​(BigDecimal Qty)
        Set Qty Entered/Ordered. Use this Method if the Line UOM is the Product UOM
        Parameters:
        Qty - QtyOrdered/Entered
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Before Save
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord -
        Returns:
        true if it can be sabed
      • beforeDelete

        protected boolean beforeDelete()
        Before Delete
        Overrides:
        beforeDelete in class PO
        Returns:
        true if it can be deleted
      • afterSave

        protected boolean afterSave​(boolean newRecord,
                                    boolean success)
        After Save
        Overrides:
        afterSave in class PO
        Parameters:
        newRecord - new
        success - success
        Returns:
        saved
      • afterDelete

        protected boolean afterDelete​(boolean success)
        After Delete
        Overrides:
        afterDelete in class PO
        Parameters:
        success - success
        Returns:
        deleted
      • getQtyToDeliver

        public BigDecimal getQtyToDeliver()
        Quantity To Deliver
        Returns:
        Quantity To Deliver