A couple of additional fixes to changed document reports.
[fa-stable.git] / reporting / includes / pdf_report.inc
index 9e405431746e1fe1c2860bd1fd2a7ff7d75c39b1..0648ad7d6015cfdd31d542ec586d5d552e02490e 100644 (file)
@@ -945,7 +945,7 @@ class FrontReport extends Cpdf
                        $this->{$this->headerTmpl}();
        }
 
-       function End($email=0)
+       function End($email=0, $subject='')
        {
                global $pdf_debug, $path_to_root;
 
@@ -980,7 +980,8 @@ class FrontReport extends Cpdf
                                        display_error(_("You have no email contact defined for this type of document"));
                                } else {
                                        $sent = $try = 0;
-                                       $subject = $this->formData['document_name'] . ' '. $this->formData['document_number'];
+                                       if(!$subject)
+                                               $subject = $this->formData['document_name'] . ' '. $this->formData['document_number'];
                                        foreach($this->contactData as $contact) {
                                                if (!isset($contact['email'])) 
                                                        continue;