FSM - Synergy Lunches / Daily top Up Service
SynergyThere's a DailyTopup service, which needs to run daily and add payments with configured amount per diner.
The settings of the service:
- EXECUTION_HOUR and EXECUTION_MINUTE - the hour and minute when the process need to run daily. E.g EXECUTION_HOUR = 7 and EXECUTION_MINUTE = 0 means it will run daily at 7:00 AM
- CHECK_TIMETABLES - If True, then service checks if a diner has a timetabled lesson for the day, and add payment only if they have. So, for this case it needs to be False
- RESET_PREVIOUS_DAY - If True, adjusts the diner's balance to deduct the remainder of a daily topup, if they had a fixed topup received for previous day. So, in this case it needs to be True so that fixed topups are not accumulated. This applies only to positive balances.
When the process runs, all diners which have the Fixed Daily Topup flag enabled will be looked up, and their corresponding Fixed Topup Amount will be added as a payment, to populate their balance.