How to apply quantity discount