Topic: Customer Shortname in Invoices

I am using the customer shortname as unique id that I follow on a different system. So it is critical for me to display the shortname on the invoice. The default sales invoice when printed does not print the customer's shortname/reference even though there is a space for it. I guess one of the updates broke the code. But the short name gets displayed in customer payment receipts.

Any help? I am on 2.4.7

Re: Customer Shortname in Invoices

I am trying to change a few SQL statements, but I am unable to see if it is pulling the required fields and sending it to $this->formData. Is there a way to dump the array on the screen so we can analyze what data are available?

Re: Customer Shortname in Invoices

Any update? Any suggestions? @joe @apmuthu

4 (edited by flpages 10/03/2020 12:41:53 pm)

Re: Customer Shortname in Invoices

Hi, imranrafai,
Change the 2 files as follows:

reporting/includes/pdf_report.inc  (ver 2.4.8 line 402 function SetCommonData, add 'branch_ref' in array.

        'branch' => array('br_address', 'br_name', 'salesman', 'disable_branch','branch_ref'),

reporting/includes/doctext.inc

            $aux_info = array(
                _("Customer's Reference") => $this->formData['branch_ref']   ,

Re: Customer Shortname in Invoices

@joe: any company specific flag for this for the core?