Files
erp/.claude/skills/dolibarr-sandbox-write/examples/promote-manifest.json
Gabriel Radureau b945c8de47 feat(payment): first-class transaction_id when recording a règlement
Make the originating bank transaction id a first-class input on payment-record.sh
so every règlement is tied to the real bank movement at write time.

- `transaction_id` is the canonical field (the Qonto/Wise feed tx id); `num` stays
  as a back-compat alias. It's stored on the payment's bank line (llx_bank.num_chq),
  the reconciliation key.
- Recording WITHOUT a transaction_id prints a stderr warning (still posts, but won't
  auto-reconcile) — nudges the agent to always carry it.
- Output normalises to {id, bank_transaction_id, transaction_id}.
- Promote: manifests' payment ops carry transaction_id; promote-plan shows it
  (tx=… or tx=MISSING).

Proven live: customer + supplier record with transaction_id; the `num` alias maps
to the same field; the no-tx warning fires; promote plan/apply carry it through.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-30 00:34:10 +02:00

14 lines
642 B
JSON

[
{ "op": "thirdparty", "ref": "tp1",
"input": { "name": "ACME Conseil", "role": "client", "tva_intra": "FR..." } },
{ "op": "invoice", "ref": "inv1",
"input": { "socid": "@tp1", "kind": "customer", "validate": true,
"lines": [ { "desc": "Prestation conseil", "qty": 2, "price_ht": 500, "tva": 20, "type": "service" },
{ "desc": "Licence annuelle", "qty": 1, "price_ht": 100, "tva": 20, "type": "product" } ] } },
{ "op": "payment",
"input": { "invoice_id": "@inv1", "mode": "VIR", "account_id": 1,
"transaction_id": "WISE-TX-2026-042", "comment": "Acompte" } }
]