Hi,
First and Foremost Thank you very much for your feedback.
But somehow I am lost trying to understand your reply.
My issue is as follows.
Let’s assume a scenario.
- I do not need to generate Voucher Numbers. We already have them from the system which we have given to the Customers.
Voucher numbers get’s fed through a list.
Ex : V/2021/JAN/0000001 etc.
But for each Vouchers we give Tokens to our customers.
So we need the Token Value for every 10 Vouchers.
Voucher List = [V/2021/JAN/0000001,V/2021/JAN/0000002,V/2021/JAN/0000003,V/2021/JAN/0000004,V/2021/JAN/0000005,V/2021/JAN/0000006,V/2021/JAN/0000007,V/2021/JAN/0000008,V/2021/JAN/0000009,V/2021/JAN/0000010,V/2021/JAN/0000011,V/2021/JAN/0000012,V/2021/JAN/0000013,V/2021/JAN/0000014,V/2021/JAN/0000015,V/2021/JAN/0000016,V/2021/JAN/0000017] …so on,
Every 10 Vouchers I need a Token. Tokens range from 5 USD - 1000 USD. Over 500 Tokens. Imagine 2, 3 gets generated every now and then on a value of 1000 USD? It’s a problem right.
So we want them to work in a sequence we can control it.
So Let’s assume our token List is of 05 for this example.
Token List = [5,10,15,20,25]
So,
every time a voucher goes through count becomes,
Count = Count + 1
and,
if count % 10 == 0 ( which means every 10 Vouchers )
I need a Token.
All I need is to tokens to generate within the given 5, one token at a time instead of two occurrences of 25 USD, But after the 5 tokens had got printed randomly, this has to occur again.
So the final result would be like,
V/2021/JAN/0000001
V/2021/JAN/0000002
V/2021/JAN/0000003
V/2021/JAN/0000004
V/2021/JAN/0000005
V/2021/JAN/0000006
V/2021/JAN/0000007
V/2021/JAN/0000008
V/2021/JAN/0000009
V/2021/JAN/0000010
Now the if count % 10 == 0 kicks in to spit a token ( ONE TOKEN ) out of the 5, I want the 5 to be random but not to have the same one again until 50 Vouchers have gone through,
V/2021/JAN/0000011
V/2021/JAN/0000012
V/2021/JAN/0000013
V/2021/JAN/0000014
V/2021/JAN/0000015
V/2021/JAN/0000016
V/2021/JAN/0000017
V/2021/JAN/0000018
V/2021/JAN/0000019
V/2021/JAN/0000020
Now the if count % 10 == 0 kicks in >>> AGAIN <<< to spit a token ( ONE TOKEN ) out of the 5, But this time I want to avoid the last one for sure.
after Voucher 30, I want to avoid last 02 random occurrence’s.
When the list is empty and nothing is left to generate, I want the List to fill in with all tokens again, which would happen at the Voucher No. 60.
Hope this helps.
Sorry for all the typing.
Thank you again. 