The issue is on the invoice template. The “account summary” section was checked off, so the invoice was showing a section of the customer account summary, that included payments that were taken around the date of the invoice.
Uncheck the account summary on the invoice template. Go to Custom Form Styles, choose the invoice template, click on the content tab and deselect the box beside Account Summary.