This is occuring when using SOAP. Steps:
- Create invoice.
- Create Credit Memo (items are more than invoice).
- Apply memo to invoice.
- Create Customer Refund, with it to apply to the outstanding amount on the credit memo.
Soap returns "Unable to find a matching line for sublist apply with key: [doc,line]".
I can see the refund has been created, but the apply list is empty.
If I try to edit the refund in the UI, the apply list stays empty. But if I create a new refund in the UI, the apply list will show the relevant Credit Memo.
This results in a lot of memos stuck at the end of the month as 'Open', despite being paid!