Skip to content
Code-Schnipsel Gruppen Projekte
Commit 863f275e erstellt von Patrick Müller's avatar Patrick Müller
Dateien durchsuchen

feat: special flag for temporary invoice -> do not send mail on post

Übergeordneter de7d1322
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -23,6 +23,17 @@
*/
class InvoiceTemporary extends QUI\QDOM
{
/**
* Special attributes
*/
/**
* If this attribute is set to this InvoiceTemporary the invoice is NOT
* automatically send to the customer when posted REGARDLESS of the setting
* in this module.
*/
const SPECIAL_ATTRIBUTE_DO_NOT_SEND_CREATION_MAIL = 'do_not_send_creation_mail';
/**
* @var string
*/
......@@ -1011,7 +1022,7 @@ public function copy($PermissionUser = null): InvoiceTemporary
$currentData = $currentData[0];
$currentData['hash'] = QUI\Utils\Uuid::get();
unset($currentData['id']);
unset($currentData['c_user']);
unset($currentData['date']);
......@@ -1843,6 +1854,10 @@ public function checkLocked()
*/
protected function sendCreationMail(Invoice $Invoice)
{
if (!empty($this->getAttribute(self::SPECIAL_ATTRIBUTE_DO_NOT_SEND_CREATION_MAIL))) {
return;
}
$User = null;
try {
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren