Creating billing cycles

Discussion in 'Programming' started by Triexa, Nov 27, 2008.

  1. #1
    So I've never created a program that has needed this, but I now need to have monthly billing cycles - where each user is on their own cycle.

    My original thought was to store the day number they signed up, but that would screw up if they signed up on the 31st... would be free many months :)

    My next thought was to store a last_billed, then bill those who's last_billed > 30 days... Is this the best/"standard" way to do it, or am I missing the obvious?

    Though not used currently, would be nice to also keep in mind that not all customers will always be billed monthly
     
    Triexa, Nov 27, 2008 IP