Changed so reference no in QUOTE/SO/INV/CRE/PO is printed instead of trans_no
[fa-stable.git] / reporting / includes / header2.inc
index 7fae9f64fa2a5dac79f9dff8629be2c7adf28a1e..b77b0610609ae1ae6351296052885c8fab4f48f8 100644 (file)
                $this->NewLine();
                $this->Text($mcol + 100, $doc_Invoice_no);
                if ($doctype == 7 || $doctype == 8 || $doctype == 9) // QUOTE, PO or SO
-                       $this->Text($mcol + 180, $myrow['order_no']);
+               {
+                       if ($print_invoice_no == 1)
+                               $this->Text($mcol + 180, $myrow['order_no']);
+                       else    
+                               $this->Text($mcol + 180, $myrow['reference']);
+               }               
                elseif ($doctype == 26) 
                        $this->Text($mcol + 180, $myrow['id']);
                else if (isset($myrow['trans_no']) && isset($myrow['reference'])) // INV/CRE/STA