! -> 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
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)
{
$msg2 .= nl2br($sender) . "<br>";
$msg2 .= "<br>Filepath: " . $fname . "<br>Filename: " . $this->filename . "<br>";
}
+ if (!isset($myrow['reference'])) $myrow['reference'] = '';
if (!$ret)
display_error(_("Sending document by email failed"));
else