Hello!
There was a problem with an incorrect calculation of the balance of user accounts.
Basic conditions:
1. I use expired rules on my site
2. Due to the points received, the user can pay for the site services.
Consider this with an example:
First Day 11.01.2019
List of operations:
1. New user has registered on the site and received points according to the NewUser Rule.
11.01.2019 22:15 - Date of operation
NewUserFee - Rule Name
15 - Points
12.01.2019 23.59 - expire date
Account Balance - 15 points
2. Due to the points received, the user paid for the site services
11.01.2019 22:21 - Date of operation
Payment - Rule Name
-15 - Points
no expire date
Account Balance - 0 points
3. User gets points by another rule.
11.01.2019 22:40 - Date of operation
AnyRule - Rule Name
44 - Points
11.02.2019 23.59 - expire date
Account Balance - 44 points
Thus, at the end of the day, the user's balance is 44 points
Second Day 12.01.2019
No account activity
Account Balance - 29 points
The balance automatically decreased by the amount of expired points by NewUserFee Rule.
This is correct, based on the conditions of the rule, but absolutely illogical. The user has already spent these funds.
Do you understand what I'm talking about?
How can this problem be solved?