internal tool to analyze equals money expense card transactions into a formatted excel for upload to work day accounting software using the EIB excel tool
Go to file
JasonFraser a9df545952 Populate finance's EIB template instead of generating a fresh workbook
Replace build_excel() with populate_template(): loads
app/tools/eib/eib_pre_template.xlsx fresh each run, writes EIB rows into
Final Sheet A2:I<n+1> (clearing prior run's rows first) and the audit
table starting at column AA, then saves a dated copy into outputs/ —
the template itself is never mutated. Columns J:Y (finance's own
corporate-card-ID lookup formulas and a legacy static block) are never
written to; _extend_formulas_down() only fills in a missing J:M formula
within the new data range (the template's formula rows turned out to be
non-contiguous, leftover from old manual test batches) without ever
touching a row that already has one.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-18 15:24:21 -04:00
app Populate finance's EIB template instead of generating a fresh workbook 2026-08-18 15:24:21 -04:00
templates Restructure into a multi-tool platform with blueprints 2026-08-18 11:25:13 -04:00
.gitignore Populate finance's EIB template instead of generating a fresh workbook 2026-08-18 15:24:21 -04:00
CLAUDE.md Populate finance's EIB template instead of generating a fresh workbook 2026-08-18 15:24:21 -04:00
Dockerfile Initial commit: EIB processor tool with new landing page preview 2026-08-18 10:30:53 -04:00
README.md Restructure into a multi-tool platform with blueprints 2026-08-18 11:25:13 -04:00
docker-compose.yml Initial commit: EIB processor tool with new landing page preview 2026-08-18 10:30:53 -04:00
eib-processor_how-it-works.md Initial commit: EIB processor tool with new landing page preview 2026-08-18 10:30:53 -04:00
requirements.txt Initial commit: EIB processor tool with new landing page preview 2026-08-18 10:30:53 -04:00

README.md

Internal Tools

A small platform of internal tools for Planeterra International Foundation. Built by Undo Designs. Currently hosts one tool: the EIB Processor (Equals Money → Workday EIB transformer and statement auditor).

Quick start

docker compose up --build

Then open http://localhost:8081 for the tools landing page, or go straight to http://localhost:8081/eib/ for the EIB Processor.

Adding a new tool

Each tool lives in its own app/tools/<name>/ package with a Flask Blueprint (routes + a logic.py of Flask-free business logic) and its own templates/<name>/ folder. Register the blueprint and add an entry to the TOOLS list in app/main.py to get a card on the landing page.

EIB Processor — what it does

  1. Upload a raw Equals Money export (.xlsx)
  2. Optionally upload a combined card statement CSV for per-person audit
  3. Download the processed EIB Excel file

The audit table appears in the output file four columns after the last EIB column. Each person gets a single MATCHED / REVIEW REQUIRED status based on:

sum(EIB Converted Amount) == sum(statement Total debited for rows in EIB)

PDF statement audit (Docling)

The Docling container starts automatically with Docker Compose. Once it's healthy (check the badge in the top-right of the UI), you can upload a PDF statement instead of the CSV.

PDF parsing extracts the opening/closing balance summary from page 1 of the Equals statement. The Docling health check takes ~60s on first start.

Adding new merchants

If the processor reports unmapped merchants, add them to MERCHANT_LOOKUP in app/tools/eib/logic.py and restart:

docker compose restart app

Services

Service Port Description
app 8081 Flask web app (tools platform)
docling 5001 Docling PDF parsing service

Volumes

  • ./uploads/ — temporary uploaded files
  • ./outputs/ — generated EIB Excel files