This morning my invoice ninja installation was automatically updated to 3.9 (at 08:00 with a cronjob).
Al 10:55, I have a cronjob running for checking the recurring invoices. I have set yearly recurring invoices at the following dates (dd-mm-YYYY):
Al those invoice are send today, at 13-11-2017 to my customers. There is also one monthly invoice, this one has not been send today.
My administration is now pretty f*cked up and my customers received invoices they should not receive.
Why are these invoices send today? Has it something todo with the update?
Sorry for the trouble!
It seems likely it’s related to the update. Can you send me the results of this SQL query:
select * from frequencies;
Is the frequency recurrence listed correct in the list and details views?
Also, do you know if the app was used after the update/before it sent the invoices?
I believe the cron requires the users to access the site to complete the upgrade, it may explain the problem.
SELECT * FROM frequencies;
2 Two weeks
3 Four weeks
5 Two months
6 Three months
7 Four months
8 Six months
The app was not used after the update / before it sent the invoices.
Thanks, I think I understand the problem.
In this release we added a four month frequency which required shifting the frequency ids. Since the app wasn’t used the cache wasn’t cleared so the app thought the invoices should be sent every 6 months.
You should be able to prevent this from happening in the future by using the updated version of the script which will loads /update to complete the upgrade.
Oke thx, but where is the updated version? Can’t find the full example of the update script in the link you posted.
It’s the same link, the script has been updated to include a call to /update at the end.
Tnx for the quick reply.
Updated the script, but now I’m getting some strange output:
: invalid option
Fixed, my mistake. I had wrong line endings by copy and pasting the code!
I hate auto updates, much prefer manually doing it when all my open invoices and other critical items have been cleared. Is there a way to make sure we don’t have these issues without the auto update script? I assumed calling the /update page worked out all these update requirements no?
You should just need to login to the app after updating the codebase.