Good day everyone,
Firstly, great product! Definitely the best out there.
Everything works fine, except for my recurring invoices. I tried using recurring invoices in 1.5.4, but then I saw that there was a bug on not retrieving the taxes correctly, which resulted in an error and said it was scheduled to be fixed in 1.5.5. I have upgraded my version to 1.5.5, but I’m receiving a different error this time:
Undefined property: CI::$mdl_invoice_amounts
It generates a new invoice, but the amount is left 0. Could someone please assist with what I’m doing wrong. I am clicking on Save first before creating the recurring invoice.
Here is the full trace:
Message: Undefined property: CI::$mdl_invoice_amounts
Line Number: 59
Fatal error: Call to a member function calculate() on null in C:\inetpub\invoices\application\modules\invoices\controllers\Cron.php on line 116
A PHP Error was encountered
Message: Call to a member function calculate() on null
Line Number: 116
I 2nd this - as of 1.5.5, recurring invoices are now being generated however, there are no items listed in the invoice.
I’m still running 1.5.4, but my error is a different variable.
Message: Undefined property: CI::$mdl_invoice_tax_rates
Line Number: 77
Sadly this is the second time that I’ve applied an update to InvoicePlane and found recurring invoices to be broken the following month.
I wish this were more thoroughly tested as it’s making me begin to question whether or not to update, which isn’t something I should be asking about my billing software…
Is it possible to roll back to a previous version?
This error was fixed in version 1.5.5.
If I had the time or money to pay someone to do this, I would definitly test more. But I don’t have neither. So it is a task of the community to help test the software and fix bugs.
This is because the model has not been loaded before
Add to file /application/modules/invoices/controllers/Cron.php on line 31
and all will run smoothly
That prevented the CRON errors but now all recurring invoices are empty.
In file /application/modules/invoices/controllers/Cron.php
on line 61
$this->mdl_invoices->copy_invoice($source_id, $target_id, true);
set this to false
$this->mdl_invoices->copy_invoice($source_id, $target_id, false);
on my case it’s work, recurring invoice not empty
Thanks to @smile for his fix. Just test it and it works I just made a Pull Request it should be fix in the next version