modified the discount amount calculation
test
Revert "test"

This reverts commit 43c70b76e725e5b4effc4b4830d5c31174f2f61a, reversing
changes made to 16dbd568864d820b3f483013b13dfa24687324fe.