How to assign discounts, markups, and quantity changes