add dolibarr-payments-state skill for cash receipt tracking #2

Merged
arcodange merged 1 commits from claude/dolibarr-payments-state into main 2026-05-28 18:53:25 +02:00
Owner

Summary

V2 in the dolibarr-* family. Adds the dolibarr-payments-state skill — payment-state reconciliation and cash-receipt tracking, the natural follow-up to V1's invoice-mention audit.

Three workflows:

  • km-payment-state.sh — per-invoice TTC vs sum-of-payments reconciliation with OK / PARTIAL / UNPAID / OVERPAID classification. More honest than relying on the paye boolean for deferred-cycle agreements.
  • km-payment-timeline.sh — all KissMetrics payments sorted by date with cumulative balance. Foundation for the cohort review's deferred 9-month-cycle tracking (actual cash receipts vs contractual schedule).
  • payments-by-month.sh — monthly aggregation, KM-scoped by default, --all-clients flag for accounting-wide basis.

Also extends dolibarr/SKILL.md:

  • New endpoints in the catalogue: GET /invoices/{id}/payments, GET /bankaccounts, GET /payments (documented as 501 so future workers don't hunt for it).
  • New gotcha: /invoices/{id}/payments returns .date as a string YYYY-MM-DD HH:MM:SS, not unix epoch like everywhere else.
  • Cross-link to the new skill.
  • Captured examples: invoices_12_payments.json, bankaccounts_list.json.

Live findings (V1 baseline of the data)

  • KissMetrics is fully reconciled across all 5 invoices (1 avoir + 4 regular): 8 160 € total cash receipts. None UNPAID, none PARTIAL, none OVERPAID.
  • Cash-receipt timing: Feb 510 € (1 avoir + 2 corrections), Mar 5 100 €, Apr 2 550 €.
  • All KM receipts land on WISE EURO (BE) — matches the IBAN BE58 9675 4309 4979 printed on FAC002's PDF.
  • The Arcodange bank-account catalogue is QONTO (FR), WISE EURO (BE), G.RADUREAU Compte Courant Asso (FR no IBAN).

V3 candidates (still out of scope here)

  • dolibarr-tva-reconciliation — monthly TVA basis preparation
  • dolibarr-recurring-templates — inspect the Kiss Metrics Invoice recurring template
  • arcodange-bank-reco — match Dolibarr payments against actual Qonto/Wise CSV exports

Test plan

  • ./.claude/skills/dolibarr-payments-state/scripts/km-payment-state.sh exits 0 with 5 invoices all OK
  • ./.claude/skills/dolibarr-payments-state/scripts/km-payment-timeline.sh shows 5 payments running to 8 160 €
  • ./.claude/skills/dolibarr-payments-state/scripts/payments-by-month.sh shows 3 months (Feb/Mar/Apr 2026)
  • ./.claude/skills/dolibarr-payments-state/scripts/payments-by-month.sh --all-clients works
  • Outputs diff-clean against captured baselines in examples/
## Summary V2 in the `dolibarr-*` family. Adds the **`dolibarr-payments-state`** skill — payment-state reconciliation and cash-receipt tracking, the natural follow-up to V1's invoice-mention audit. Three workflows: - **`km-payment-state.sh`** — per-invoice TTC vs sum-of-payments reconciliation with `OK` / `PARTIAL` / `UNPAID` / `OVERPAID` classification. More honest than relying on the `paye` boolean for deferred-cycle agreements. - **`km-payment-timeline.sh`** — all KissMetrics payments sorted by date with cumulative balance. Foundation for the cohort review's **deferred 9-month-cycle tracking** (actual cash receipts vs contractual schedule). - **`payments-by-month.sh`** — monthly aggregation, KM-scoped by default, `--all-clients` flag for accounting-wide basis. Also extends `dolibarr/SKILL.md`: - New endpoints in the catalogue: `GET /invoices/{id}/payments`, `GET /bankaccounts`, `GET /payments` (documented as 501 so future workers don't hunt for it). - New gotcha: `/invoices/{id}/payments` returns `.date` as a string `YYYY-MM-DD HH:MM:SS`, not unix epoch like everywhere else. - Cross-link to the new skill. - Captured examples: `invoices_12_payments.json`, `bankaccounts_list.json`. ## Live findings (V1 baseline of the data) - KissMetrics is **fully reconciled across all 5 invoices** (1 avoir + 4 regular): 8 160 € total cash receipts. None UNPAID, none PARTIAL, none OVERPAID. - Cash-receipt timing: Feb 510 € (1 avoir + 2 corrections), Mar 5 100 €, Apr 2 550 €. - All KM receipts land on **WISE EURO (BE)** — matches the IBAN `BE58 9675 4309 4979` printed on FAC002's PDF. - The Arcodange bank-account catalogue is QONTO (FR), WISE EURO (BE), G.RADUREAU Compte Courant Asso (FR no IBAN). ## V3 candidates (still out of scope here) - `dolibarr-tva-reconciliation` — monthly TVA basis preparation - `dolibarr-recurring-templates` — inspect the `Kiss Metrics Invoice` recurring template - `arcodange-bank-reco` — match Dolibarr payments against actual Qonto/Wise CSV exports ## Test plan - [ ] `./.claude/skills/dolibarr-payments-state/scripts/km-payment-state.sh` exits 0 with 5 invoices all `OK` - [ ] `./.claude/skills/dolibarr-payments-state/scripts/km-payment-timeline.sh` shows 5 payments running to 8 160 € - [ ] `./.claude/skills/dolibarr-payments-state/scripts/payments-by-month.sh` shows 3 months (Feb/Mar/Apr 2026) - [ ] `./.claude/skills/dolibarr-payments-state/scripts/payments-by-month.sh --all-clients` works - [ ] Outputs diff-clean against captured baselines in `examples/`
arcodange added 1 commit 2026-05-28 18:53:17 +02:00
V2 in the dolibarr-* family. Three workflows:

- km-payment-state.sh: per-invoice reconciliation (TTC vs sum of
  payments) with OK / PARTIAL / UNPAID / OVERPAID classification.
  More honest than the `paye` boolean for deferred-cycle agreements.
- km-payment-timeline.sh: all KM payments sorted by date with
  cumulative balance — the foundation for cohort-review deferred
  9-month-cycle tracking (actual cash receipts vs contractual schedule).
- payments-by-month.sh: monthly aggregation, KM-scoped by default
  or --all-clients for accounting basis.

Also updates dolibarr/SKILL.md endpoint catalogue with
/invoices/{id}/payments (note the date-as-string vs unix-epoch quirk)
and /bankaccounts, plus captures the corresponding examples.

V1 baseline of live data: KM is fully reconciled across 5 invoices
(1 avoir + 4 regular), 8160 € total cash receipts spread Feb/Mar/Apr 2026,
all on WISE EURO (BE).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
arcodange merged commit d34cba3fa0 into main 2026-05-28 18:53:25 +02:00
arcodange deleted branch claude/dolibarr-payments-state 2026-05-28 18:53:26 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: arcodange-org/erp#2