Class MDDOrderLine

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

public class MDDOrderLine extends X_DD_OrderLine
Order Line Model. MDDOrderLine ol = new MDDOrderLine(m_order); ol.setM_Product_ID(wbl.getM_Product_ID()); ol.setQtyOrdered(wbl.getQuantity()); ol.setPriceActual(wbl.getPrice()); ol.setTax(); ol.saveEx();
Version:
$Id: MOrderLine.java,v 1.6 2006/10/02 05:18:39 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Constructor Details

    • MDDOrderLine

      public MDDOrderLine(Properties ctx, String DD_OrderLine_UU, String trxName)
      UUID based Constructor
      Parameters:
      ctx - Context
      DD_OrderLine_UU - UUID key
      trxName - Transaction
    • 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
    • MDDOrderLine

      public MDDOrderLine(Properties ctx, int DD_OrderLine_ID, String trxName, String... virtualColumns)
  • Method Details

    • 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
    • setM_AttributeSetInstance_ID

      public void setM_AttributeSetInstance_ID(int M_AttributeSetInstance_ID)
      Set M_AttributeSetInstance_ID
      Specified by:
      setM_AttributeSetInstance_ID in interface I_DD_OrderLine
      Overrides:
      setM_AttributeSetInstance_ID in class X_DD_OrderLine
      Parameters:
      M_AttributeSetInstance_ID - id
    • canChangeWarehouse

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

      public int getC_Project_ID()
      Get C_Project_ID
      Specified by:
      getC_Project_ID in interface I_DD_OrderLine
      Overrides:
      getC_Project_ID in class X_DD_OrderLine
      Returns:
      project
    • getC_Activity_ID

      public int getC_Activity_ID()
      Get C_Activity_ID
      Specified by:
      getC_Activity_ID in interface I_DD_OrderLine
      Overrides:
      getC_Activity_ID in class X_DD_OrderLine
      Returns:
      Activity
    • getC_Campaign_ID

      public int getC_Campaign_ID()
      Get C_Campaign_ID
      Specified by:
      getC_Campaign_ID in interface I_DD_OrderLine
      Overrides:
      getC_Campaign_ID in class X_DD_OrderLine
      Returns:
      Campaign
    • getUser1_ID

      public int getUser1_ID()
      Get User2_ID
      Specified by:
      getUser1_ID in interface I_DD_OrderLine
      Overrides:
      getUser1_ID in class X_DD_OrderLine
      Returns:
      User2
    • getUser2_ID

      public int getUser2_ID()
      Get User2_ID
      Specified by:
      getUser2_ID in interface I_DD_OrderLine
      Overrides:
      getUser2_ID in class X_DD_OrderLine
      Returns:
      User2
    • getAD_OrgTrx_ID

      public int getAD_OrgTrx_ID()
      Get AD_OrgTrx_ID
      Specified by:
      getAD_OrgTrx_ID in interface I_DD_OrderLine
      Overrides:
      getAD_OrgTrx_ID in class X_DD_OrderLine
      Returns:
      trx org
    • toString

      public String toString()
      String Representation
      Overrides:
      toString in class X_DD_OrderLine
      Returns:
      info
    • 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)
    • setC_Charge_ID

      public void setC_Charge_ID(int C_Charge_ID)
      Set C_Charge_ID
      Specified by:
      setC_Charge_ID in interface I_DD_OrderLine
      Overrides:
      setC_Charge_ID in class X_DD_OrderLine
      Parameters:
      C_Charge_ID - charge
    • 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
    • setQtyEntered

      public void setQtyEntered(BigDecimal QtyEntered)
      Set Qty Entered - enforce entered UOM
      Specified by:
      setQtyEntered in interface I_DD_OrderLine
      Overrides:
      setQtyEntered in class X_DD_OrderLine
      Parameters:
      QtyEntered -
    • setQtyOrdered

      public void setQtyOrdered(BigDecimal QtyOrdered)
      Set Qty Ordered - enforce Product UOM
      Specified by:
      setQtyOrdered in interface I_DD_OrderLine
      Overrides:
      setQtyOrdered in class X_DD_OrderLine
      Parameters:
      QtyOrdered -
    • 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