Incorrect sales invoice counter

The Invoices field in the Customers tab can differ from the count shown for the Sales Invoices tab. Here is a simple example. A company has 1 sales invoice. The Sales Invoices counter and the listing of sales invoices agree:

32%20AM AND

But the Invoices field in the Customers tab shows 2 invoices:

58%20AM

Yet the drill-down on Accounts receivable in the Customers tab reveals only the single invoice:

The problem is, I cannot describe the exact steps that produced the discrepancy. This test business was used to try to replicate this problem, as described by @pierix76 in this topic: Invoice counter bug under customers tab. Various pre-start date sales invoices were entered and deleted, both for this and the other customer defined for the business. The specific invoice now remaining was edited by assigning it to the other customer, then changed back. Somewhere in that process, the counter discrepancy appeared. Unfortunately, I did not notice exactly where.

Another thing I noticed during this experimentation was that when a pre-start-date sales invoice was deleted, the zero-amount starting balance entry in the drill-down on Accounts receivable in the Customers tab remained. After further exploration activity, that zero-amount entry disappeared.

All of this seems related to starting balances in some way.

@tut if created another invoice instead of 1, you created 2 invoice. does the counter show 3 or 4?

if it’s 3 as you say it is something to do starting balance, if it’s 4 then the counter detect double entry within the manager system.

If I add another invoice to the same customer, the Customers tab still overcounts by one.

then I think lubos programmed it the starting balance is entered automatically, if we specified the amount other than 0, it only edits the existing starting balance entry.

I think the issue is related to form defaults. If you have set customer or supplier under Form Defaults, that invoice would be included in the counter under Customers and Suppliers tab.

This is fixed in the latest version (18.5.48) now.