You issued an invoice (#IN1234) of $1000 to customer A. But customer has sent a payment of $1100. Hence customer overpaid by $100. The customer and you agreed that you will not be refunding the $100 but rather record it as a credit to the customer to be applied to future invoices.
1. Click the [New Receipt] button and apply a payment to this invoice. Enter the total Received as $1100 and apply $1100 to this invoice #IN1234 (overpayment). Hence when you call for debtor reports and statements, this customer will indicate a balance of -$100 (credit balance).
Sometime later, you issue another invoice (#IN1536) for $1000. Customer now has an outstanding debt of $900 (you issued total of $2000 in the 2 invoices and customer has paid $1100). Hence customer subsequently sends you payment of $900.
2. Click the [New Receipt] button and call up this customer A. Enter the total received as $900. Now apply -$100 to #IN1234 and $1000 to #IN1536. Hence net amount is still $900 and both invoices are fully knocked-off.