Class MInOutLine

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

public class MInOutLine extends X_M_InOutLine
InOut Line
Version:
$Id: MInOutLine.java,v 1.5 2006/07/30 00:51:03 jjanke Exp $
Author:
Jorg Janke, Teo Sarca, www.arhipac.ro
  • BF [ 2784194 ] Check Warehouse-Locator conflict https://sourceforge.net/p/adempiere/bugs/1871/
  • See Also:
    • Constructor Details

      • MInOutLine

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

        public MInOutLine(Properties ctx, int M_InOutLine_ID, String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        M_InOutLine_ID - id
        trxName - trx name
      • MInOutLine

        public MInOutLine(Properties ctx, int M_InOutLine_ID, String trxName, String... virtualColumns)
        Parameters:
        ctx -
        M_InOutLine_ID -
        trxName -
        virtualColumns -
      • MInOutLine

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

        public MInOutLine(MInOut inout)
        Parent Constructor
        Parameters:
        inout - parent
    • Method Details

      • getOfProduct

        public static MInOutLine[] getOfProduct(Properties ctx, int M_Product_ID, String where, String trxName)
        Get Shipment/Receipt lines Of Product
        Parameters:
        ctx - context
        M_Product_ID - product
        where - optional addition where clause
        trxName - transaction
        Returns:
        array of shipment/receipt lines
      • getOfOrderLine

        public static MInOutLine[] getOfOrderLine(Properties ctx, int C_OrderLine_ID, String where, String trxName)
        Get Shipment/Receipt lines Of Order Line
        Parameters:
        ctx - context
        C_OrderLine_ID - line
        where - optional addition where clause
        trxName - transaction
        Returns:
        array of shipment/receipt lines
      • getOfRMALine

        public static MInOutLine[] getOfRMALine(Properties ctx, int M_RMALine_ID, String where, String trxName)
        Get shipment/receipt lines Of RMA Line
        Parameters:
        ctx - context
        M_RMALine_ID - line
        where - optional addition where clause
        trxName - transaction
        Returns:
        array of shipment/receipt lines
      • get

        public static MInOutLine[] get(Properties ctx, int C_OrderLine_ID, String trxName)
        Get shipment/receipt lines Of Order Line
        Parameters:
        ctx - context
        C_OrderLine_ID - line
        trxName - transaction
        Returns:
        array of shipment/receipt lines
      • getParent

        public MInOut getParent()
        Get Parent
        Returns:
        parent
      • setOrderLine

        public void setOrderLine(MOrderLine oLine, int M_Locator_ID, BigDecimal Qty)
        Set Order Line. Does not set Quantity!
        Parameters:
        oLine - order line
        M_Locator_ID - optional locator id
        Qty - used to find locator if M_Locator_ID parameter is 0
      • setInvoiceLine

        public void setInvoiceLine(MInvoiceLine iLine, int M_Locator_ID, BigDecimal Qty)
        Set Invoice Line. Does not set Quantity!
        Parameters:
        iLine - invoice line
        M_Locator_ID - optional locator id
        Qty - used to find locator if M_Locator_ID parameter is 0
      • getM_Warehouse_ID

        public int getM_Warehouse_ID()
        Get Warehouse
        Returns:
        Returns the m_Warehouse_ID.
      • setM_Warehouse_ID

        public void setM_Warehouse_ID(int warehouse_ID)
        Set Warehouse
        Parameters:
        warehouse_ID - The m_Warehouse_ID to set.
      • setM_Locator_ID

        public void setM_Locator_ID(int M_Locator_ID)
        Set M_Locator_ID. Throw IllegalArgumentException if M_Locator_ID < 0.
        Specified by:
        setM_Locator_ID in interface I_M_InOutLine
        Overrides:
        setM_Locator_ID in class X_M_InOutLine
        Parameters:
        M_Locator_ID - id
      • setM_Locator_ID

        public void setM_Locator_ID(BigDecimal Qty)
        Set (default) Locator based on qty. Assumes Warehouse is set.
        Parameters:
        Qty - quantity
      • setQty

        public void setQty(BigDecimal Qty)
        Set Entered and Movement Qty
        Parameters:
        Qty - Entered/Movement Qty
      • setQtyEntered

        public void setQtyEntered(BigDecimal QtyEntered)
        Set Qty Entered - enforce UOM precision
        Specified by:
        setQtyEntered in interface I_M_InOutLine
        Overrides:
        setQtyEntered in class X_M_InOutLine
        Parameters:
        QtyEntered -
      • setMovementQty

        public void setMovementQty(BigDecimal MovementQty)
        Set Movement Qty - enforce Product UOM precision
        Specified by:
        setMovementQty in interface I_M_InOutLine
        Overrides:
        setMovementQty in class X_M_InOutLine
        Parameters:
        MovementQty -
      • getProduct

        public MProduct getProduct()
        Get Product
        Returns:
        product or null
      • 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 - true to also set UOM from product
      • 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
      • addDescription

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

        public int getC_Project_ID()
        Get C_Project_ID
        Specified by:
        getC_Project_ID in interface I_M_InOutLine
        Overrides:
        getC_Project_ID in class X_M_InOutLine
        Returns:
        C_Project_ID
      • getC_Activity_ID

        public int getC_Activity_ID()
        Get C_Activity_ID
        Specified by:
        getC_Activity_ID in interface I_M_InOutLine
        Overrides:
        getC_Activity_ID in class X_M_InOutLine
        Returns:
        C_Activity_ID
      • getC_Campaign_ID

        public int getC_Campaign_ID()
        Get C_Campaign_ID
        Specified by:
        getC_Campaign_ID in interface I_M_InOutLine
        Overrides:
        getC_Campaign_ID in class X_M_InOutLine
        Returns:
        C_Campaign_ID
      • getUser1_ID

        public int getUser1_ID()
        Get User1_ID
        Specified by:
        getUser1_ID in interface I_M_InOutLine
        Overrides:
        getUser1_ID in class X_M_InOutLine
        Returns:
        User1_ID
      • getUser2_ID

        public int getUser2_ID()
        Get User2_ID
        Specified by:
        getUser2_ID in interface I_M_InOutLine
        Overrides:
        getUser2_ID in class X_M_InOutLine
        Returns:
        User2_ID
      • getAD_OrgTrx_ID

        public int getAD_OrgTrx_ID()
        Get AD_OrgTrx_ID
        Specified by:
        getAD_OrgTrx_ID in interface I_M_InOutLine
        Overrides:
        getAD_OrgTrx_ID in class X_M_InOutLine
        Returns:
        AD_OrgTrx_ID
      • beforeSave

        protected boolean beforeSave(boolean newRecord)
        Description copied from class: PO
        Called before Save for Pre-Save Operation.
        Default implementation is nop, to be implemented in sub-classes that needed it.
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - true if it is a new record
        Returns:
        true if record can be saved
      • beforeDelete

        protected boolean beforeDelete()
        Description copied from class: PO
        Execute before Delete operations.
        Default implementation is nop, to be implemented in sub-classes that needed it.
        Overrides:
        beforeDelete in class PO
        Returns:
        true if record can be deleted
      • toString

        public String toString()
        String Representation
        Overrides:
        toString in class X_M_InOutLine
        Returns:
        info
      • getBase

        public BigDecimal getBase(String CostDistribution)
        Get Base value for Cost Distribution
        Parameters:
        CostDistribution - cost Distribution (MLandedCost.LANDEDCOSTDISTRIBUTION_*)
        Returns:
        base number
      • sameOrderLineUOM

        public boolean sameOrderLineUOM()
        Returns:
        true if has same UOM with order line
      • matchToInvoiceLine

        public boolean matchToInvoiceLine(int C_InvoiceLine_ID, BigDecimal qty)
        Match this material receipt line with invoice line
        Parameters:
        C_InvoiceLine_ID -
        qty -
        Returns:
        true if matching is ok
      • matchToOrderLine

        public boolean matchToOrderLine(int C_OrderLine_ID, BigDecimal qty)
        Match this material receipt line with order line
        Parameters:
        C_OrderLine_ID -
        qty -
        Returns:
        true if matching is ok