diff --git a/app/Jobs/User/UserEmailChanged.php b/app/Jobs/User/UserEmailChanged.php index 8043d4e2232c..bed3e12cca47 100644 --- a/app/Jobs/User/UserEmailChanged.php +++ b/app/Jobs/User/UserEmailChanged.php @@ -93,6 +93,7 @@ class UserEmailChanged extends BaseMailerJob implements ShouldQueue 'signature' => $this->company->owner()->signature, 'logo' => $this->company->present()->logo(), 'settings' => $this->settings, + 'whitelabel' => $this->client->user->account->isPaid() ? true : false, ]; } } diff --git a/app/Listeners/Invoice/InvoiceEmailedNotification.php b/app/Listeners/Invoice/InvoiceEmailedNotification.php index 21b2348bed4a..73d2a862adc1 100644 --- a/app/Listeners/Invoice/InvoiceEmailedNotification.php +++ b/app/Listeners/Invoice/InvoiceEmailedNotification.php @@ -46,6 +46,10 @@ class InvoiceEmailedNotification implements ShouldQueue $first_notification_sent = true; + // $invoice = $event->invitation->invoice; + // $invoice->last_sent_date = now(); + // $invoice->save(); + foreach ($event->invitation->company->company_users as $company_user) { $user = $company_user->user; diff --git a/app/Mail/Admin/EntityPaidObject.php b/app/Mail/Admin/EntityPaidObject.php index a3ab38b12b21..33c155a21b13 100644 --- a/app/Mail/Admin/EntityPaidObject.php +++ b/app/Mail/Admin/EntityPaidObject.php @@ -90,6 +90,7 @@ class EntityPaidObject 'signature' => $settings->email_signature, 'logo' => $this->company->present()->logo(), 'settings' => $settings, + 'whitelabel' => $this->company->account->isPaid() ? true : false, ]; return $data; diff --git a/app/Mail/Admin/EntitySentObject.php b/app/Mail/Admin/EntitySentObject.php index 4367acda86c7..901adab7183b 100644 --- a/app/Mail/Admin/EntitySentObject.php +++ b/app/Mail/Admin/EntitySentObject.php @@ -85,7 +85,7 @@ class EntitySentObject 'signature' => $settings->email_signature, 'logo' => $this->company->present()->logo(), 'settings' => $settings, - + 'whitelabel' => $this->company->account->isPaid() ? true : false, ]; } } diff --git a/app/Mail/Admin/EntityViewedObject.php b/app/Mail/Admin/EntityViewedObject.php index 367c3f2de2a2..36909312715d 100644 --- a/app/Mail/Admin/EntityViewedObject.php +++ b/app/Mail/Admin/EntityViewedObject.php @@ -85,7 +85,7 @@ class EntityViewedObject 'signature' => $settings->email_signature, 'logo' => $this->company->present()->logo(), 'settings' => $settings, - + 'whitelabel' => $this->company->account->isPaid() ? true : false, ]; return $data; diff --git a/app/Mail/Admin/PaymentFailureObject.php b/app/Mail/Admin/PaymentFailureObject.php index 12e041740f05..ed34e338a164 100644 --- a/app/Mail/Admin/PaymentFailureObject.php +++ b/app/Mail/Admin/PaymentFailureObject.php @@ -77,7 +77,7 @@ class PaymentFailureObject 'signature' => $signature, 'logo' => $this->company->present()->logo(), 'settings' => $this->client->getMergedSettings(), - + 'whitelabel' => $this->company->account->isPaid() ? true : false, ]; return $data; diff --git a/app/Mail/TemplateEmail.php b/app/Mail/TemplateEmail.php index f8e1a1079a77..d9cffa9c1ff8 100644 --- a/app/Mail/TemplateEmail.php +++ b/app/Mail/TemplateEmail.php @@ -60,6 +60,8 @@ class TemplateEmail extends Mailable ->text('email.template.plain', [ 'body' => $this->build_email->getBody(), 'footer' => $this->build_email->getFooter(), + 'whitelabel' => $this->client->user->account->isPaid() ? true : false, + 'settings' => $settings, ]) ->view($template_name, [ 'body' => $this->build_email->getBody(), diff --git a/app/Notifications/BaseNotification.php b/app/Notifications/BaseNotification.php index 34542e8b790a..3fe2314da4a0 100644 --- a/app/Notifications/BaseNotification.php +++ b/app/Notifications/BaseNotification.php @@ -124,7 +124,7 @@ class BaseNotification extends Notification implements ShouldQueue 'logo' => $this->entity->company->present()->logo(), 'signature' => $this->settings->email_signature, 'settings' => $this->settings, - + 'whitelabel' => $this->entity->company->account->isPaid() ? true : false, ]; return $data;