Did the Customer already have a previous code set prior to using the referal code?

Did you check the date ranges that you are checking?

What shows in the Customer ... Customer ... when you edit their accounts?