Minor fixes

This commit is contained in:
David Bomba 2023-03-13 21:17:32 +11:00
parent 23ebe8d6e9
commit 60a3fd7863
2 changed files with 4 additions and 5 deletions

View File

@ -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 */

View File

@ -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 ' ';
}