When batch creating customer receipts with an invoice reference, if there are duplicate invoice ID’s on invoices assigned to two different customers, it sometimes applies the receipt to the wrong sales invoice, even though the batch create specifies the proper customer. Example: have customers Jane Doe and John Smith; two invoices are coded 005, one is in Jane Doe’s account and the other is in John Smith’s account; the batch entry properly calls Jane Doe’s code in the AccountsReceivableCustomer column; but when it is created, the receipt properly shows Jane Doe in the ‘Paid By’ ‘Customer’ section, and Jane Doe in the ‘Customer’ box on the line item, but the ‘Invoice’ on the line that it is assigned to is John Doe’s invoice 005.
Sales Invoice reference is supposed to act as an unique key, which is why Manager warns you about duplicate entries in Sales Invoices, Purchase Invoices etc.
You should use distinct references like “CustA_005” and “CustB_005”, then create a Custom Field called “Customer Invoice ID” and use it to store the “005” invoice number. This way your Sales Invoice will show both your internal reference and the customer’s reference.