Part of the AI back-office PRD — T05, decision D3. ⚠️Immediate reminder embedded: the KM July invoice is due ~2026-07-23 and the recurring template is OFF (frequency=0) — July is MANUAL (operator duplicates in UI or fires the template by hand); this issue automates from August.
Context. Template id=1 "Kiss Metrics Invoice" never auto-fired (children were manual duplications); the May/June drafts were created outside it with different amounts (2×2145.92 + 2×2575.11 vs template 5100). The 2026-07-11 regularization also surfaced probable USD-denominated retainer (≈$2500 → EUR varies at settlement, écarts de change booked to 766 twice already) — the real terms live in the trunk WIP test/km_contract.json: $5,500/mo = $2,500 net-30 + $3,000 deferred +3 months.
Deliverables
Decision D3: agent-fired generation via sandbox+promote (PRD leaning — keeps the mention-audit in-line) vs template auto-fire; recorded in the PRD.
Monthly cron (contract day): generate → dolibarr-invoice-audit mandatory-mention check (blocking) → approval card → gated promote → send to allowlisted client contact (outbound always human-gated) → expected due date journaled per the contracted cycle (net-30 + deferred +3M).
[HUMAN → adc-006] The invoice composition/currency question (2 lines or 2 invoices? USD multicurrency or EUR-at-rate? écarts policy) is ADC adc-006 (framework): an agent drafts the record with alternatives + base légale; the operator Accepts. Wiring waits for adc-006 Accepted — the chosen method must be stable (permanence des méthodes), not improvised per month.
Acceptance: adc-006 Accepted; first agent-fired invoice == its manual twin (dry-run parity); then one real month through the gate.
Execution — Blocked by: #41 + #42 (the gated path it rides) + adc-006 Accepted (drafted under #54's register) · Blocks: T06 dunning accuracy later · Human gates: ⚠️ the July manual invoice ~2026-07-23 (operator action, not this issue's code); adc-006 acceptance. Start:claude --worktree t05-client-invoice from the erp repo root; first command: run the dolibarr-recurring-templates skill on template id=1 for current state; draft adc-006 early so the operator can decide before August. Done means: D3 recorded (PRD row + ADR-line if sized) → dry-run parity evidence + one real gated month posted here → PR merged with Closes #53.
Part of the **AI back-office PRD** — [T05](https://gitea.arcodange.lab/arcodange-org/factory/src/branch/main/vibe/PRD/ai-back-office/task-inventory.md), decision **D3**. ⚠️ **Immediate reminder embedded:** the KM July invoice is due ~**2026-07-23** and the recurring template is OFF (`frequency=0`) — **July is MANUAL** (operator duplicates in UI or fires the template by hand); this issue automates from August.
**Context.** Template id=1 "Kiss Metrics Invoice" never auto-fired (children were manual duplications); the May/June drafts were created outside it with different amounts (2×2145.92 + 2×2575.11 vs template 5100). The 2026-07-11 regularization also surfaced probable **USD-denominated retainer** (≈$2500 → EUR varies at settlement, écarts de change booked to 766 twice already) — the real terms live in the trunk WIP `test/km_contract.json`: $5,500/mo = $2,500 net-30 + $3,000 deferred +3 months.
**Deliverables**
- Decision D3: agent-fired generation via sandbox+promote (PRD leaning — keeps the mention-audit in-line) vs template auto-fire; recorded in the PRD.
- Monthly cron (contract day): generate → `dolibarr-invoice-audit` mandatory-mention check (blocking) → approval card → gated promote → send to allowlisted client contact (outbound always human-gated) → expected due date journaled per the contracted cycle (net-30 + deferred +3M).
- **[HUMAN → adc-006]** The invoice composition/currency question (2 lines or 2 invoices? USD multicurrency or EUR-at-rate? écarts policy) is **ADC adc-006** ([framework](https://gitea.arcodange.lab/arcodange-org/factory/src/branch/main/vibe/PRD/ai-back-office/compliance.md#accounting-decision-records-adc)): an agent drafts the record with alternatives + base légale; the operator Accepts. **Wiring waits for adc-006 Accepted** — the chosen method must be stable (permanence des méthodes), not improvised per month.
**Acceptance:** adc-006 Accepted; first agent-fired invoice == its manual twin (dry-run parity); then one real month through the gate.
---
**Execution** — Blocked by: #41 + #42 (the gated path it rides) + **adc-006 Accepted** (drafted under #54's register) · Blocks: T06 dunning accuracy later · Human gates: ⚠️ the **July manual invoice ~2026-07-23** (operator action, not this issue's code); adc-006 acceptance.
**Start:** `claude --worktree t05-client-invoice` from the erp repo root; first command: run the `dolibarr-recurring-templates` skill on template id=1 for current state; draft adc-006 early so the operator can decide before August.
**Done means:** D3 recorded (PRD row + ADR-line if sized) → dry-run parity evidence + one real gated month posted here → PR merged with `Closes #53`.
arcodange
added this to the P4 — Money loops milestone 2026-07-11 18:19:11 +02:00
Contract facts extracted from the contract_proposal repo (2026-07-15, full sweep of the signable set + cohort review + HANDOFF_BRIEF 2026-06-30). This ANSWERS most of adc-006's factual base — the operator decision remains.
⚠️ Authoritative state: the deal was simplified 2026-06-28 (COO feedback); many May files describe a dead deal. Truth = billing_ops/HANDOFF_BRIEF.md (2026-06-30) + the signable set (base_contract/contrat_cadre.md + amendment_package/amendment_signature.md, 16 articles, verdict SAFE TO SIGN — not signed yet, Gitea PR #1 still Draft).
Billing scheme (FINAL — the one M3+ must follow):
USD is the contractual currency: $2,500 fixed (net 30) + $3,000 deferred (+3 months) = $5,500/mo, 6 active months from 2026-04-23 (→ 2026-10-23; deferred tail → 2027-01-23), fully committed ($33,000 due regardless of early termination).
Invoiced in USD, settled in EUR at the ECB reference rate of the PAYMENT date (Art. 4). The 1.1650 locked rate was REMOVED 2026-06-28 — the EUR amounts €2 145,92/€2 575,11 are that dead lock ($2,500/1.1650, $3,000/1.1650) and "ne s'appliquent plus — ils flottent avec le taux".
2 invoices per cycle, emitted the 23rd (cycle M_N = 23rd→22nd); fixed due the 23rd next month; deferred due +3 months. Wise BE58 9675 4309 4979 (TRWIBEB1XXX). Penalties Art. 12: BCE refi+10 = 12,15 % S1-2026 + 40 € + no early-payment discount.
Mandatory mentions: bilingual TVA "articles 259, 1° et 283-2 CGI — TVA française non applicable, preneur hors UE, autoliquidation le cas échéant" (source-check says 259,1° alone suffices; double visa kept by rigor) + L.441-10 FR/EN + the 11-item checklist (SARL — NOT EURL, capital 1 000 €, SIRET 999 657 455 00013, RCS Évry, NAF 6201Z, TVA FR00 999 657 455; KM identification incl. US EIN; precise due DATE, not "net 30").
Consequences for this issue:
The ~2026-07-23 July invoice (M3) should be USD-denominated ($2,500/$3,000, Dolibarr multicurrency) settled-EUR-at-payment — NOT the dead EUR-locked amounts. That's the adc-006 decision to Accept before emission: (a) USD multicurrency invoices [contract-conform, recommended], vs (b) EUR at ECB rate of issue date + FX regularization [simpler in Dolibarr, drifts from Art. 4].
FAC004–007 (validated today by the replay) carry the old locked EUR amounts. For M1/M2 this was the June-prescribed regularization (predates the lock removal; cash matched to the cent with FX deltas → 766 per adc-002) — economically clean, keep. FAC005/FAC007 (deferred, due 23/08 & 23/09, unpaid): operator + EC choice — leave as-is (EUR-fixed, book FX delta at settlement) or avoir + re-emit in USD to match the final scheme. Document the choice IN adc-006 (permanence going forward starts at M3).
Template id=1 (5 100 €) is doubly dead (wrong amount AND wrong currency scheme) — D3's agent-fired path should build from the contract terms, not the template.
FAC002 (février) confirmed missing the L.441-10 mention (cohort audit) — regularization of an issued invoice = operator decision (avoir+re-issue vs corrective note), risk = DGCCRF fine (L.441-16).
W-8BEN-E deposit at KM unattested in the repo (M1 arrived without withholding — practical risk low; gross-up Art. 5 + 1042-S clause exist). Wire may come from affiliate "Kissmetrics Holdings Inc" (Art. 1 covers it).
Full extraction (versions chain, 4 % final terms — 6-month post-launch window × 12-month collection per client, no cap, paid as-cashed net 30 —, Darnis side-agreement 10 %→5 % perpetual incl. deferred, cohort findings ledger) is in the session record; key facts mirrored in agent memory crm-sales-state.
**Contract facts extracted from the `contract_proposal` repo (2026-07-15, full sweep of the signable set + cohort review + HANDOFF_BRIEF 2026-06-30). This ANSWERS most of adc-006's factual base — the operator decision remains.**
**⚠️ Authoritative state:** the deal was **simplified 2026-06-28** (COO feedback); many May files describe a dead deal. Truth = `billing_ops/HANDOFF_BRIEF.md` (2026-06-30) + the signable set (`base_contract/contrat_cadre.md` + `amendment_package/amendment_signature.md`, 16 articles, verdict SAFE TO SIGN — **not signed yet**, Gitea PR #1 still Draft).
**Billing scheme (FINAL — the one M3+ must follow):**
- **USD is the contractual currency**: $2,500 fixed (net 30) + $3,000 deferred (+3 months) = $5,500/mo, 6 active months from 2026-04-23 (→ 2026-10-23; deferred tail → 2027-01-23), fully committed ($33,000 due regardless of early termination).
- **Invoiced in USD, settled in EUR at the ECB reference rate of the PAYMENT date** (Art. 4). **The 1.1650 locked rate was REMOVED 2026-06-28** — the EUR amounts €2 145,92/€2 575,11 are that dead lock ($2,500/1.1650, $3,000/1.1650) and "ne s'appliquent plus — ils flottent avec le taux".
- 2 invoices per cycle, **emitted the 23rd** (cycle M_N = 23rd→22nd); fixed due the 23rd next month; deferred due +3 months. Wise **BE58 9675 4309 4979** (TRWIBEB1XXX). Penalties Art. 12: BCE refi+10 = **12,15 %** S1-2026 + **40 €** + no early-payment discount.
- Mandatory mentions: bilingual TVA "**articles 259, 1° et 283-2 CGI** — TVA française non applicable, preneur hors UE, autoliquidation le cas échéant" (source-check says 259,1° alone suffices; double visa kept by rigor) + L.441-10 FR/EN + the 11-item checklist (SARL — NOT EURL, capital 1 000 €, SIRET 999 657 455 00013, RCS Évry, NAF 6201Z, TVA FR00 999 657 455; KM identification incl. **US EIN**; precise due DATE, not "net 30").
**Consequences for this issue:**
1. **The ~2026-07-23 July invoice (M3) should be USD-denominated** ($2,500/$3,000, Dolibarr multicurrency) settled-EUR-at-payment — NOT the dead EUR-locked amounts. That's the adc-006 decision to Accept before emission: (a) USD multicurrency invoices [contract-conform, recommended], vs (b) EUR at ECB rate of issue date + FX regularization [simpler in Dolibarr, drifts from Art. 4].
2. **FAC004–007 (validated today by the replay) carry the old locked EUR amounts.** For M1/M2 this was the June-prescribed regularization (predates the lock removal; cash matched to the cent with FX deltas → 766 per adc-002) — economically clean, keep. **FAC005/FAC007 (deferred, due 23/08 & 23/09, unpaid)**: operator + EC choice — leave as-is (EUR-fixed, book FX delta at settlement) or avoir + re-emit in USD to match the final scheme. Document the choice IN adc-006 (permanence going forward starts at M3).
3. Template id=1 (5 100 €) is doubly dead (wrong amount AND wrong currency scheme) — D3's agent-fired path should build from the contract terms, not the template.
4. **FAC002 (février) confirmed missing the L.441-10 mention** (cohort audit) — regularization of an issued invoice = operator decision (avoir+re-issue vs corrective note), risk = DGCCRF fine (L.441-16).
5. W-8BEN-E deposit at KM **unattested** in the repo (M1 arrived without withholding — practical risk low; gross-up Art. 5 + 1042-S clause exist). Wire may come from affiliate "Kissmetrics Holdings Inc" (Art. 1 covers it).
Full extraction (versions chain, 4 % final terms — 6-month post-launch window × 12-month collection per client, no cap, paid as-cashed net 30 —, Darnis side-agreement 10 %→5 % perpetual incl. deferred, cohort findings ledger) is in the session record; key facts mirrored in agent memory `crm-sales-state`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of the AI back-office PRD — T05, decision D3. ⚠️ Immediate reminder embedded: the KM July invoice is due ~2026-07-23 and the recurring template is OFF (
frequency=0) — July is MANUAL (operator duplicates in UI or fires the template by hand); this issue automates from August.Context. Template id=1 "Kiss Metrics Invoice" never auto-fired (children were manual duplications); the May/June drafts were created outside it with different amounts (2×2145.92 + 2×2575.11 vs template 5100). The 2026-07-11 regularization also surfaced probable USD-denominated retainer (≈$2500 → EUR varies at settlement, écarts de change booked to 766 twice already) — the real terms live in the trunk WIP
test/km_contract.json: $5,500/mo = $2,500 net-30 + $3,000 deferred +3 months.Deliverables
dolibarr-invoice-auditmandatory-mention check (blocking) → approval card → gated promote → send to allowlisted client contact (outbound always human-gated) → expected due date journaled per the contracted cycle (net-30 + deferred +3M).Acceptance: adc-006 Accepted; first agent-fired invoice == its manual twin (dry-run parity); then one real month through the gate.
Execution — Blocked by: #41 + #42 (the gated path it rides) + adc-006 Accepted (drafted under #54's register) · Blocks: T06 dunning accuracy later · Human gates: ⚠️ the July manual invoice ~2026-07-23 (operator action, not this issue's code); adc-006 acceptance.
Start:
claude --worktree t05-client-invoicefrom the erp repo root; first command: run thedolibarr-recurring-templatesskill on template id=1 for current state; draft adc-006 early so the operator can decide before August.Done means: D3 recorded (PRD row + ADR-line if sized) → dry-run parity evidence + one real gated month posted here → PR merged with
Closes #53.Contract facts extracted from the
contract_proposalrepo (2026-07-15, full sweep of the signable set + cohort review + HANDOFF_BRIEF 2026-06-30). This ANSWERS most of adc-006's factual base — the operator decision remains.⚠️ Authoritative state: the deal was simplified 2026-06-28 (COO feedback); many May files describe a dead deal. Truth =
billing_ops/HANDOFF_BRIEF.md(2026-06-30) + the signable set (base_contract/contrat_cadre.md+amendment_package/amendment_signature.md, 16 articles, verdict SAFE TO SIGN — not signed yet, Gitea PR #1 still Draft).Billing scheme (FINAL — the one M3+ must follow):
Consequences for this issue:
Full extraction (versions chain, 4 % final terms — 6-month post-launch window × 12-month collection per client, no cap, paid as-cashed net 30 —, Darnis side-agreement 10 %→5 % perpetual incl. deferred, cohort findings ledger) is in the session record; key facts mirrored in agent memory
crm-sales-state.