Avoid passing relations into mailer objectS

This commit is contained in:
David Bomba 2023-03-03 10:56:00 +11:00
parent 30f85d8e23
commit 0828ff9ce6
2 changed files with 3 additions and 4 deletions

View File

@ -22,8 +22,6 @@ class InvoiceFailedEmailNotification
{
use UserNotifies;
public $delay = 7;
public function __construct()
{
}
@ -51,8 +49,8 @@ class InvoiceFailedEmailNotification
unset($methods[$key]);
$nmo = new NinjaMailerObject;
$nmo->mailable = new NinjaMailer((new EntityFailedSendObject($event->invitation, 'invoice', $event->template, $event->message))->build());
$nmo->company = $invoice->company;
$nmo->mailable = new NinjaMailer((new EntityFailedSendObject($event->invitation->withoutRelations(), 'invoice', $event->template, $event->message))->build());
$nmo->company = $invoice->company->withoutRelations();
$nmo->settings = $invoice->company->settings;
$nmo->to_user = $user;

View File

@ -5011,6 +5011,7 @@ $LANG = array(
'add_company_logo' => 'Add Logo',
'add_stripe' => 'Add Stripe',
'invalid_coupon' => 'Invalid Coupon',
'no_assigned_tasks' => 'No billable tasks for this project',
);