X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Fpdf_report.inc;h=dd4518596b8dd88c60178ff5ca018bfb239bb190;hb=588ed54d44a168d4355838f0d3493bcb639ec03c;hp=8c5d5727d42d1d6e11b41f327451c2369c39f1de;hpb=d567a10b7925c8bb97c734e213d6651a979af29d;p=fa-stable.git diff --git a/reporting/includes/pdf_report.inc b/reporting/includes/pdf_report.inc index 8c5d5727..dd451859 100644 --- a/reporting/includes/pdf_report.inc +++ b/reporting/includes/pdf_report.inc @@ -54,7 +54,7 @@ class FrontReport extends Cpdf { switch ($size) { - + default: case 'A4': case 'a4': $this->pageWidth=595; @@ -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 {