You can show an account summary at the bottom on your invoices by selecting a rule Show account summary on invoices in the Projects or Global Settings screen. The Global Settings option only applies to new projects you create and not to the existing ones. For existing projects, you need to check the project rule Show account summary on invoice so that their invoices show the account summary. Check the CORE Help for more on this rule. Do note that the project-level rule takes precedence over the global-level rule. You might also want to check out this article: Global and project-level rules.
For this option to work, make sure that the correct invoice template is assigned to the project or invoices because some templates don't show account summary by design (such as Hourly Attorney, Fixed Accountant, etc. don't display account summary).
The Account Summary on invoices does not include a payment if the payment date is after the invoice date. The values in the Account Summary are from the previous billing period. In other words, the summary reflects the values of the previous payments made against that invoice, not the current one. So any payments made on the current invoice will reflect on the Account Summary of the invoices that are generated next.