Selecting Journal Entry in Offetting outstanding invoice

The use case is as follows:

I have 10 sales invoice for a customer, totalling say Rs 100,000. Each invoice value is different. There was a penalty raised by my customer for not adhering to their policy and they send us a penalty note for Rs 5000/-. We create a Journal Entry of type credit note in the ERPNext.

Customer makes a payment of Rs 95,000/-. We make a payment entry and select all the above 10 sales invoice totalling Rs 100,000/-. We then select the Journal Entry of Rs 5,000/-. But system gives an error while saving …

“Against Journal Entry ACC-JV-24-25-00649 does not have any unmatched debit entry”

Can anyone guide me how to resolve the same?

Try “Payment Reconciliation” And match the JV with the unsettled invoice.