Fixed issue with coupons being used as credits for customers.

Code tidy with vars