I have been trying to import old historical data with different naming series or Invoice numbers and currently I am facing an error as below.
For simplicity sake I have not introduced and tax info the data template is having plain Item,Qty and customer information. Based on mandatory columns required I downloaded the csv template and tried to fill in the data as much and tried to import. Since its sensitive data I can’t share the data template I am using.
Would request your help with this I would really appreciate it. Also needed to know optimal ways of doing this activity in general in ERPNext
Thanks Eugene, issue here to simple import old invoices in the system.
I’ve passed this error, currently am facing issue that ERPNext assings Sales invoice serially, I wanted it have same serial number as old invoices have. so that if somone want to query history data they can do so via the old invoice number.
If you leave the ID / Name column empty, then the system will automatically assign an ID / Name according to the Naming Series for that DocType. However, you can assign any text string as the ID / Name (aka Primary Key) upon import, even if it does not conform to the Naming Series. Then once imported, any new documents will be assigned an ID / Name according to the DocType’s Naming Series.
An alternative is to create a custom field which can store the historical number. Then export the DocType import template containing this new custom field. In this field you can then add the historical record number and import the records without providing an ID / Name, forcing the system to automatically assign it based on the Naming Series. Your users will then have to query the new field to find historical records.
@EugeneP : Thanks for your suggestion I was able to import the sales invoices. Also I added a custom field to store old invoice number and added that field to the global search list and was able to search invoice as well…
@EugeneP
I had one question, was able to import the one item invoices.
Any idea how should my template look like for importing invoices with multiple items and will the Grad total be automatically calculated ?
The best way to see how to structure your spreadsheet / csv file for importing data is to
Create an invoice with multiple line items on it
Export the import template xlsx / csv format, selecting to contain the data from the multi-line invoice, and selecting the columns of interest (I normally select all)
Investigate how the data looks like in the xlsx / csv