Invoice Already Exists

When I tried to raise new sales invoice its saying it already exists
Why i am getting this error

Thanks
Santhosh

@Santhosh_Aerotek check doctype list → sales invoice → auto naming . what have you written ?

This is how it looks…

@Santhosh_Aerotek can you confirm that the sales invoice 00001 actually exists ?

Yes, It already exists

@Santhosh_Aerotek did you change anything in the doctype list ? probably added “unique” to one of the fields.

No, I haven’t changed anything

@Santhosh_Aerotek I suggest to rebuild the table . open apps/erpnext/erpnext/accounts/doctype/sales_invoice . open sales_invoice.json. search for modified and change it to recent date like yesterday . than run bench migrate . hope rebuilding the table will fix it

2 Likes

Thanks, I solved this issue by rebuilding the table

Thanks you very much.

@Santhosh_Aerotek mark the answer as solution please :slight_smile: so everyone can have the soltion

2 Likes

@bahaou Thanks for your suggestion. I am running into the same problem (different doctype though). How do I rebuild the table? Can you give some more details or link to a documented solution?
(Working on Frappe Cloud)
Thanks.

@bluesky share more details , maybe screenshots

Thanks. I could resolve the problem. As discussed in other posts on the forum, this issue arose because we included the ID when importing the entries. ERPnext got confused with the autonaming (seems to be a bug). Deleting all imported entries (after exporting) and then re-uploading them again without the ID solved the issue.