diff --git a/app/Services/Email/EmailDefaults.php b/app/Services/Email/EmailDefaults.php index 3493c2201e5f..de0872d5733c 100644 --- a/app/Services/Email/EmailDefaults.php +++ b/app/Services/Email/EmailDefaults.php @@ -281,7 +281,7 @@ class EmailDefaults $documents = []; /* Return early if the user cannot attach documents */ - if (!$this->email->company->account->hasFeature(Account::FEATURE_DOCUMENTS)) { + if (!$this->email->company->account->hasFeature(Account::FEATURE_PDF_ATTACHMENT)) { return $this; } @@ -312,7 +312,7 @@ class EmailDefaults } } - if(!$this->email->email_object->settings->document_email_attachment) + if(!$this->email->email_object->settings->document_email_attachment || !$this->email->company->account->hasFeature(Account::FEATURE_DOCUMENTS)) return $this; /* Company Documents */ diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php index 8aa488d454a8..3872ef95666e 100644 --- a/app/Utils/HtmlEngine.php +++ b/app/Utils/HtmlEngine.php @@ -683,6 +683,8 @@ class HtmlEngine $data['labels'][$key.'_label'] = $value['label']; } + // nlog($data); + return $data; } @@ -762,9 +764,6 @@ class HtmlEngine if ($country) { return $country->iso_3166_2; } - // if ($country) { - // return ctrans('texts.country_' . $country->iso_3166_2); - // } return ' '; }