✓ Goal
Verify that financial data extracted from statements, receipts, and other documents is accurate, categorized correctly, deduplicated, and safely stored in the non-profit finance database.
1 Verify Extracted Statement Data
Some source documents may be fuzzy, OCR-generated, or manually translated into structured data.
For every statement or financial document:
- Extract usable transaction data.
- Use a Python/calculator tool to verify totals.
- Confirm that individual expenses, deposits, and balances add up correctly.
- Flag any math mismatch before inserting data into the database.
2 Determine vendor_key and Category
For each expense, determine the correct vendor_key from the transaction description.
After the vendor_key is identified:
- Look up the vendor in the existing lookup tools.
- Assign the correct expense category.
- If the vendor is unknown, add it to the evolving lookup list after review.
Location of tools for this system:
/home/adamsl/rol_finances/tools/
This folder also contains lookup lists that grow as new vendors and categories are discovered.
3 Prevent Duplicate Data
The system must prevent the same transaction from being entered more than once.
Sometimes receipt data and bank statement data may describe the same real-world transaction. For example, a receipt may have a matching bank statement row, or a bank statement row may have matching receipt data.
When the system finds a match, the records should be linked together instead of being inserted as separate expenses.
The system should also guard against accidental duplicate entries where the same record is entered more than once.
4 Store Verified Data in the Database
Only insert or update data after verification is complete.
When matching data is found:
- If data from a receipt matches an existing expense record from a statement, populate the
receipt_urlcolumn of that expense record with the path to the receipt. - If data from a statement matches an existing expense record from a receipt, populate the
source_filecolumn of that expense record with the document path. - Verify that the
vendor_keyand category match between the linked records.
If the vendor_key or category does not match:
The mismatch must be reviewed and resolved before continuing.
5 Project Plan — 2025 Church Financial Report Completion
Current status as of 2026-07-28: the 2025 books are further along than the 2026-07-22 snapshot showed, but the 2025 church financial report is still not finishable. A fresh account-by-account audit (database queries joined against the actual statement files on disk, not just the stale table) found that Amex Personal / Platinum Business and Choice Privileges 7580 are fully processed for all 12 months — a big correction from the prior UNKNOWN/assumed status — and that Prime Chase is actually processed for January–June (not just June as previously recorded). The database now contains 868 2025 expense rows (up from 745) plus 312 2025 bank-ledger transaction rows (unchanged; the transactions table still only reaches January–June). 132 2025 expenses now carry a receipt_url and 369 carry a source_file, but 104 2025 expenses remain uncategorized (up from 72, concentrated in March, June, April, May, and a smaller January tail; February and July–December are fully categorized). The top-level document inventory now shows bank statements: 213 files and receipts: 330 files, still with no dedicated invoices/ or supporting_documents/ folders. The real remaining gaps are concentrated in three accounts: FNBO 4851 (documents exist for all 12 months but only January is processed), Diners Club 0587/1391 (only January processed), and Fifth Third ROL 6285 / Personal 5938 / ROL 3119, which all have genuine document gaps in the second half of the year, not just processing gaps.
Completed / partially completed
- Amex Personal / Platinum Business is fully processed for all 12 months of 2025 — verified by matching every row of the whole-year source workbooks (
amex_personal_whole_2025.xlsx,platinum_business_credit_card_for_the_year.xlsx) against theexpensestable by date+description+amount; every matchable row was found (the previous UNKNOWN status was wrong — the data is there, it just isn't linked viasource_file). - Choice Privileges 7580 is fully processed for all 12 months, evidenced by a single whole-year
choice_7580_year.xlsximport spanning Jan 4 – Dec 29 (152 expense rows). - Prime Chase is processed January–June (not just June as the 2026-07-22 table showed), confirmed by matching a whole-account CSV export against
expensesrow-by-row (exact description+date+amount hits in every month Jan–Jun). - Fifth Third ROL 6285 is processed January–April (Jan/Feb via completed
transactionsimport batches, Mar/Apr via matched statement-derived expense rows). - Fifth Third Personal 5938 is processed January–June (confirmed via distinctive description patterns — check numbers, mortgage payment, card-ending-9509 purchases, transfers to/from the 6285 checking account — present in the
transactionstable every month Jan–Jun). - JetBlue Barclays 3965 and Diners Club 0587 are processed for January (and JetBlue for February).
- Year-folder bank-statement archive behavior (implemented 2026-07-22) continues to be used for new intake alongside the legacy month-folder structure; duplication between the two structures did not turn out to hide any additional processed data once cross-checked.
Not yet complete
- FNBO 4851: a source statement PDF exists for every month of 2025, but only January's rows are actually in
expenses— February's extracted rows (iterated_rows.md) were checked directly against the database and 0 of 9 matched, confirming March–December are genuinely un-imported, not just unlabeled. - Diners Club 0587/1391: only January is processed; a "whole year" 0587 PDF exists on disk but was never run through extraction (no
iterated_rows.md), so February–December are present-but-unprocessed. - Fifth Third ROL 6285: no statement document of any kind (year-folder, legacy folder, or top-level) could be found for May–December 2025 — this is a real document gap, not just a processing gap.
- Fifth Third Personal 5938: a July statement exists (
june_july_bank_personal_statement.pdf) but was not processed (0 personal-pattern rows found inexpensesfor July); no statement documents exist at all for August–December. - Fifth Third ROL 3119: a January statement and check-image packets for Jan–Mar, Apr–Jun, and Jul–Sep exist, but the one processing attempt on record (report.html) shows FAIL/error status and no matching rows were found in the database for any month; October–December have no documents at all.
- Prime Chase and JetBlue Barclays 3965 have whole-year/whole-account source documents on disk (CSV export, annual summary PDF) covering July–December, but no evidence those months were ever imported.
- 104 2025 expenses are still uncategorized, concentrated in March (38), June (28), April (15), May (13), and January (10).
- The
transactions(bank-ledger) table still only reaches January–June 2025; nothing from July onward has landed there, even though theexpensestable does have July–December rows (171) from the credit-card accounts that are fully processed.
Missing documents or unfinished tasks
- Genuine document gaps (no source file found in any structure): Fifth Third ROL 6285 May–December 2025; Fifth Third Personal 5938 August–December 2025; Fifth Third ROL 3119 October–December 2025. These need to be chased as actual missing statements, not reprocessed from an existing file.
- Processing-only gaps (document present, not yet imported): FNBO 4851 February–December; Diners Club 0587/1391 February–December; JetBlue Barclays 3965 March–December; Prime Chase July–December; Fifth Third ROL 3119 January–September (repeated processing attempts have failed per its report.html).
- Fifth Third ROL 3119 needs its processing pipeline debugged before reprocessing is retried again — the existing report.html for the January statement shows explicit FAIL/error status, and no import batch for this account has ever completed.
- Folder normalization: invoices and supporting documents still have no dedicated top-level folders; several accounts (6285, 5938, 3119, JetBlue, Diners) have real source documents scattered across the legacy month folders, the year-folder structure, and the readable_documents root itself — worth consolidating so future gap-audits don't have to re-derive this.
- Uncategorized expenses: clear the 104 uncategorized 2025 expenses, with highest priority on the 38 March and 28 June rows.
- Receipt matching: identify which church expenses still require receipt attachment versus which legitimately have no receipt (132 of 868 currently have a receipt_url).
- Unmatched/missing-source review: review expenses with blank
source_fileor blankreceipt_urland decide whether they need a missing-document chase, statement re-import, or are valid statement-only rows. - Final year-end verification: once source completeness is proven, rerun duplicate review, total checks, category review, and final report math at the year level.
Recommended order of work (fastest practical path)
- Build the master 2025 document checklist first. Do not keep processing blindly. List every expected church account/month/document type and mark each as scanned, processed, categorized, duplicate-checked, stored, or missing.
- Finish statement coverage before chasing individual receipts. The fastest way to close the books is to guarantee all church statements are present and fully processed month by month; that establishes the complete transaction backbone.
- Resolve all remaining statement FAIL / PASS-WITH-NOTES items that affect completeness. January is close enough that its exceptions should be closed immediately rather than rediscovered later.
- Clear uncategorized expenses next. Once statement coverage is stable, work the 72 uncategorized rows in descending month-count order: June, March, May, April.
- Then attach receipts/invoices/supporting docs to already-stored transactions. This is faster than trying to reconstruct the whole year from receipts first.
- Then review unmatched receipts and possible duplicates. Anything still unmatched after full statement coverage becomes a short exception queue instead of a giant mixed backlog.
- Only after the above, produce the final church 2025 report package.
Milestones and completion criteria
- Milestone 1 — Source inventory complete.
Completion criteria: every expected 2025 church document is listed, and each one is marked either processed and stored in the correct folder or explicitly missing/pending human retrieval. - Milestone 2 — Statement backbone complete.
Completion criteria: every 2025 church statement has been scanned or ingested, archived to the correct year/month/account path, parsed, duplicate-checked, and stored; statement totals reconcile; open statement FAILs are resolved or formally excluded with justification. - Milestone 3 — Transaction classification complete.
Completion criteria: zero church expenses remain uncategorized unless they are intentionally held for documented policy review. - Milestone 4 — Supporting documents linked.
Completion criteria: each receipt/invoice/supporting document is either matched to a stored transaction, linked as a counterpart/support document, or placed on a short human-review exception list. - Milestone 5 — Year-end reconciliation complete.
Completion criteria: no unresolved duplicate candidates, missing statements, unexplained unmatched receipts, or known total discrepancies remain in the church 2025 data set. - Milestone 6 — Final financial report ready.
Completion criteria: year totals can be produced from verified data, with category summaries and supporting documents in place, and the remaining exception list is empty or explicitly approved by a human.
Blockers requiring human assistance
- Locating any church statements, receipts, invoices, or check images that were never scanned or are only present as paper originals.
- Answering ambiguous categorization policy questions where the statement text is too vague to distinguish business/church/personal purpose.
- Providing context for check numbers, transfers, and card payments that do not expose enough merchant detail in the source statement.
- Confirming whether missing later-month statements actually exist, belong to the church accounts, or were intentionally not used.
- Approving treatment of any lingering support-only or excluded documents that should not create accounting rows.
Fast completion strategy
The quickest accurate route is to treat this as a coverage problem first, cleanup problem second. First prove the full 2025 church statement set exists and is processed into the database. Second, clear the remaining uncategorized and unsupported rows. Third, link receipts and invoices to transactions already known to exist. This avoids the slow path of trying to reconstruct the year document-by-document without first knowing whether the transaction backbone is complete.
Immediate next actions:
- Chase the three accounts with genuine document gaps first: Fifth Third ROL 6285 (May–Dec), Fifth Third Personal 5938 (Aug–Dec), and Fifth Third ROL 3119 (Oct–Dec) — confirm whether these statements exist anywhere (paper, online banking portal, email) before assuming they were never generated.
- Debug the Fifth Third ROL 3119 import pipeline — every processing attempt on record has failed, so even the documents already on hand (Jan–Sep) haven't produced usable data.
- Process the already-present-but-unimported statements: FNBO 4851 (Feb–Dec), Diners Club 0587/1391 (Feb–Dec), JetBlue Barclays 3965 (Mar–Dec), and Prime Chase (Jul–Dec) — these are pure processing work, no document chasing required.
- Work down the 104 uncategorized expenses, starting with March (38) and June (28).
- Generate the final year-level exception list, then produce the church financial report from only the verified rows.