Changed OrderFiles; name is now dropdown of predefined types; Certain

types send emails
This commit is contained in:
Frank Schubert
2022-06-21 18:58:02 +02:00
parent 43185a914f
commit 26b0a67d09
17 changed files with 263 additions and 194 deletions
@@ -0,0 +1,31 @@
<?php
$contacts = $order->owner->getChildrenByType("techcontact");
if(!is_array($contacts) || !count($contacts)) {
$contacts = [$order->owner];
}
$tos = [];
foreach($contacts as $contact) {
if($contact->email) {
$tos[] = $contact->email;
}
}
$customer_string = str_replace(["\r","\n"], " ", $order->owner->getCompanyOrName());
$subject = "Ihr Übergabeprotokoll / Technikerstammblatt";
$this->setReturnValue([
'subject' => $subject,
'to' => $tos,
'from_email' => "support@xinon.at",
'from_email_name' => "XINON Kundenservice"
]);
?>
Sehr geehrte Damen und Herren,
im Anhang erhalten Sie das technische Übergabeprotokoll zum Anschluss des Kunden <?=$customer_string?> zur weiteren Verwendung.
Ihr XINON Team