diff --git a/app/Models/Account.php b/app/Models/Account.php index 76d6f04411..b5642927f2 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->email_design_id : EMAIL_DESIGN_PLAIN; + return $this->hasFeature(FEATURE_CUSTOM_EMAILS) ? $this->account_email_settings->email_design_id : EMAIL_DESIGN_PLAIN; } /** diff --git a/app/Models/Traits/SendsEmails.php b/app/Models/Traits/SendsEmails.php index 617fd0e27a..13e3d5cafd 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->email_design_id != EMAIL_DESIGN_PLAIN) { + if ($this->hasFeature(FEATURE_CUSTOM_EMAILS) && $this->account_email_settings->email_design_id != EMAIL_DESIGN_PLAIN) { $template .= '
' . trans("texts.{$entityType}_message_button", ['amount' => '$amount']) . '

' . '
$viewButton

'; } else { diff --git a/app/Ninja/Transformers/AccountTransformer.php b/app/Ninja/Transformers/AccountTransformer.php index 0483bf56e6..024180d61c 100644 --- a/app/Ninja/Transformers/AccountTransformer.php +++ b/app/Ninja/Transformers/AccountTransformer.php @@ -215,7 +215,6 @@ class AccountTransformer extends EntityTransformer 'invoice_number_pattern' => $account->invoice_number_pattern, 'quote_number_pattern' => $account->quote_number_pattern, 'quote_terms' => $account->quote_terms, - 'email_design_id' => $account->email_design_id, 'enable_email_markup' => (bool) $account->enable_email_markup, 'website' => $account->website, 'direction_reminder1' => (int) $account->direction_reminder1,