All projects
Case study · synthetic data Updated: October 2026

Today's cash, reconciled and projected before the team arrives.

A process that runs by itself every morning for a fictional Argentine distributor: it reconciles two bank statements against the ERP, flags unbooked receipts with the suggested invoice, lists late customers and projects cash for the next four weeks.

PythonpandaspytestExcelLey 25.413Cash flowGitHub Actions
IndustryWholesale distribution
My roleRules, analysis and QA
FrequencyEvery business day
ValidationBank balance + 10 tests
Daily cash balance with forecast and open items flagged every morning

Context

In many small and mid-sized companies, the bank reconciliation, the list of late customers and the cash flow live in spreadsheets someone rebuilds by hand. It works as long as that person is in and makes no mistake.

If they are out for a day or a cell is wrong, invoicing slips, a receipt goes unbooked and the customer shows as overdue, or a payment is decided on old numbers.

Approach

One command, scheduled every morning, takes the new bank lines and the ERP treasury book and applies five rules in order. Every line ends in exactly one state, with the reason written down.

Bank chargesThe tax on bank debits and credits and account fees are recognised and booked automatically.
Same referenceMatches on invoice, payment order or batch number. Card settlements match net of the fee, and the fee is proposed as an entry.
Amount and dateWithout a reference: same account and amount, up to three business days apart, one to one.
Left in the bankAn unbooked incoming transfer is assigned to the customer by CUIT and to the invoice by amount.
Left in the ERPA payment recorded but not yet debited is in transit for three days; then it is an alert.
# reports/2026-09-29/resumen_diario.md (extracto)
## Conciliación
- 907 movimientos del banco, 97,6 % conciliados o registrados automáticamente.
- Pendientes abiertos: 26 (4 nuevos hoy).

- Cobranza sin imputar · FARMACIA DEL SUR · ARS 3.764.182
  Sugerido: Farmacia del Sur, factura FC-A-0003-00010429

How I know it is right

A cash summary that is wrong is worse than none. Every change passes ten automated checks:

The balance computed from the statement equals the balance the bank reports, every dayPASS
Every line and every entry ends in exactly one state, and matches are one to onePASS
All 22 planted issues are caught with the right reason, with no false alarmsPASS
Aging adds up to open invoices and the forecast starts from today's balancePASS

Result

Output of the test case: 66 daily runs, July to September 2026, over 927 lines from two banks.

98.1%reconciled or booked automaticallylast day of the period
22issues caughtunbooked receipts, duplicates, mismatches
3cash alertsforecast below the minimum

The team stops building the reconciliation and the cash flow: every morning it gets what is fine, what to fix and how much cash there will be.

Deliverables

  • resumen_diario.md: the morning summary, ready to send by email or Teams.
  • exceptions.csv: one open item per row, with the reason and the suggested invoice.
  • daily_control.xlsx: open items, receivables, cash forecast and the reconciled statement.
  • history.csv: the daily trend, for a dashboard.
Next caseAccounts payable control