Recurring invoice every month, problem with dateInterval?

Hi All,

I’m using the latest InvoicePlane version (1.4.3) in French language.

I would like to send recurring invoice every month but it looks like dateInterval is not correct.

For example, if the first recurring invoice generated is 06/30/2015, the next one is planned for 07/30/2015 which IMO should be 07/31/2015.

So I change a piece of code in /application/modules/invoices/models/mdl_invoices_recurring.php and modify public function set_next_recur_date like the following :

//      $recur_next_date = increment_date($invoice_recurring->recur_next_date, $invoice_recurring->recur_frequency);

 $recur_next_date = date("Y-m-t", strtotime("next month"));

It’s OK for me with this little mod but I’m a bit surprised that invoicePlane do not take into account the real number of day of each month.

Do I miss something ?

Regards,

If an invoice is scheduled for the 30th of each month why should it be processed on 31th instead?

Maybe you understood this function wrong. It is not “at the end of each month” if you choose the last day of the month, it is “on the exactly same date each month”.

thanks Kovah !
Yes, I’ve probably misunderstood but how does it deal with February ?
And you’re also right, I need to send recurring invoices at the end of each month as this is how it works generally in France for Service providers, clients pay by month, they don’t expect to receive their invoices before the end.
Anyway, my little mod do the trick so there is no issue :wink:
Regards,

2 Likes

yeah, there should be added new option for recuring invoices "last day of month"
now i am always using 1. of month for recuring invoices