Heres a tutorial i did, it will automatically add the discount when the customers card is swiped. I have changed this setup slightly now due to having lots of rules involving numberpad input. I now have a discount menu that opens up different option, one being customer discount, so i now press customer discount button then swipe the card so you could adapt if needed but this should give you an idea