If I create a sales invoice for a customer who has credit on their account from a previous transaction, that transaction is shown as a receipt under the total on the sales invoice, but with the date of the current sales invoice, not the date of the previous transaction.
Note the line under the total amount that shows “Less: – 07/09/2021”.
Below are the transactions from that customer’s accounts receivable, showing the previous receipt on 01/09/2021:
These examples are from a test business that I created after noticing the issue in my real business. It uses the default plain theme, and should be reproducible. I am using desktop edition 21.9.6 on Windows. I think this is an error that has appeared within the last few weeks.

