Topic: "charge to" field

Hi all,

I'm using 2.3.14.
The "charge to" field of my sales order pdf printouts display branch name and address instead of customer name like earlier version.
Is there any way to change it back?

Thank you
Eric

Re: "charge to" field

If the branch has it's own mailing address, this will be used insteD.

Joe

3 (edited by ericta 02/16/2013 09:08:55 pm)

Re: "charge to" field

I erased the mailing address in branch field. It still prints branch name in "charge to" field (no address this time).
anyway to put my customer name somewhere in the form? maybe in customer reference field, if so, how?

Thank you 

Eric

Re: "charge to" field

I am sorry. I gave you a wrong directive. If the branch has its own billing address it is used here in 'charge to'. otherwise it is not used at all. It should still have its own mailing address for the delivery fields.

When the delivery and/or invoice is sent the customers address is used in 'charge to'.

/Joe

Re: "charge to" field

I erased both mailing and billing address field, but still the same.
please advise

Thank you
Eric

Re: "charge to" field

I'm not sure what you are talking about. Nothing has changed in Charge to field recently. Which version you have used before, and which one you have installed now?
Janusz

7 (edited by ericta 02/18/2013 01:01:32 pm)

Re: "charge to" field

I'm using 2.3.14

let's say we create a customer: "Mark", a branch "DD Towing" under his name.
the sales quote or order pdf will display "DD Towing" in "charge to" and "deliver to" field instead of "Mark" in "charge to" field, "DD Towing" in "deliver to" field like earlier version 2.3.6


Thank you
Eric

Re: "charge to" field

Oh, yes, this has changes long time ago, back in 2011. This was changed to make possible having branches charged directly.

But you can set the name and billing address for the branch the same at it is set for customer (keep branch short name unique to easy recognise branches in selectors). If this is still problem (e.g. you have big database with mostly multibranch customers) you can fix the charge data in reporting/includes/doctext.inc file about line 18-20  (the code should be self explanatory).

Janusz

9 (edited by ericta 02/19/2013 01:45:39 am)

Re: "charge to" field

Hi Janusz,

I'd like to change line 19
'name' => @$this->formData['br_name'] ? $this->formData['br_name'] : @$this->formData['DebtorName'],
to
'name' => @$this->formData['customerName'],

what's the name reference to customer name?

Thank you
Eric

Re: "charge to" field

I think you need change it to
'name' => @$this->formData['DebtorName'],

(not tested though - I'm not sure whether DebtorName is defined for all types of report)
Janusz

Re: "charge to" field

I did a test and insert
'name' => @$this->formData['DebtorName'],

returns nothing on the screen.
Does "DebtorName' hold any value at all?
My programing skill is very limited. Thank you for your time.

Eric

Re: "charge to" field

My bad,  ten use 'name' instead of 'DebtorName'.
Janusz

Re: "charge to" field

Got it.

change line 44 and 62 from
_("Customer's Reference") => $this->formData["customer_ref"],
to
_("Customer's Reference") => $this->formData["name"],

Thank you
Eric

Re: "charge to" field

Janusz:

In the line below, where does the formData['br_name'] get set?  I can't find it. I am having the same problem as Eric except sometimes I need to charge the branch so have to do a bit more changing.

ericta wrote:

'name' => @$this->formData['br_name'] ? $this->formData['br_name'] : @$this->formData['DebtorName'],


Thanks,

ed10

Re: "charge to" field

Joe:

I entered a customer in the 2.3 demo:  anewtestcustomer.  I left the branch billing adress empty and when I print a sales order for that customer the charge to address is empty.  I seems that the branch billing address is always used?

joe wrote:

I am sorry. I gave you a wrong directive. If the branch has its own billing address it is used here in 'charge to'. otherwise it is not used at all. It should still have its own mailing address for the delivery fields.

When the delivery and/or invoice is sent the customers address is used in 'charge to'.

/Joe

ed10

Re: "charge to" field

I guess, that if there is no branch billing address, then it should use the customer address. I will ask Janusz, why it has been changed to this.

/Joe

Re: "charge to" field

Well, there was a minor bug in /sales/includes/sales_order_db.inc that eliminated the fallback.

It is now fixed in the HG repo. The file is also attached here:

/Joe

Post's attachments

sales_order_db.inc 20.9 kb, 4 downloads since 2013-02-25 

You don't have the permssions to download the attachments of this post.

Re: "charge to" field

Joe:

Thanks, you are always a big help.

ed10

19 (edited by ericta 02/27/2013 11:07:20 pm)

Re: "charge to" field

should the path be

/sales/includes/db/sales_order_db.inc

?

Eric

joe wrote:

Well, there was a minor bug in /sales/includes/sales_order_db.inc that eliminated the fallback.

It is now fixed in the HG repo. The file is also attached here:

/Joe

Re: "charge to" field

Yes, of course. Sorry and thanks. smile

/Joe

Re: "charge to" field

Wiki-ed it.