Topic: How to amend Purchase Order PDF

Hi,

I need to amend the layout of the Purchase Orders very slightly. When we have a different delivery address the system always prints out the customer name as the first line. When we place orders for drop ship direct to customers, we don't want our company name appearing. I want to set up the code to print the company name if this section is blank (or N/A which is the default) anything else in this section should just be what's been entered. What file needs to be amended for this please.

Thanks,

Steve

Re: How to amend Purchase Order PDF

I have managed to sort this. Just for everybodies info I amended page /reporting/includes/header2.inc line 156 and changed to:-
// address2
        $this->row = $temp;
        // Added by Steve to not print company name if N/A
        if ($Addr2 == "N/A") {
        $this->Text($mcol, $Addr2['name']);
        $this->NewLine();
        }
        $this->TextWrapLines($mcol, $this->rightMargin - $mcol, $Addr2['address']);
Regards,
Steve

Re: How to amend Purchase Order PDF

Which version of FA are you on? Your "==" should be "!=".
Also $Addr2 will always be an array and be available and you are comparing an array to a scalar value.
Where do you get 'NA' for the value of $Addr2 ?
Lines 160 to 164 currently are:

// address2
        $this->row = $temp;
        $this->Text($mcol, $Addr2['name']);
        $this->NewLine();
        $this->TextWrapLines($mcol, $this->rightMargin - $mcol, $Addr2['address']);

and the change you probably you wanted is:

// address2
        $this->row = $temp;
        // Added by Steve to not print company name if N/A
        if ($Addr2["name"] != "") {
            $this->Text($mcol, $Addr2['name']);
            $this->NewLine();
        }
        $this->TextWrapLines($mcol, $this->rightMargin - $mcol, $Addr2['address']);