From 4ef3d41c25c5da5502a8980242df060c871dc0f7 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Wed, 1 Apr 2009 14:36:12 +0000 Subject: [PATCH] Fixed document mailing. --- CHANGELOG.txt | 3 +++ reporting/includes/pdf_report.inc | 15 ++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 83ca0ec..92cb1e2 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,9 @@ Legend: ! -> Note $ -> Affected files +01-Apr-2009 Janusz Dobrowolski +# Fixed document mailing. +$ /reporting/includes/pdf_report.inc ------------------------------- Release 2.1.1 ---------------------------------- 30-Mar-2009 Janusz Dobrowolski # Fixed display of unsufficient quantities in sales docs. diff --git a/reporting/includes/pdf_report.inc b/reporting/includes/pdf_report.inc index 8c5d572..b81175a 100644 --- a/reporting/includes/pdf_report.inc +++ b/reporting/includes/pdf_report.inc @@ -419,7 +419,7 @@ class FrontReport extends Cpdf { include("doctext.inc"); } - require_once($path_to_root . "reporting/includes/class.mail.inc"); + require_once($path_to_root . "/reporting/includes/class.mail.inc"); $mail = new email($this->company['coy_name'], $this->company['email']); $from = $this->company['coy_name'] . " <" . $this->company['email'] . ">"; $to = $myrow['DebtorName'] . " <" . $myrow['email'] . ">"; @@ -457,14 +457,11 @@ class FrontReport extends Cpdf $msg2 .= nl2br($sender) . "
"; $msg2 .= "
Filepath: " . $fname . "
Filename: " . $this->filename . "
"; } - if ($ret) - $str = "
" . $this->title . " " . $myrow['reference'] . " " . _("sent to") . " "; - else - $str = "
" . $this->title . " " . $myrow['reference'] . " " . _("NOT sent to") . " "; - $msg2 .= $str . $myrow['DebtorName'] . " - " . $myrow['email']; - echo ""; - echo $msg2; - echo ""; + if (!$ret) + display_error(_("Sending document by email failed")); + else + display_notification($this->title . " " . $myrow['reference'] . " " + . _("has been sent by email.")); } else { -- 2.30.2