I have a invoicing system that generates the next due date after the invoice is paid. My problem though is I want to generate the next invoice based on the date the last one was due, not when it was paid.
I'm familiar with adding days to the current date such as this:
$nextduedate = date('Y-m-d', strtotime("+30 days"));
Lets say the invoice was due on 2016-05-08 but it was paid on 2016-05-12
How would I get the system to add 30 days to my variable $dueDate
which is being pulled from the database and set the next invoices due date 30 days from the prior?