From: Joe Hunt Date: Mon, 27 Jul 2009 21:04:45 +0000 (+0000) Subject: Bugs in sending sales orders as email. X-Git-Tag: 2.3-final~1173 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=939337a739e521fc7d69ab30a7d89177b51a3bb3;p=fa-stable.git Bugs in sending sales orders as email. --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 26833f77..ea349432 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,10 @@ Legend: ! -> Note $ -> Affected files +27-Jul-2009 Joe Hunt +# Bugs in sending sales orders as email. +$ /reporting/includes/pdf_report.inc + 18-Jul-2009 Joe Hunt # When saving a Payment to a Customer in Bank Payments (normally payment to suppliers) it was saved with wrong sign in debtor_trans (very rare). $ /sales/includes/db/cust_trans_db.inc diff --git a/reporting/includes/pdf_report.inc b/reporting/includes/pdf_report.inc index 1a0f7174..81fda39f 100644 --- a/reporting/includes/pdf_report.inc +++ b/reporting/includes/pdf_report.inc @@ -422,11 +422,11 @@ class FrontReport extends Cpdf 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'] . ">"; - if ($myrow['email'] == '') $myrow['email'] = $myrow['contact_email']; + if (!isset($myrow['email']) || $myrow['email'] == '') $myrow['email'] = $myrow['contact_email']; $to = $myrow['DebtorName'] . " <" . $myrow['email'] . ">"; $msg = $doc_Dear_Sirs . " " . $myrow['DebtorName'] . ",\n\n" . $doc_AttachedFile . " " . $subject . "\n\n"; - if ($myrow['dimension_id'] > 0 && $doctype == 10) // helper for payment links + if (isset($myrow['dimension_id']) && $myrow['dimension_id'] > 0 && $doctype == 10) // helper for payment links { if ($myrow['dimension_id'] == 1) { @@ -458,6 +458,7 @@ class FrontReport extends Cpdf $msg2 .= nl2br($sender) . "
"; $msg2 .= "
Filepath: " . $fname . "
Filename: " . $this->filename . "
"; } + if (!isset($myrow['reference'])) $myrow['reference'] = ''; if (!$ret) display_error(_("Sending document by email failed")); else