Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c96deb5ad6 | ||
|
|
b745fdcb43 | ||
|
|
4d26790504 | ||
|
|
bcea21f96b |
@@ -4,7 +4,7 @@
|
|||||||
"_match_rules": "Pattern matched case-insensitively as a regex against the bank label. Optional filters: bank (qonto|wise), side (credit|debit), amount_min, amount_max, type (Wise activity type). All present filters must match.",
|
"_match_rules": "Pattern matched case-insensitively as a regex against the bank label. Optional filters: bank (qonto|wise), side (credit|debit), amount_min, amount_max, type (Wise activity type). All present filters must match.",
|
||||||
"_classifications": {
|
"_classifications": {
|
||||||
"capital_deposit": "Apport en capital social. Dolibarr account 1013 (capital souscrit appelé versé).",
|
"capital_deposit": "Apport en capital social. Dolibarr account 1013 (capital souscrit appelé versé).",
|
||||||
"social_charges": "URSSAF, retraite complémentaire, etc. Dolibarr compte 641, sous-compte dédié (la société prend en charge les cotisations personnelles de son gérant majoritaire : c'est un complément de rémunération). PAS 646, réservé à l'exploitant individuel et aux sociétés à l'IR. PAS 645x non plus, qui vise les cotisations sur salaires — Arcodange n'a aucun salarié et l'opérateur n'est pas employeur. Voir adc-009.",
|
"social_charges": "URSSAF, retraite complémentaire, etc. Dolibarr compte 646 (cotisations personnelles du dirigeant TNS) — PAS 645x, réservé aux cotisations patronales sur salaires : Arcodange n'a aucun salarié.",
|
||||||
"ai_subscription": "Claude / Mistral / OpenAI / similar. Dolibarr account 6262 (frais télécom / abonnements logiciels).",
|
"ai_subscription": "Claude / Mistral / OpenAI / similar. Dolibarr account 6262 (frais télécom / abonnements logiciels).",
|
||||||
"bank_fee": "Plan bancaire, frais d'opération, refunds. Dolibarr account 627 (services bancaires).",
|
"bank_fee": "Plan bancaire, frais d'opération, refunds. Dolibarr account 627 (services bancaires).",
|
||||||
"internal_topup": "Solde Wise/Qonto rechargé pour couvrir un frais immédiat. Often nets out.",
|
"internal_topup": "Solde Wise/Qonto rechargé pour couvrir un frais immédiat. Often nets out.",
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
"classification": "social_charges",
|
"classification": "social_charges",
|
||||||
"bank": "qonto",
|
"bank": "qonto",
|
||||||
"side": "debit",
|
"side": "debit",
|
||||||
"note": "Cotisations sociales personnelles du gérant, appelées par échéancier (0/493/1215/1333 en 2026). Dolibarr : compte 641, sous-compte dédié — voir adc-009. Montants PROVISOIRES, assis sur un forfait début d'activité, régularisables après déclaration des revenus."
|
"note": "Cotisations sociales URSSAF (régime mensuel/trimestriel). Dolibarr: account 645100 (charges de sécurité sociale)."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pattern": "MISTRAL\\.AI",
|
"pattern": "MISTRAL\\.AI",
|
||||||
|
|||||||
@@ -194,22 +194,6 @@ fi
|
|||||||
# an earlier date, which is a numbering break. This bites whenever two documents
|
# an earlier date, which is a numbering break. This bites whenever two documents
|
||||||
# of the same cycle are issued on different days (a deferred part issued after
|
# of the same cycle are issued on different days (a deferred part issued after
|
||||||
# the next fixed part, for instance). Refuse rather than create the break.
|
# the next fixed part, for instance). Refuse rather than create the break.
|
||||||
#
|
|
||||||
# CUSTOMER INVOICES ONLY. L'article 289 impose une numérotation chronologique et
|
|
||||||
# continue aux factures que la société ÉMET. Il ne dit rien de la référence de
|
|
||||||
# classement que Dolibarr attribue aux factures qu'elle REÇOIT : le numéro qui
|
|
||||||
# fait foi pour celles-là est celui du fournisseur, porté par ref_supplier, et la
|
|
||||||
# séquence FAF suit l'ordre d'ENREGISTREMENT — c'est sa construction normale.
|
|
||||||
#
|
|
||||||
# Appliquer la garde aux deux registres produisait un faux positif systématique :
|
|
||||||
# la production porte déjà cinq ruptures dans la séquence FAF (FAF2026003 daté du
|
|
||||||
# 4 janvier suit FAF2026002 daté du 9), et zéro dans la séquence FAC. Toute
|
|
||||||
# facture fournisseur enregistrée après coup — le cas ordinaire, cf. adc-008 qui
|
|
||||||
# prescrit d'enregistrer à la date du document — se heurtait au refus et exigeait
|
|
||||||
# ARCO_ALLOW_BACKDATE. Une garde qu'on outrepasse par routine ne garde plus rien.
|
|
||||||
if [[ "${ENDPOINT}" != "/invoices" ]]; then
|
|
||||||
CHRONO_SKIP=1
|
|
||||||
fi
|
|
||||||
NEW_DATE="$(python3 -c "import json,sys; print(json.loads(sys.argv[1])['date'])" "${BODY}")"
|
NEW_DATE="$(python3 -c "import json,sys; print(json.loads(sys.argv[1])['date'])" "${BODY}")"
|
||||||
LAST="$("${W}" GET "${ENDPOINT}?sortfield=t.rowid&sortorder=DESC&limit=1" 2>/dev/null \
|
LAST="$("${W}" GET "${ENDPOINT}?sortfield=t.rowid&sortorder=DESC&limit=1" 2>/dev/null \
|
||||||
| python3 -c "
|
| python3 -c "
|
||||||
@@ -220,7 +204,7 @@ try:
|
|||||||
else: print('0|-')
|
else: print('0|-')
|
||||||
except Exception: print('0|-')" 2>/dev/null || echo "0|-")"
|
except Exception: print('0|-')" 2>/dev/null || echo "0|-")"
|
||||||
LAST_DATE="${LAST%%|*}"; LAST_REF="${LAST##*|}"
|
LAST_DATE="${LAST%%|*}"; LAST_REF="${LAST##*|}"
|
||||||
if [[ -z "${CHRONO_SKIP:-}" ]] && [[ "${LAST_DATE}" =~ ^[0-9]+$ ]] && (( LAST_DATE > 0 )) && (( NEW_DATE < LAST_DATE )); then
|
if [[ "${LAST_DATE}" =~ ^[0-9]+$ ]] && (( LAST_DATE > 0 )) && (( NEW_DATE < LAST_DATE )); then
|
||||||
if [[ "${ARCO_ALLOW_BACKDATE:-}" != "I-UNDERSTAND-THIS-BREAKS-CHRONOLOGY" ]]; then
|
if [[ "${ARCO_ALLOW_BACKDATE:-}" != "I-UNDERSTAND-THIS-BREAKS-CHRONOLOGY" ]]; then
|
||||||
printf 'invoice-create.sh: REFUSED — chronology break.\n' >&2
|
printf 'invoice-create.sh: REFUSED — chronology break.\n' >&2
|
||||||
printf ' new document dated %s, but %s is already issued at %s.\n' \
|
printf ' new document dated %s, but %s is already issued at %s.\n' \
|
||||||
|
|||||||
+3
-21
@@ -143,13 +143,8 @@ export const SCOPES: Readonly<Record<string, Scope>> = {
|
|||||||
/**
|
/**
|
||||||
* The narrow production writer, used ONLY by the gated promote apply, and only
|
* The narrow production writer, used ONLY by the gated promote apply, and only
|
||||||
* for what that step actually does: create/modify invoices, attach payments.
|
* for what that step actually does: create/modify invoices, attach payments.
|
||||||
* No product creation, no proposals — those are rehearsed then applied by a
|
* No thirdparty creation, no product creation, no proposals — those are
|
||||||
* human when they are genuinely needed.
|
* rehearsed then applied by a human when they are genuinely needed.
|
||||||
* `122` (thirdparties) WAS excluded on that same reasoning, and the reasoning
|
|
||||||
* did not survive contact: a supplier invoice needs a supplier, so the scope
|
|
||||||
* could create the document but not the party it names. The exclusion turned
|
|
||||||
* every new supplier into a manual step in the middle of a gated flow — which
|
|
||||||
* is where discipline erodes.
|
|
||||||
* `162` (contracts) IS included: recording the engagement behind an invoice is
|
* `162` (contracts) IS included: recording the engagement behind an invoice is
|
||||||
* what the piste d'audit fiable asks for, and it recurs (Darnis, then KM).
|
* what the piste d'audit fiable asks for, and it recurs (Darnis, then KM).
|
||||||
*
|
*
|
||||||
@@ -167,20 +162,7 @@ export const SCOPES: Readonly<Record<string, Scope>> = {
|
|||||||
// modification de factures » — les factures fournisseur en sont, et leur
|
// modification de factures » — les factures fournisseur en sont, et leur
|
||||||
// saisie est l'opération la plus courante du back-office. Ajouté après un
|
// saisie est l'opération la plus courante du back-office. Ajouté après un
|
||||||
// 403 en production sur la facture Darnis F1048.
|
// 403 en production sur la facture Darnis F1048.
|
||||||
//
|
rights: [...READ_ONLY, 12, 14, 162, 1232, 2503],
|
||||||
// 122 (tiers) : ajouté sur décision de l'opérateur du 2026-08-15, après un
|
|
||||||
// second 403 — cette fois sur Anthropic PBC, entité américaine distincte
|
|
||||||
// d'Anthropic Ireland, dont la facture ne pouvait être saisie faute de
|
|
||||||
// pouvoir créer le fournisseur qu'elle nomme.
|
|
||||||
//
|
|
||||||
// CE QUE CE DROIT COÛTE, et il faut le dire : Dolibarr le libelle
|
|
||||||
// « Créer/MODIFIER les tiers ». Il n'existe pas de droit de création seule.
|
|
||||||
// Le writer de production peut donc désormais altérer l'identité de
|
|
||||||
// n'importe quel tiers existant — nom, adresse, identifiants fiscaux — et
|
|
||||||
// non seulement en créer. C'est la contrepartie assumée : sans lui, toute
|
|
||||||
// facture d'un fournisseur nouveau s'arrête au milieu du flux gated.
|
|
||||||
// La suppression (125) reste exclue, comme dans tous les scopes.
|
|
||||||
rights: [...READ_ONLY, 12, 14, 122, 162, 1232, 2503],
|
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user