From 4c98f6966b5dc230a8cc152f4490647cc41c1354 Mon Sep 17 00:00:00 2001 From: Xenomporio <> Date: Sat, 6 Aug 2022 10:41:47 +0200 Subject: [PATCH] CRM new email with prefilled text --- www/pages/adresse.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/www/pages/adresse.php b/www/pages/adresse.php index e5cec2ee..821ec7b0 100644 --- a/www/pages/adresse.php +++ b/www/pages/adresse.php @@ -3738,11 +3738,18 @@ function AdresseBriefErstellen() { if (!empty($adresse['email'])) { $this->app->Tpl->Add('EMAIL_AN',str_replace('"','"',$adresse['name']) . ' <' . $adresse['email'] . '>'); } + + $anschreiben = $this->app->DB->Select("SELECT anschreiben FROM adresse WHERE id='".$ticket_from_db['adresse']."' LIMIT 1"); + if($anschreiben=="") + { + $anschreiben = $this->app->erp->Beschriftung("dokument_anschreiben").",\n".$this->app->erp->Grussformel($projekt,$sprache); + } + $this->app->Tpl->Add('CONTENT',$anschreiben); + $anhaenge = ''; $anhaenge .= 'Datei:'; // $anhaenge .= 'Datei 2:'; // $anhaenge .= 'Datei 3:'; - $this->app->Tpl->Add('ANHAENGEHERAUFLADEN', $anhaenge); $anhaenge = 'Keine Anhänge vorhanden';