I have a service with various packages, that can all be purchased monthly, quarterly, semi-annually, and yearly.
Each package has a due_on date which I increment when someone renews.
It's easy to calculate how much revenue I can roughly expect this month, by checking who has a due_on date this month.
Where I'm running into trouble is calculating how much revenue I can expect each month over the next year. I can't base it on due_on, because some people will be paying 12 times in the next year, and some 6, etc.
What is the best way to do this? Note: for this purpose I am ignoring attrition. I am working in PHP and MySQL, but I'm asking for theory so that shouldn't matter too much.