Merged changes from main trunk up to 2.2.7
[fa-stable.git] / reporting / includes / pdf_report.inc
index b6962addd2403d9c8511a1e3f8239403718324bf..414151bafa3c8501e34d382bcaf7f586d0c50bf6 100644 (file)
@@ -1003,10 +1003,10 @@ class FrontReport extends Cpdf
                                        include("includes/doctext.inc");
                                }
                                require_once($path_to_root . "/reporting/includes/class.mail.inc");
-                       $mail = new email($this->company['coy_name'], $this->company['email']);
+                       $mail = new email(str_replace(",", "", $this->company['coy_name']), $this->company['email']);
                                if (!isset($myrow['email']) || $myrow['email'] == '') 
                                        $myrow['email'] = isset($myrow['contact_email']) ? $myrow['contact_email'] : '';
-                       $to = $myrow['DebtorName'] . " <" . $myrow['email'] . ">";
+                       $to = str_replace(",", "", $myrow['DebtorName']) . " <" . $myrow['email'] . ">";
                        $msg = $doc_Dear_Sirs . " " . $myrow['DebtorName'] . ",\n\n" . $doc_AttachedFile . " " . $subject .
                                "\n\n";
                                if (isset($myrow['dimension_id']) && $myrow['dimension_id'] > 0 && $doctype == ST_SALESINVOICE) // helper for payment links