Customer's "Total Unpaid" doesn't count unallocated payments

When I add a Payment Entry for a Customer with outstanding invoices, and allocate the payment to the invoices, Total Unpaid is correct.

But when I do not Allocate them, the Unpaid doesn’t change

Am I doing something wrong. I prefer to simply receive “payments on account”

To update outstanding amount in the invoice from Payment Entry, you must allocate / link the payment to the invoice. Unless, the system does not know against which invoice the payment amount will be updated. You can also link the payment entry to the invoice later via Payment Reconciliation tool.

Thank you! I understand now

How would I add another field next to Total Unpaid that could show me Account Balance?

You need to customize this yourself. You can use following function to get the account balance on a specific date.

Many thanks! Would this be a “frappe plugin” via a git repo or would the code go elsewhere?

As the function is whitelisted, I think this can be achieved using Custom Field and Custom Script only inside your application.