Fix math error in computing discount
Merge branch 'coupon_model' into merged