0000960: When printing PO's the PO# is the Trans_id not the Forms Reference number.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 30 Jul 2011 22:37:32 +0000 (00:37 +0200)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 30 Jul 2011 22:37:32 +0000 (00:37 +0200)
reporting/includes/doctext.inc

index 4d92c66444e3c941d5bb5b76b1ea3eca71bf1a92..a889e0b86fb77ec36a8d466e75beedb310973410 100644 (file)
                        $Addr2['name'] = $this->company['coy_name'];
                        $Addr2['address'] = $this->company['postal_address'];
                        $this->formData['document_date'] = $this->formData['ord_date'];
-                       $this->formData['document_number'] = $this->formData['order_no'];
+                       $this->formData['document_number'] = $print_invoice_no == 0 && isset($this->formData['reference'])
+                               ? $this->formData['reference'] : $this->formData['order_no'];
 
                        $aux_info = array(
                                _("Customers Reference") => $this->formData['supp_account_no'],