Class MDistributionRunDetail

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

public class MDistributionRunDetail extends X_T_DistributionRunDetail
Material Distribution Run Detail.
Note: feature not fully implemented and have been marked as inactive in application dictionary.
Version:
$Id: MDistributionRunDetail.java,v 1.3 2006/07/30 00:51:02 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Constructor Details

    • MDistributionRunDetail

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

      public MDistributionRunDetail(Properties ctx, int T_DistributionRunDetail_ID, String trxName)
      Standard Constructor
      Parameters:
      ctx - context
      T_DistributionRunDetail_ID - id
      trxName - trx
    • MDistributionRunDetail

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

    • get

      public static MDistributionRunDetail[] get(Properties ctx, int M_DistributionRun_ID, boolean orderBP, String trxName)
      Get Distribution Dun details
      Parameters:
      ctx - context
      M_DistributionRun_ID - id
      orderBP - if true ordered by Business Partner otherwise Run Line
      trxName - transaction
      Returns:
      array of details
    • round

      public void round(int precision)
      Round MinQty and Qty (RoundingMode.HALF_UP) and save to DB
      Parameters:
      precision - rounding precision
    • isCanAdjust

      public boolean isCanAdjust()
      can adjust Allocation Qty ?
      Returns:
      true if qty > min
    • getActualAllocation

      public BigDecimal getActualAllocation()
      Get Actual Allocation Qty
      Returns:
      the greater of min and qty
    • adjustQty

      public BigDecimal adjustQty(BigDecimal difference)
      Adjust the Quantity maintaining UOM precision
      Parameters:
      difference - difference
      Returns:
      remaining difference (because under Min or rounding)
    • toString

      public String toString()
      String Representation
      Overrides:
      toString in class X_T_DistributionRunDetail
      Returns:
      info