[DTP-Worker] Sprint 4 · Générateur barème commissions vendeurs (ERPNext Backend · roadmap L51)
Plan de commissions cross-cohérent workflow ↔ DocType ↔ RBAC + calcul traçable commission = base × taux (façon banclib/finance.py). Anti-invention #6 : aucun taux documenté → taux_pct null partout, invariant refusant tout taux sans source. Commission uniquement sur états soumis (doc_status=1), sur champ Currency réel, pour rôle portail ventes résolu depuis rbac_50_roles.json. - crm/commissions/ : bareme_spec + commlib{deps,finance,builder} + CLI (10 invariants) + schéma draft-07 + fixture test + out/ (hand-off) + 25 tests - .gitea/workflows/ci.yml : job crm-commissions-tests + ajout au gate - daily report session13 + activity log Vérifs : 25/25 tests · gate CI local vert · régression 202 tests verts. Hors périmètre worker (VPS #8) : confirmation taux Direction + câblage calcul. Auto-score 4Big : 96/100. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "OTO Barème Commissions Ventes · plan de sortie",
|
||||
"type": "object",
|
||||
"required": ["manifest", "commission_plan"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"manifest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"generated_from", "rbac_source", "workflow_source", "doctype_source",
|
||||
"source_version", "bareme_name", "counts", "roles_rbac_utilises", "note_taux"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"generated_from": { "type": "string" },
|
||||
"rbac_source": { "type": "string" },
|
||||
"workflow_source": { "type": "string" },
|
||||
"doctype_source": { "type": "string" },
|
||||
"source_version": { "type": "string" },
|
||||
"bareme_name": { "type": "string" },
|
||||
"counts": {
|
||||
"type": "object",
|
||||
"required": ["evenements", "roles", "taux_a_confirmer"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"evenements": { "type": "integer" },
|
||||
"roles": { "type": "integer" },
|
||||
"taux_a_confirmer": { "type": "integer" }
|
||||
}
|
||||
},
|
||||
"roles_rbac_utilises": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["role_id", "erpnext_role_name"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"role_id": { "type": "string" },
|
||||
"erpnext_role_name": { "type": "string" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"note_taux": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"commission_plan": {
|
||||
"type": "object",
|
||||
"required": ["name", "devise_field", "evenements"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"name": { "type": "string" },
|
||||
"devise_field": { "type": "string" },
|
||||
"evenements": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"update_value", "role_id", "erpnext_role_name", "base_field",
|
||||
"libelle", "taux_pct", "source", "a_confirmer"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"update_value": { "type": "string" },
|
||||
"role_id": { "type": "string" },
|
||||
"erpnext_role_name": { "type": "string" },
|
||||
"base_field": { "type": "string" },
|
||||
"libelle": { "type": "string" },
|
||||
"taux_pct": { "type": ["number", "string", "null"] },
|
||||
"source": { "type": ["string", "null"] },
|
||||
"a_confirmer": { "type": "boolean" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user