I have an insurance-like app where members have to pay annual due. How to automatically insert annual due to all members so that I can track members who have Unpaid, Pending, and Paid annual dues? I have tried comparing the year of the last annual due payment and the current year so that if the member opens my app and my app detects that current year > last annual due payment, a new annual due will be inserted to that member with the status of Unpaid. My problem is that what if the user set the current year to be always equal to the current year?
CodePudding user response:
I have an insurance-like app where members have to pay annual due. How to automatically insert annual due to all members so that I can track members who have Unpaid, Pending, and Paid annual dues?
The best option that you have, is to use Cloud Scheduler, which allows you to schedule HTTP requests or Cloud Pub/Sub messages to Cloud Functions that you deploy. So basically you need to create functions that will automatically insert annual due to all members. To logic inside these functions should be created according to your needs.