add arcodange-bank-reco — Qonto + Wise reconciliation against Dolibarr

V6 — the first cross-system skill (under arcodange-* not dolibarr-*).
Closes the loop between what Dolibarr says (ERP-internal) and what the
bank actually saw.

What ships:
- arcodange-bank-reco/scripts/bank-curl.sh        unified read-only wrapper for Qonto + Wise
- arcodange-bank-reco/scripts/bank-probe.sh       auth + discovery (org slug, profile id, balances)
- arcodange-bank-reco/scripts/qonto-transactions  Qonto txn lister with pagination + filters
- arcodange-bank-reco/scripts/wise-transactions   Wise activity lister with --enrich for wire refs
- arcodange-bank-reco/scripts/bank-match.sh       3-bucket reconciliation (matched/bank-only/dol-only)
                                                  with internal Wise↔Qonto consolidation detection
- arcodange-bank-reco/scripts/bank-balance.sh     live balances + Dolibarr cumulative-by-fk_account

The headline bank-curl.sh is SCA-aware (Wise RSA dance) even though we
don't end up using it: the EU statement endpoint is region-blocked
("Funding transfers and retrieving balance statements via API are not
supported except for accounts based in the US, Canada, Australia, New
Zealand, Singapore, and Malaysia" per Wise docs). The wrapper supports
SCA so when/if Wise opens it, we're ready.

The pivot that unblocked Wise incoming: /v1/profiles/{pid}/activities
(documented at https://docs.wise.com/api-reference/activity/activitylist.md)
returns ALL movements in a unified HTML-tagged feed, no SCA required.
Parsing strips the HTML and recovers structured amount/sign/currency.

CLI integration:
- bin/arcodange bank {probe,qonto-transactions,wise-transactions,match,balance,curl}
- dolibarr/SKILL.md catalogue + Pointers updated
- dolibarr/README.md env schema extended with QONTO_*, WISE_*

Live baseline findings to raise with the cohort review (captured in
examples/bank-match-2026-01-to-05.txt):
- Wise 2026-05-29 +2147 EUR Kissmetrics NOT YET in Dolibarr
- Qonto bank-only: MISTRAL.AI 172.68, CLAUDE.AI 180, URSSAF 493, FOUREZ +1000
- 6 movements matched cleanly across Jan-May 2026
- Wise→Qonto 5000 EUR consolidation on 2026-03-13 auto-detected as internal
- Live balance: Qonto 4191.54 + Wise 5308.25 = 9499.79 EUR

V7 candidates noted in SKILL.md out-of-scope: reference-based matching
via the Wise --enrich wire refs (FOR INVOICE FAC***), multi-row Dolibarr
sub-payment aggregation, smarter avoir cycle handling.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-31 13:57:21 +02:00
parent 4252a88681
commit bd90266372
15 changed files with 1153 additions and 1 deletions

View File

@@ -0,0 +1,36 @@
# Bank reconciliation: 2026-01-01 → 2026-05-31 (window ±7d, fees: off)
=== MATCHED (6 bank ↔ Dolibarr) ===
Qonto 2026-01-27 - 50.00 card Wise *Plan ↔ supplier FAF2026001 (2026-01-26, Δ-1d)
Wise 2026-02-05 + 510.00 TRANSFER Kissmetrics Holdings Inc ↔ customer FAC001-CL0001001 (2026-02-05, Δ+0d)
Wise 2026-03-06 + 5100.00 TRANSFER Kissmetrics Holdings Inc ↔ customer FAC002-CL0001002 (2026-03-12, Δ+6d)
Qonto 2026-03-13 - 612.00 transfer DARNIS OPERATIONS ↔ supplier FAF2026008 (2026-03-13, Δ+0d)
Wise 2026-04-20 + 2550.00 TRANSFER Kissmetrics Holdings Inc ↔ customer FAC003-CL0001003 (2026-04-20, Δ+0d)
Qonto 2026-05-10 - 306.00 transfer DARNIS OPERATIONS ↔ supplier FAF2026009 (2026-05-10, Δ+0d)
=== INTERNAL (Wise↔Qonto consolidations, 1) ===
Wise 2026-03-13 - 5000.00 TRANSFER ARCODANGE ↔ Qonto 2026-03-13 +5000.00
=== BANK-ONLY (8 bank movements without Dolibarr counterpart) ===
Qonto 2026-01-16 + 5.22 qonto_fee Qonto
Qonto 2026-01-21 + 1000.00 income FOUREZ Quentin
Wise 2026-01-26 - 50.00 FEATURE_CHARGE For your account plan
Wise 2026-01-26 + 50.00 BALANCE_DEPOSIT To EUR
Qonto 2026-04-03 - 172.68 card MISTRAL.AI
Qonto 2026-04-13 - 180.00 card CLAUDE.AI SUBSCRIPTION
Qonto 2026-05-22 - 493.00 direct_debit URSSAF D ILE DE FRANCE
Wise 2026-05-29 + 2147.00 TRANSFER Kissmetrics Holdings Inc
=== DOLIBARR-ONLY (9 Dolibarr payments without bank movement) ===
supplier 2026-01-04 1.99 FAF2026003 (fk_account=3)
supplier 2026-01-06 202.80 FAF2026005 (fk_account=3)
supplier 2026-01-09 55.93 FAF2026002 (fk_account=3)
supplier 2026-01-09 148.80 FAF2026004 (fk_account=3)
supplier 2026-01-12 8.43 FAF2026006 (fk_account=3)
supplier 2026-01-15 1.30 FAF2026002 (fk_account=3)
supplier 2026-01-17 3.20 FAF2026007 (fk_account=3)
customer 2026-02-05 -510.00 AVC001-CL0001001 (fk_account=2)
customer 2026-02-05 510.00 FAC001-CL00001 (fk_account=2)
--------------------------------------------------------------------------------
# 6 matched, 1 internal, 8 bank-only, 9 dolibarr-only