diff --git a/app/Models/Account.php b/app/Models/Account.php index b5642927f2af..76d6f0441114 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -1580,7 +1580,7 @@ class Account extends Eloquent */ public function getEmailDesignId() { - return $this->hasFeature(FEATURE_CUSTOM_EMAILS) ? $this->account_email_settings->email_design_id : EMAIL_DESIGN_PLAIN; + return $this->hasFeature(FEATURE_CUSTOM_EMAILS) ? $this->email_design_id : EMAIL_DESIGN_PLAIN; } /** diff --git a/app/Models/Traits/SendsEmails.php b/app/Models/Traits/SendsEmails.php index 13e3d5cafde1..617fd0e27a20 100644 --- a/app/Models/Traits/SendsEmails.php +++ b/app/Models/Traits/SendsEmails.php @@ -64,7 +64,7 @@ trait SendsEmails $template = '
$client,

'; - if ($this->hasFeature(FEATURE_CUSTOM_EMAILS) && $this->account_email_settings->email_design_id != EMAIL_DESIGN_PLAIN) { + if ($this->hasFeature(FEATURE_CUSTOM_EMAILS) && $this->email_design_id != EMAIL_DESIGN_PLAIN) { $template .= '
' . trans("texts.{$entityType}_message_button", ['amount' => '$amount']) . '

' . '
$viewButton

'; } else {