feat(skills,cli): supplier avoirs + banque lire (bank-account discovery) #25

Merged
arcodange merged 1 commits from claude/dolibarr-last-bits into main 2026-06-30 00:08:08 +02:00
Owner

The two remaining V9 follow-ups, both proven live on the sandbox.

Supplier avoirs (avoir fournisseur)

creditnote-create.sh gains kind:"supplier" → an avoir on /supplierinvoices (type=2 + fk_facture_source, carries ref_supplier). Customer path unchanged.

customer:  AVC002-CL0009001   total_ttc -240   fk_facture_source=26   validated
supplier:  AVF2026001         total_ttc -144   ref_supplier=AV-2026-77, source=17, validated

Bank-account discovery (banque lire, rights 111)

bank-accounts.sh + arcodange sandbox accounts list accounts so a payment can pick its account_id:

id   label                            bank    currency
1    QONTO                            QONTO   EUR
2    WISE EURO                        WISE    EUR
3    G.RADUREAU Compte Courant Asso           EUR

The right is added to the provisioner's WRITE_IDS (so a fresh provisionSandbox.ts includes it); the existing ai_agent_sandbox user was granted it live in the sandbox DB (a single banque/lire read row, mirroring the rows the POC's assignRights creates). GET /bankaccounts returns 404 → empty before, the 3 accounts after.

That closes the V9 follow-up list — the write skill now covers fiches, factures (lines + supplier refs), règlements, customer + supplier avoirs, and account discovery, all promotable to prod via the gated arcodange promote flow.

🤖 Generated with Claude Code

The two remaining V9 follow-ups, both proven live on the sandbox. ### Supplier avoirs (avoir fournisseur) `creditnote-create.sh` gains `kind:"supplier"` → an avoir on `/supplierinvoices` (`type=2` + `fk_facture_source`, carries `ref_supplier`). Customer path unchanged. ``` customer: AVC002-CL0009001 total_ttc -240 fk_facture_source=26 validated supplier: AVF2026001 total_ttc -144 ref_supplier=AV-2026-77, source=17, validated ``` ### Bank-account discovery (`banque lire`, rights 111) `bank-accounts.sh` + `arcodange sandbox accounts` list accounts so a payment can pick its `account_id`: ``` id label bank currency 1 QONTO QONTO EUR 2 WISE EURO WISE EUR 3 G.RADUREAU Compte Courant Asso EUR ``` The right is added to the provisioner's `WRITE_IDS` (so a fresh `provisionSandbox.ts` includes it); the existing `ai_agent_sandbox` user was granted it live in the sandbox DB (a single `banque/lire` read row, mirroring the rows the POC's `assignRights` creates). `GET /bankaccounts` returns 404 → empty before, the 3 accounts after. That closes the V9 follow-up list — the write skill now covers fiches, factures (lines + supplier refs), règlements, **customer + supplier avoirs**, and account discovery, all promotable to prod via the gated `arcodange promote` flow. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
arcodange added 1 commit 2026-06-30 00:08:02 +02:00
The two V9 follow-ups, both proven live on the sandbox.

- creditnote-create.sh: `kind:"supplier"` makes an avoir fournisseur on
  /supplierinvoices (type=2 + fk_facture_source, carries ref_supplier); default
  customer path unchanged. Proven: customer AVC002 (-240) + supplier AVF2026001
  (-144, ref_supplier carried, linked to source, validated).
- bank-accounts.sh + `arcodange sandbox accounts`: list bank accounts (id/label/
  bank) so a payment can pick its account_id. Needs `banque lire` (rights 111),
  now added to the provisioner's WRITE_IDS so fresh runs include it; the existing
  ai_agent_sandbox user was granted it live. GET /bankaccounts now returns the 3
  accounts (QONTO, WISE EURO, Compte Courant Asso).
- SKILL.md: supplier-avoir example + accounts helper + updated banque-lire note.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
arcodange merged commit 463e10a417 into main 2026-06-30 00:08:08 +02:00
arcodange deleted branch claude/dolibarr-last-bits 2026-06-30 00:08:08 +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#25