danialazri 0 Newbie Poster

I have a situation where that i want to make a system where i can generate multiple unique number for lucky number. Example :

Name: John
Resit Amount : $50
Lucky Number : 1000 , 1001 , 1002 , 1003, 1004

John bought something that is $50. For every $10,he will get 1 lucky number. So if he bought $50,he will get 5 lucky numbers.

Name: Matt
Resit Amount : $20
Lucky Number : 1005, 1006

Then Matt bought something that is $20. So if he bought $20, he will get 2 lucky numbers that the Lucky Number is different from John's.