Class MDistributionRunDetail

    • Constructor Detail

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

      • 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
        Parameters:
        precision - precision (saved)
      • isCanAdjust

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

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

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