ten24/Slatwall — pull request #978 by venable (2013-01-07 03:35:30+00:00)
Title: Fixing Promotion Minimum Item Quantity issue

Promotion minimum item quantity is not applied properly. The code was dividing the qualifierCount by the minimumItemQuantity, which resulted in the discount only being applied to 1/minimumItemQuantity items.

For example, for item price $1.00, Minimum Item Quantity of 2 and discount of 10%:
- It properly does not discount qty 1 (Price=$1.00)
- It improperly discounts qty 2 (Price=$0.90=$1.00-(($1.00*.1)*int(2/2))
- It improperly discounts qty 3 because of the division in line 706 (Price=$0.90=$1.00-(($1.00*.1)*int(3/2))
- It improperly discounts qty 4 because of the division in line 706 (Price=$0.80=$1.00-(($1.00*.1)*int(4/2))

The fix leaves the qualifierCount alone unless a MinimumItemQuantity is defined and the qualifierCount is less than the MinimumItemQuantity. It then subtracts the Minimum Item Quantity from the qualifierCount to make sure that Order Item Quantities below the minimum are not discounted.