X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=invoice_send.php;h=a013bdf75ac287eb0c21316d2761eaeaaf125fbb;hb=d26c95718cac0a2994ab4e9633b59f420a0816b4;hp=1dd2323ab264b5e1879ba33eaef02830ad8ef3ca;hpb=098a79f0819ebb89b7d48df4a6b154af4560f68e;p=timetracker.git diff --git a/invoice_send.php b/invoice_send.php index 1dd2323a..a013bdf7 100644 --- a/invoice_send.php +++ b/invoice_send.php @@ -70,14 +70,14 @@ if ($request->getMethod() == 'POST') { if (!ttValidEmailList($cl_cc, true)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('form.mail.cc')); if (!ttValidString($cl_subject)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('form.mail.subject')); if (!ttValidString($cl_comment, true)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.comment')); - + if ($errors->isEmpty()) { // Save last invoice emails for future use. $sc->setValue(SYSC_LAST_INVOICE_EMAIL, $cl_receiver); - $sc->setValue(SYSC_LAST_INVOICE_CC, $cl_cc); - - $body = ttInvoiceHelper::prepareInvoiceBody($cl_invoice_id, $cl_comment); - + $sc->setValue(SYSC_LAST_INVOICE_CC, $cl_cc); + + $body = ttInvoiceHelper::prepareInvoiceBody($cl_invoice_id, $cl_comment); + import('mail.Mailer'); $mailer = new Mailer(); $mailer->setCharSet(CHARSET); @@ -99,4 +99,3 @@ $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.mailForm.'.($cl_receiver?'comment':'receiver').'.focus()"'); $smarty->assign('content_page_name', 'mail.tpl'); $smarty->display('index.tpl'); -?> \ No newline at end of file