How are two lists compared?
- Lower-case the vendor name and the document number, trim spaces, join with a separator to make a key.
- Add amounts per key on each side, in cents, to avoid rounding drift.
- A key on both sides with equal totals is a match and is hidden.
- A key on both sides with unequal totals is 'Amount differs', and the difference is statement minus ledger.
- A key on one side only is 'Not in ledger' or 'Not on statement'.
Gap for a vendor is its statement total minus its ledger total. The net gap is the sum of the five vendor gaps; the gross figure adds the absolute value of each exception.
What are the limits?
- It cannot see two entries for the same invoice booked under different numbers.
- A document split into two lines on one side pairs with one line on the other, but two unrelated lines with the same number would be summed.
- Dates are labels only, so an invoice dated in one period on the statement and another in the ledger still pairs.
- Currency is not handled; use one currency per file.
Where do the demo numbers come from?
Calder-Pike Distribution and its five vendors are invented. Each line was written down once and the totals are recomputed in code whenever the site is built: statement $23,973.35, ledger $23,878.10, net gap $95.25, six exceptions, gross $2,323.25. Every document date is a weekday.
How would you verify the matcher yourself?
- Download the sample file and sum each side.
- Run the preview and compare its totals with your own.
- Change one amount by a dollar and rerun; the result should add that dollar as a difference.
- Delete one statement row; it should appear as 'Not on statement'.
What would change the method?
A correction to how keys are formed, support for another file format or a new column. Each would be named here and on the changelog together, with the date and the reason.
Which public source is cited?
Record retention periods follow IRS: How long should I keep records?, read on December 2, 2026. Confirm on the official page before relying on a period. This site does not cite accounting standards or tax statutes for statement matching because none sets a method for it.
Frequently asked questions
Why match on document number and not amount?
Different invoices can share an amount, so amount alone creates false matches.
Are sums rounded?
Amounts are handled in cents.
Which external source is cited?
The IRS page on how long to keep records.
Can I audit the logic?
Yes. It is described here and can be checked with the sample file.
Official source. Record-keeping periods cited on this site follow IRS, How long should I keep records? (irs.gov). Always confirm current rules, dates and rates on the official page before you rely on them.