Two invoice lists can contain the same number of rows and add up to the same amount even when an invoice is missing. If an export leaves out an $87.50 invoice and repeats another $87.50 invoice, the total stays the same. So does the row count.

To see what happened, compare the invoice IDs in the export with the IDs in the register it came from. The total tells you how much was recorded. The IDs tell you which invoices were recorded.

The invoice register and export each have four rows totaling $258.65. The export lists INV-205 twice and omits INV-207.
Both lists have the same count and total. In the hypothetical export, a second INV-205 takes the place of INV-207.Credit: MathBlog

Four rows and $258.65 on both lists

Suppose a shop keeps a register with one row per invoice. The table compares that register with an export for the same period. The invoice IDs and amounts are hypothetical.

Invoice register and export for the same period
Invoice in register Register amount Invoice in export Export amount
INV-204 $52.40 INV-204 $52.40
INV-205 $87.50 INV-205 $87.50
INV-206 $31.25 INV-206 $31.25
INV-207 $87.50 INV-205 $87.50
Total $258.65 Total $258.65

INV-205 and INV-207 legitimately have the same amount in the register. In the export, the second INV-205 adds exactly what the missing INV-207 would have contributed. The export therefore passes both summary checks while representing only three distinct invoices.

Check which IDs appear and how often

For an export that should have one row per invoice, count the occurrences of each invoice ID. INV-205 should appear once but appears twice. INV-207 should appear once but appears zero times. Also look for export IDs that do not appear in the register. A distinct-ID count can flag a mismatch, but the individual counts show which records need investigation.

After confirming that every expected ID occurs exactly once, compare the amounts for the matching IDs. Two amounts could be swapped between invoices while both the grand total and all the ID counts still agree.

Start by confirming that both lists cover the same period and use the same inclusion rules. If the export contains one row per invoice line item, repeated invoice IDs are expected. In that case, compare line items using their own identifiers or aggregate the lines before comparing invoice totals. If a one-row-per-invoice export has an unexpected repeat, look for its cause in the source or export rather than deleting one of the rows on sight.

Further reading