Postscript: If a refund is allocated directly lookup supplier invoices from tagging in banking and there are more than one line within the original purchase the refund divides the refund between all lines.
For instance, buy 2 oranges and an apple but you return the apple as rotten! The auto allocation facility refunds all three fruits partially rather showing that the apple had been returned!
Besides apples and oranges; here’s an earlier discussion about balancing payments on account with an electricity supplier Processing a refund of Payments on Account - #3 by alan_mcbrien