Class MInOutLineMA

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

public class MInOutLineMA extends X_M_InOutLineMA
Shipment/Receipt Material Allocation
Version:
$Id: MInOutLineMA.java,v 1.3 2006/07/30 00:51:02 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Constructor Details

    • MInOutLineMA

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

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

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

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

      public MInOutLineMA(MInOutLine 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 MInOutLineMA[] get(Properties ctx, int M_InOutLine_ID, String trxName)
      Get Material Allocations for Line
      Parameters:
      ctx - context
      M_InOutLine_ID - line
      trxName - trx
      Returns:
      allocations
    • deleteInOutMA

      public static int deleteInOutMA(int M_InOut_ID, String trxName)
      Delete all Material Allocation for InOut
      Parameters:
      M_InOut_ID - shipment
      trxName - transaction
      Returns:
      number of rows deleted or -1 for error
    • deleteInOutLineMA

      public static int deleteInOutLineMA(int M_InOutLine_ID, String trxName)
      Delete all Material Allocation for InOutLine
      Parameters:
      M_InOutLine_ID - Shipment Line
      trxName - transaction
      Returns:
      number of rows deleted or -1 for error
    • setDateMaterialPolicy

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

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

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

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

      public static BigDecimal getManualQty(int M_InOutLine_ID, String trxName)
      Get total movement qty for LineMA created manually by user
      Parameters:
      M_InOutLine_ID -
      trxName -
      Returns:
      total movement qty from M_InOutLineMA created by user
    • getNonReturned

      public static MInOutLineMA[] getNonReturned(Properties ctx, int M_InOutLine_ID, String trxName)
      Get Material Allocations from shipment which is not returned (returnedQty)
      Parameters:
      ctx - context
      M_InOutLine_ID - line
      trxName - trx
      Returns:
      allocations
    • getM_InOutLine

      public MInOutLine getM_InOutLine() throws RuntimeException
      Specified by:
      getM_InOutLine in interface I_M_InOutLineMA
      Overrides:
      getM_InOutLine in class X_M_InOutLineMA
      Throws:
      RuntimeException
    • beforeSave

      protected boolean beforeSave(boolean newRecord)
      Before Save
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - new
      Returns:
      save