This can all be done by (only) creating a single Customer Invoice, a single Customer Refund/Credit and two Customer Payments.
- Create a Customer Invoice for £1000
- Record a Customer Payment for £500, applied to the above Invoice, reducing the balance to £500.
- Create a Customer Refund for £80 (do not pay it unless you send money back to the Customer).
- Record a Customer Payment for £0, applying the full credit of £80 and allocating £80 to the Customer Invoice, reducing the balance to £420
Alternatively, you can perform the first three steps and wait for payment from the Customer. When you go to record the £420, you will see the Invoice balance is £500, but there is also an unapplied (unpaid) credit for £80.
This approach allows the Customer to choose how and when the credit is applied (and for you to hang on to it as long as possible!). If they send you £500, the credit will still be on their account for next time.
Note to self, here's how to do it: Create a 'customer refund' (credit note) manually, for the correct customer, not within the invoice. Add a/the product to the invoice and set the amount of the credit note. Validate the customer refund. Go to "Reconcile Invoices and Payments" in the Accounting menu. Select the correct customer. Tick both the credit note and the invoice. Click 'Reconcile'. The result is that the invoice balance has reduced by the amount of the credit note