Changed OrderFiles; name is now dropdown of predefined types; Certain
types send emails
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user