Reoccurring expenses dates

[self hosted, v4.1.4]

I’ve noticed that my reoccurring expenses dates are creeping forward each month (they are set to monthly). By result, if I set one up on November 2, 2017, its crept forward by on average a day each month, and is now being debited on May 11, 2018.

This unfortunately does not match any of my venders who will use the day of the month to take their money. Is this because IN is adding 31 days perhaps instead of using the same numbered day each month?

I also noticed a problem with the Profit and Loss report regarding reoccurring expenses, in that they are listed all occurring in one month in the monthly totals table (for the default 3 month report), instead of spread over the multiple months as listed in the breakdown table at the bottom of the report. Forgive me if I am reading the report incorrectly, but I’m expecting each month’s profit/loss to correspond to the months they occurred.

Sorry, we aren’t able to support older releases. Please let us know if you see the problem with our latest version.

I’m not sure I understand your problem with the report, it may help if you can send a marked up screenshot to contact@invoiceninja.com.

Understood. Will await release which fixes empty variable bug, then test again and report back.

Can I just ask that if a cron job is missed and runs the next day, will the next monthly expense occur on that (delayed) day next month, or does it always look back at the day the expense was set up?

I don’t think this is the cause, but I will check the cron log.

Sounds good, we hope to have a new minor release later today.

If the cron is missed it would cause the schedule to be shifted, we create each invoice/expense in relation to the last one created.

Thanks Hillel. If delayed/missed cron is the reason, is there a way to take the expense schedule back to the original day without having to delete and recreate it?

Would prehaps changing the expense day, saving, then setting back to the right day and saving again, reset things?

You can set the start date to the next date the expense should be created.

Thanks for the minor release Hillel (4.4.4).

The profit and loss report issue I mentioned, where the expenses were grouped into one month, even though they occurred over multiple months, is fixed.

The days that the re-occurring expenses runs, I suspect won’t be fixed. I’ll have to wait a month to find out to be sure, but if the code checks the “last_sent_date” of the “recurring_expenses” table, then I expect it won’t realise that is already 11 days from the “start_date”.

The issue may have been caused from the fact the the device I am testing the self hosted version on (on a VM) goes to sleep after some time of activity. It is set to wake 3 minutes before the cron task runs, but I am wondering if that is not enough time for the VM to correct its time, and realise its time to runs its jobs. It appears to work, but perhaps on 11 occassions, it didn’t.

I’ll probably have to wait until this months expenses have all been created, then change the date to the correct one for the next month, as you describe.

Would be nice if there was a feature such as in the recurring invoices where you can pick the 1st/2nd etc day of the month.

Thanks for the feedback!

Feel free to create an issue on our GitHUb repo.

Thanks Hillel. I’ve just created the feature request for adding day of month option to recurring expenses:

https://github.com/invoiceninja/invoiceninja/issues/2161