Hi, i am a new user to erpnext and am facing some difficulty changing the customer name on created invoices.
I changed the name already to the revised name, but already created invoices do not reflect the changes made as the customer requires those invoices with changes inorder to be able to process the payment.
You are correct. The reason for that is ERPNext tracks everything by date and time. So invoices originally created before the name change will always have the old name.
Once a document is created, it cannot be changed automatically. You would be asking the system to change historical data, and that is not allow in most civilized societies. Some would see that as fraud.
Also the ripple effect of trying to retroactively change something would be potentially disastrous if say the name was changed today but there was 3, 5, or even10 years worth of data in the past that needed to change.
I may be wrong, but I am not aware of any secure business systems that would allow such a change.
BKM
Okay I understand that but whats the best solution then?
Will i have to repost all delivery notes and invoices again ?
Thanks
You ‘could’ do that. However, that will change all of your accounting for those invoices to new dates after the name change. Attempting to re-do them with the old date will keep the old name.
BKM
There is no quick solution for an end user. However, from my prior experience, we did 1 of 2 things:
Option #1 - Create a custom Invoice form.
@bkm is correct. The invoices are stored with the original data, including name. However…you could create a new invoice template. Instead of displaying customer name from the invoice? You display the customer name from the Customer master table. No matter how old the invoice, it would always show the current customer name. Frappe framework definitely allows for this.
Option #2 - Have a developer mass-update the invoice records in the SQL database.
Ask a developer to perform this work. Always test first in a development environment, before trying in Production. A developer can use their favorite language (JavaScript, Python, SQL), to replace the old names with the new names.
As @bkm mentioned, this can look suspicious. So make sure you have approval from business leaders. And make sure you take plenty of notes, screenshots, etc. You must demonstrate for an auditor exactly what you changed, why you changed it, and show the data Before vs. After.
If you can do that, you’ll be fine. I have done much, much more intrusive updates to databases before. You just have to be careful, follow the business rules, and document everything.
with “Custom Invoice Form” you mean “Custom Print Format” for the “Sales Invoice” I guess
Yeah… I believe that is correct also. I have custom sales invoice print format as well so that I could add Sales rep ID and a few other things to the printed invoices.
Good catch!
BKM
Yes, precisely. Thanks