Allow sending emails even when the invoice is a draft

This commit is contained in:
Chl 2021-11-28 01:00:40 +01:00
parent 4c49334c31
commit faa9dcaa6c
2 changed files with 6 additions and 3 deletions

View file

@ -368,6 +368,9 @@ 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;
}
return 1;