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

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>
This commit is contained in:
2026-06-30 00:07:48 +02:00
parent 09a2cbab0a
commit 64d2cb4237
5 changed files with 52 additions and 17 deletions

View File

@@ -38,6 +38,7 @@ import userSetup from "./scripts/admin/userSetup.ts";
societe contact: lire=281, creer=282
fournisseur: lire=1181, facture lire=1231, facture creer=1232
produit: lire=31, creer=32
banque: lire=111
*/
const WRITE_IDS = [
11, // facture lire
@@ -54,6 +55,7 @@ const WRITE_IDS = [
1232, // fournisseur facture creer
31, // produit lire
32, // produit creer
111, // banque lire — list bank accounts (GET /bankaccounts) to pick account_id
];
const KEY_FILE = ".ai_agent_sandbox.key";