Restrict reminders to paid accounts on hosted

This commit is contained in:
David Bomba 2022-04-15 11:17:29 +10:00
parent 3887859464
commit cf1b790786

View File

@ -84,7 +84,7 @@ class ReminderJob implements ShouldQueue
//check if this reminder needs to be emailed //check if this reminder needs to be emailed
//15-01-2022 - insert addition if block if send_reminders is definitely set //15-01-2022 - insert addition if block if send_reminders is definitely set
if(in_array($reminder_template, ['reminder1','reminder2','reminder3','reminder_endless']) && $invoice->client->getSetting("enable_".$reminder_template) && $invoice->client->getSetting("send_reminders") && $invoice->company->account->isPaid()) if(in_array($reminder_template, ['reminder1','reminder2','reminder3','reminder_endless']) && $invoice->client->getSetting("enable_".$reminder_template) && $invoice->client->getSetting("send_reminders") && $invoice->company->account->isPaidHostedClient())
{ {
$invoice->invitations->each(function ($invitation) use ($invoice, $reminder_template) { $invoice->invitations->each(function ($invitation) use ($invoice, $reminder_template) {
EmailEntity::dispatch($invitation, $invitation->company, $reminder_template); EmailEntity::dispatch($invitation, $invitation->company, $reminder_template);