I have a strange problem importing supplier invoices.
When importing supplier invoices, if an item appears on several lines in the import file (but on different invoices), only the first invoice will be recorded with that item in ERPNext, the other invoices will not be stored.
Error description at the unstored lines: pymysql.err.IntegrityError: (1062, “Duplicate entry ‘item’ for key ‘PRIMARY’”).
Thank you for your reply.
I understand that concept, there is no problem with multiple lines of items in a single invoice.
I use your attached image as an example:
I marked two item lines in your image, that indicates what items causing the error in my case.
When I import invoices (let’s say your file) the first invoice with the “Services” and “Products” items is stored in ERPNext with no error. But the second invoice will not be stored, because the “Services” and “Products” item are appeared second time in the import Excel file.
Items (and invoices) marked with green background successfully imported.
Invoices with red colored items are the problematic invoices.
As you see, an item’s first appearance is ok to import (green), the second (3rd, 4th, etc…) will not be imported (red).