Topic: Change Company after Issuing Invoice

Hi,
Is it possible to change the company (customer or client) after an invoice has been issued?

For example, I get an order of 100 items and I create the invoice to CompanyA. However, the invoice was meant to be to CompanyB. Is it possible to change the company to whom the invoice was issued?

Thanks
Carmelo

Re: Change Company after Issuing Invoice

Void the invoice and create a new one - invoices change a whole lot of entries in various tables.

If you had taken a backup before and after the transaction then the diffs of the sqls can be used to change them.

Alternatively, take an sql backup before and after a new transaction and then study the differences and extrapolate it for the target invoice.

Re: Change Company after Issuing Invoice

Thanks apmuthu for your solution.
I'm afraid that the solution is too technical for an accountant or bookkeeper to perform.

Re-entering a hundred items is a huge job as well.

4 (edited by apmuthu 01/06/2015 11:21:23 am)

Re: Change Company after Issuing Invoice

You're right. Maybe we need a last document customer change option as most such errors are realised the moment we hit the enter button!

There are many ways an invoice can be entered. The most common place such an error would arise is in a Direct Invoice entry or in a Sales Order Entry since that is where a Customer is chosen and everywhere else it gets carried over from the parent document, we need to have:

1. Change Last Invoice Customer
2. Change Last Sales Order Customer

It should address the wrong defaults for address and other contacts and references that may have been entered.

... provided no payments / credit/debit notes have been made in the meanwhile!

If the said invoice/sales order got emailed to the wrong customer entered ......

There is an Invoice edit option ......

Re: Change Company after Issuing Invoice

Hi apmuthu,
I delved deeper in this issue and I found out that up to the level of a Sales Order, it seems to be safe to just change the pointer to the Customer in the table sales_order.
This is not so if the delivery note is issued as then even entries in the Tax due tables are updated.

Currently, while in the Modifying Sales Order screen, as soon as the Customer or the Branch is changed the Sales Order is reset and all items are removed. How can I disable this resetting of the Sales Order?

TIA
Carmelo

6 (edited by apmuthu 01/12/2015 08:39:44 pm)

Re: Change Company after Issuing Invoice

Yes, upto Sales Order no other changes occur and it will be safe to change customer / branch, etc. After that, not only the taxes, but also the stocks will change.

The Sales Order gets reset, because a different set of rules will apply when the customer is changed - retail/wholesale pricing and it's re-computation, terms of sale, credit limits, etc and hence it is coded for best practices to be able to start clean.

The same applies to allocation of payments to suppliers as well when the discount and the memo fields get blanked out on change in allocation choices.

Re: Change Company after Issuing Invoice

Make wrong customer invoice a template invoice. On selecting to cretae new invoice, you can change the customer. All items should remain the same though.

Then remove template invoice and void that invoice against the customer.

Wynand