I wold create clearing bank account and use it for this purpose only.
1.When you receive credit memo dr payables cr clearing bank ac.
2. Use clearing account to record customer invoices payment dr clearing bank ac cr receivables
Now clearing ac would be 0