Hi, the prepayment credit memo doesn't work per invoice. It looks at the difference between what has already been invoiced as prepayment on the lines and what the prepayment amount on the lines says now. So it reverses an amount, not a document.
Which also gives you the way around it. Lower the Prepmt. Line Amount Excl. VAT on the lines so the total drops by exactly the amount of that one invoice, then post the prepayment credit memo. Only that difference gets credited, the older ones stay as they are.
The credit gets spread over the lines by their prepayment amounts, so it doesn't point at that one invoice document, and if you need them matched you apply the credit memo to it by hand in the Customer Ledger Entries after.
Glad to help - follow up if anything is unclear.
► If this solved it, marking it verified helps others too.
Regards,
Grigorios Mavrogeorgis
Business Central Consultant & AL Developer
Work: Gmsoft Limited
Blog: insidebusinesscentral
LinkedIn: linkedin.com/in/gregorymavrogeorgis