Default choice for body format (auto/txt/html) in module's setup

Enhancement for issue #1
This commit is contained in:
Chl 2021-12-01 00:17:33 +01:00
parent faa9dcaa6c
commit 224e82f9fa
5 changed files with 194 additions and 9 deletions

View file

@ -368,9 +368,13 @@ class SRIBMCustomMailInfo extends CommonObject
$this->subject = $template->topic;
$this->body = $template->content;
$this->addmaindocfile = $template->joinfiles;
// By default, we don't send emails when the generated invoice is
// still a draft.
$this->active = $this->fac_rec_object->auto_validate;
// Retrieve the default body format from config.
$this->body_ishtml = $conf->global->SENDRECURRINGINVOICEBYMAIL_BODY_ISHTML_DEFAULT;
}
return 1;