I have the requirement to create invoices for a number of customers of an application on a monthly basis.
I have all the transaction data in the database (hopefully all the time).
The question is, is it generally better to generate the invoices once a month with some sort of cron, or to generate the invoice from the stored data when the user requests it, if they request it all?
There's pros and cons to both (for instance, changeable tax rates), but what's the general opinion on the best way to do this?