Invoice accounting entries are copied to credit memo while applying thru AutoInvoice
Need your help on the below issue;
Situation: Please note we create an invoices using API (Ar_Invoice_Api_Pub.create_invoice); simultaneously we also create a credit memo for the same value using AutoInvoice and apply this invoice against the credit memo using AutoInvoice by passing REFERENCE_LINE_ID (Customer TRX line ID). All these three are performed under the same package. Invoice and credit memos are using different memo lines for accounting purpose.
Issue: Predominantly this works perfectly fine, but there are some instances, where, after application the credit memo automatically copies the invoice accounting (memo line). Since, this is not reproducible we are not able to identify the root cause.