Class MInventoryLineMA

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

public class MInventoryLineMA extends X_M_InventoryLineMA
Material Allocation for Inventory Line
Version:
$Id: MInventoryLineMA.java,v 1.3 2006/07/30 00:51:04 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Constructor Details

    • MInventoryLineMA

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

      public MInventoryLineMA(Properties ctx, int M_InventoryLineMA_ID, String trxName)
      Standard Constructor
      Parameters:
      ctx - context
      M_InventoryLineMA_ID - ignored
      trxName - trx
    • MInventoryLineMA

      public MInventoryLineMA(Properties ctx, ResultSet rs, String trxName)
      Load Constructor
      Parameters:
      ctx - context
      rs - result set
      trxName - trx
    • MInventoryLineMA

      public MInventoryLineMA(MInventoryLine parent, int M_AttributeSetInstance_ID, BigDecimal MovementQty, Timestamp DateMaterialPolicy)
      Parent Constructor
      Parameters:
      parent - parent
      M_AttributeSetInstance_ID - asi
      MovementQty - qty
      DateMaterialPolicy -
    • MInventoryLineMA

      public MInventoryLineMA(MInventoryLine parent, int M_AttributeSetInstance_ID, BigDecimal MovementQty, Timestamp DateMaterialPolicy, boolean isAutoGenerated)
      Parameters:
      parent -
      M_AttributeSetInstance_ID -
      MovementQty -
      DateMaterialPolicy -
      isAutoGenerated - true if auto created by application instead of by user
  • Method Details

    • get

      public static MInventoryLineMA[] get(Properties ctx, int M_InventoryLine_ID, String trxName)
      Get Material Allocations for Line
      Parameters:
      ctx - context
      M_InventoryLine_ID - line
      trxName - trx
      Returns:
      allocations
    • deleteInventoryMA

      public static int deleteInventoryMA(int M_Inventory_ID, String trxName)
      Delete all Material Allocation for Inventory
      Parameters:
      M_Inventory_ID - inventory
      trxName - transaction
      Returns:
      number of rows deleted or -1 for error
    • deleteInventoryLineMA

      public static int deleteInventoryLineMA(int M_InventoryLine_ID, String trxName)
      Delete all Material Allocation for Inventory
      Parameters:
      M_InventoryLine_ID - inventory
      trxName - transaction
      Returns:
      number of rows deleted or -1 for error
    • setDateMaterialPolicy

      public void setDateMaterialPolicy(Timestamp DateMaterialPolicy)
      Description copied from class: X_M_InventoryLineMA
      Set Date Material Policy.
      Specified by:
      setDateMaterialPolicy in interface I_M_InventoryLineMA
      Overrides:
      setDateMaterialPolicy in class X_M_InventoryLineMA
      Parameters:
      DateMaterialPolicy - Time used for LIFO and FIFO Material Policy
    • toString

      public String toString()
      String Representation
      Overrides:
      toString in class X_M_InventoryLineMA
      Returns:
      info
    • addOrCreate

      public static MInventoryLineMA addOrCreate(MInventoryLine line, int M_AttributeSetInstance_ID, BigDecimal MovementQty, Timestamp DateMaterialPolicy)
      Create new MInventoryLineMA or add Movement Qty to existing MInventoryLineMA
      Parameters:
      line -
      M_AttributeSetInstance_ID -
      MovementQty -
      DateMaterialPolicy -
      Returns:
      MInventoryLineMA
    • addOrCreate

      public static MInventoryLineMA addOrCreate(MInventoryLine line, int M_AttributeSetInstance_ID, BigDecimal MovementQty, Timestamp DateMaterialPolicy, boolean isAutoGenerated)
      Create new MInventoryLineMA or add Movement Qty to existing MInventoryLineMA
      Parameters:
      line -
      M_AttributeSetInstance_ID -
      MovementQty -
      DateMaterialPolicy -
      isAutoGenerated -
      Returns:
      MInventoryLineMA
    • getManualQty

      public static BigDecimal getManualQty(int M_MovementLine_ID, String trxName)
      Get total movement qty for LineMA created manually by user
      Parameters:
      M_MovementLine_ID -
      trxName -
      Returns:
      total movement qty from MInventoryLineMA created by user
    • 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