feat(erp): indemnité d'occupation janv→juil 2026 (1 483,23 €) — paiements divers, sans tiers (#89)

Co-authored-by: Gabriel Radureau <[email protected]>
This commit was merged in pull request #89.
This commit is contained in:
2026-08-13 21:09:10 +02:00
committed by arcodange
parent 216dc0213b
commit 480888937f
13 changed files with 20267 additions and 0 deletions
+20
View File
@@ -112,6 +112,17 @@ def stage_rehearse(args) -> None:
results.append({"label": op.get("label", ""), "method": call["method"], "path": call["path"],
"rc": 1 if failed else 0, "result": r})
print(f" [{op.get('label','op')}] {call['method']} {call['path']} -> {'ok' if not failed else r}")
if failed:
# Sans ce garde-fou, {id} est remplacé par le DICTIONNAIRE D'ERREUR : l'URL
# devient un JSON multiligne, urllib lève InvalidURL, et la répétition meurt
# AVANT d'écrire son artefact — on perd la preuve de l'échec qu'on venait de
# produire. Une op ratée doit être consignée, pas faire tomber l'étape.
for follow in op.get("then", []):
results.append({"label": f"{op.get('label','')} :: {follow.get('label','follow-up')}",
"method": follow["method"], "path": follow["path"],
"rc": 1, "result": {"_skipped": "op parente en échec"}})
print(f"{follow.get('label','follow-up')} -> ignoré (op parente en échec)")
continue
for follow in op.get("then", []):
fr = api(base, skey, follow["method"], follow["path"].replace("{id}", str(r)), follow.get("body"))
ffailed = isinstance(fr, dict) and "_error" in fr
@@ -259,6 +270,15 @@ def stage_apply(args) -> None:
print(f" [{op.get('label')}] {call['method']} {call['path']} -> {'ok' if not failed else r}")
if failed and not args.keep_going:
break
if failed:
# --keep-going poursuit la boucle : sans ce garde-fou on retomberait sur le
# même InvalidURL qu'en répétition, en pleine écriture de production.
for follow in op.get("then", []):
results.append({"label": f"{op.get('label')} :: {follow.get('label','follow-up')}",
"method": follow["method"], "path": follow["path"],
"result": {"_skipped": "op parente en échec"}, "ok": False})
print(f"{follow.get('label','follow-up')} -> ignoré (op parente en échec)")
continue
for follow in op.get("then", []):
fr = api(base, key, follow["method"], follow["path"].replace("{id}", str(r)), follow.get("body"))
ffailed = isinstance(fr, dict) and "_error" in fr