You can show an account summary at the bottom on your invoices by selecting the rule Show account summary on invoice in the Projects screen or the corresponding global-level option in Settings > Billing & Invoices > Invoice Settings. The Settings option only applies to new projects you create and not to the existing ones. For existing projects, you need to check the project-level rule so that their invoices show the account summary. Check CORE Help Center for more on this rule. Do note that the project-level rule takes precedence over the global-level option. You might also want to check out this article: Global and project-level rules.
For this 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.