Class DiscountCalculationCodeApplyCmdImpl

  • All Implemented Interfaces:, ECCommand, ECTargetableCommand, TaskCommand,,,,,,,,,


    public class DiscountCalculationCodeApplyCmdImpl
    The default implementation for the discount calculationUsage adds the specified MonetaryAmounts to the total adjustment of the orderItem. Order item adjustments and an order adjustment are also created for each calculation code applied.

    NOTE : Order adjustments can not make the net price of an order item cross the zero boundary. That is, if an order item has a gross price, that is on the opposite side of zero from the resulting net price. (after applying the discount). Then the net price is adjusted to zero and the discount is changed accordingly. Any left-over discount is distributed over the other order items that also qualify for the same discount. The distribution is done in proportion to the original discount. Any order item that has a gross price that is zero can only have a net price (price after applying discounts) that is positive.

    This command calls the following TaskCommands:

    This command uses the following AccessBeans:

    See Also:
    Serialized Form
    • Constructor Detail

      • DiscountCalculationCodeApplyCmdImpl

        public DiscountCalculationCodeApplyCmdImpl()
        DiscountCalculationCodeApplyCmdImpl constructor.
    • Method Detail

      • setCalculationCodeAB

        public void setCalculationCodeAB(CalculationCodeAccessBean calculationCodeAB)
        Set the CalculationCodeAccessBean.
        Specified by:
        setCalculationCodeAB in interface
        calculationCodeAB - A CalculationCodeAccessBean.
      • setOrderItemABHash

        public void setOrderItemABHash(java.util.Hashtable orderItemABHash)
        Set the orderItemABHash.
        Specified by:
        setOrderItemABHash in interface
        orderItemABHash - An orderItemABHash.

        java.util.Hashtable orderItemABHash

        • key: orderItemAB
        • element: monetaryAmount