Customer balance not updated after deleted invoice

I noticed a test customer I have still have a large balance after I deleted all the invoices associated with them. Is this an expected outcome? Is that not really a balance, but a running total of all invoices even if they have been deleted?

Hi,

@david any thoughts?

It may help to review the docs on what happens when the invoice is deleted:

https://invoiceninja.github.io/docs/invoices/

On your recommendation I read everything from the link provided.
I went back and first cancelled all the invoices and then deleted them.
Balance still does not show 0, there are no longer any invoices all have been cancelled and deleted.
I am I still missing something?

@xtekrepair

I just did the following, i had two clients with two outstanding invoices totally $100. Client balance was $100. I cancelled and then deleted the invoices and the client balance reverted to $0.

There must have been an issue at some point (Before 1.67). I went into the DB and zeroed the client.
It is working now.