New "Generate EIB File (for Upload)" button, shown after a successful
process run, populates planeterra_equals_cards_transactions_eib_v45.xlsx
(the Workday EIB "Expense Credit Card Transaction" import template)
directly from that run's output, without a re-upload:
- app/tools/eib/logic.py: populate_upload_template() writes Header Key,
Line Key, Transaction Number/Date, Amount, currencies, description and
merchant name into the "Expense Credit Card Transaction" sheet, plus a
per-file metadata row into "Credit Card Transaction Header" (Header
Key, Credit Card Type, an auto-generated File Name covering the run's
date range, and today's date). Corporate-card identifiers
(AK/AM/AN) are resolved by reading eib_pre_template.xlsx's "Equals
Card IDs" sheet at generation time rather than duplicating that
mapping, so both output files always agree.
- app/tools/eib/routes.py: new /api/generate-upload route, backed by a
small module-level "last processed output" holder (same single-user
pattern as PROCESS_STATUS) so the button can reuse the prior run's
data.
- templates/eib/index.html: the new button + status note in the result
panel.
- .gitignore: exception for the new template, same as eib_pre_template.xlsx.
Also includes the user's own edit to eib_pre_template.xlsx (J:M formula
fill range manually extended from row 699 to row 2000).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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>
Documents the platform-shell/tool-blueprint convention, the EIB tool's
mechanics, and the two-step path (landing page preview, then blueprint
restructuring) so future sessions can pick up without re-deriving it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Split the EIB tool into app/tools/eib/ (routes.py for Flask glue,
logic.py for Flask-free business logic), registered as a Blueprint
under /eib with its own namespaced /eib/api/* routes. The home page
now renders a tool registry (app/main.py TOOLS list) instead of the
temporary /home-preview route, so future tools plug in the same way.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Single-tool Flask app (Equals Money -> Workday EIB conversion + audit)
plus a new /home-preview landing page in preparation for turning this
into a multi-tool platform.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>