Hi,
My self hosted Invoice Ninja isn’t sending recurring invoices.
Here is what I get when I run the cron: php /path/ninja/artisan ninja:send-recurring
In Invoice.php line 400:
Attempt to read property “id” on null
Looks like the problem is on app/Models/Invoice.php, which have the following function:
399 if (! Storage::exists($this->client->invoice_filepath().$this->numberFormatter().’.pdf’)) {
400 event(new InvoiceWasUpdated($this, $this->company, Ninja::eventVars(auth()->user()->id)));
401 CreateEntityPdf::dispatchNow($invitation);
402 }
Any ideas on how to solve it? I have no problem sending e-mails from the Invoices. The problem is only in the recurring.
I am not sure if it is related, but when I run: /usr/bin/php /var/www/ninja/artisan ninja:check-data
I get
2021-04-26 03:50:33 2021-04-26 03:50:33 Running CheckData…
2021-04-26 03:50:34 0 clients with incorrect balances
2021-04-26 03:50:34 0 clients with incorrect invoice balances
2021-04-26 03:50:35 0 clients with incorrect paid to dates
2021-04-26 03:50:35 0 clients with incorrect client balances
2021-04-26 03:50:35 0 contacts without a contact_key
2021-04-26 03:50:35 0 clients without any contacts
2021-04-26 03:50:35 0 clients without a single primary contact
2021-04-26 03:50:35 3 activities records with incorrect client company id
2021-04-26 03:50:35 3 invoices records with incorrect client company id
2021-04-26 03:50:35 0 users with duplicate oauth ids
2021-04-26 03:50:35 Done: FAILURE
Any help will be very much appreciated.