Invoice reminders not working

Hi,

System is sending emails for new and recurring invoices, but no reminders are sent.

The reminders are all setup as:
First reminder - 3 days before due date (Send email checked)
Second reminder - 1 day after the due date (send email checked)
Third reminder - 7 days after the due date (send email checked), plus late fee too

I am not familiar with Lavrael, so I am not really sure what information you need here.
Crontab for the Apache user(www-data) is set as:
0 4 * * * php /var/www/ninja/artisan config:clear
1 4 * * * php /var/www/ninja/artisan optimize
*/5 * * * * php -d register_argc_argv=On /var/www/ninja/artisan schedule:run

And I can confirm the cron is running normally.

This is the part of .env that I think may be relevand.
BROADCAST_DRIVER=log
LOG_CHANNEL=stack
CACHE_DRIVER=file
QUEUE_CONNECTION=database
#QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

I will be grateful for any help on the matter.

Thank you.

Hi,

Is the next send date set correctly? You can check by adding the column to the invoice table.

Hi Hillel,

Are you talking about the recurring invoices? This is working fine. New invoices are created when comes to the next send date. The problem is in the reminders of the existing invoices and in the auto billing too.

For example, this is what I have set for the first reminder.

When you enable a reminder it sets the next send date on the invoice. By checking if the next send date is correct it may help track down where the problem is.

Hi Hillel,

I am not entirely sure If I understood you, or perhaps is the other way around.

Recurring invoices
Some recurring invoices are set for every week, some for every month and some for every year. They all work fine. The date arrives and when I see the new invoices and the system is automatically sending the new invoices at the time of creation.

Reminders
There are 4 reminders set,
3 days before the due date.
1 day after the due date
7 days after the due date plus an addition of a late fee payment.
None of the reminders are working. I only noticed because the late fee payment wasn’t being applies to the invoices and most people wasn’t paying on time.

I have no idea what is not working, but I suspect it is like this since I did update to the version 5.5.2
It is running on PHP 8.1

Thank you.

If you add the next sent date column to the invoice table you can see if the value is set correctly or not.

Okay, I have now understood your reply.

I didn’t know about the existence of this column or what I could change it.

I have just added it and it is showing as below.

It is all as expected, but when I check the activity of any invoice, there is no history of reminders been sent.
image

This history above, is from a test invoice I made on the 24/9/2022, so far I only have received the initial email. Exactly what the history says.

Thank you.

Thanks, that’s helpful!

@david any thoughts?

one thing to check is that send reminders is enabled on the client and also that on the reminder itself Send Email is enabled.

I don’t see the “send reminder” setting. We want to make sure reminders are suspended until the new install’s data import is thoroughly vetted.

I see the reminder “edit” function, but I cannot seem to find the “turn off” function.

THx

@katycomputer

The send reminder setting can be found on the main edit client page:

1 Like

Interesting… I have never noticed it.
If we leave it not set. What is the default behavior?

@Danilo

When it is left unset, the system will use the company defaults. You can consider the client setting an override that takes precendence over all other settings.

I am having trouble finding the invoice reminder setting in company defaults, what am I missing?

If you select one of the reminder email templates you’ll see the relevant settings.

Something is wrong, invoice # R2569 is dated 4/1/23, due 4/16/23, when I check activity, no reminder emails were generated.

Client Reminders is blank so system settings should rule the day

First reminder is set for 7 days after due

What am I missing?

Perhaps my cron jobs are misconfigured.

@katycomputer

In the database, if you find this invoice, inspect what the next_send_date field has as the value for the date/time.

next_send_date: 2023-05-16 12:00:00

When I manually sent the invoice, on 4/3, it may have advanced next_send_date, however, I am not sure why no reminders went between 4/3 and 5/8 when I manually sent a reminder.

If you manually send a reminder that reminder will not “resend” again.

Recurring invoices fail to send.

Since migrating to v5, recurring invoices have failed to send, resulting in customers calling to say “you charged my credit card, where is the invoice”, and billed customers failing to remit payment due to a lack of invoice. It has been a frustrating few months.

I think I found the issue, we’ll know for sure on Saturday when quite a few recurring invoices are generated.

Information:
.env setup:
PDF_GENERATOR=snappdf
SNAPPDF_CHROMIUM_PATH=/usr/bin/google-chrome
SNAPPDF_EXECUTABLE_PATH=/usr/bin/google-chrome

/public_html/storage/logs/laravel.log errors:
[2023-06-28 12:00:02] production.ERROR: Unable to generate the raw PDF {“exception”:"[object] (App\Exceptions\FilePermissionsFailure(code: 0): Unable to generate the raw PDF at /home/katybill/public_html/app/Jobs/Entity/CreateRawPdf.php:208)

I was able to heal things with these two commands:
chmod +x /home/katybill/public_html/vendor/bin/snappdf
/home/katybill/public_html/vendor/bin/snappdf download