Skip to main content
Key: fr-ctc-flow6-v1 Module: github.com/invopop/gobl.fr.ctc Support for Flow 6 (“Cycle de Vie”) lifecycle status messages of the French CTC reform. Carries the CDAR ProcessConditionCode on bill.Status documents exchanged between registered dematerialisation platforms (PDPs) and the Portail Public de Facturation (PPF).

Sources

Extensions

Party Role Code

UNCL 3035 role code carried as the CDAR RoleCode (MDT-158) on each populated party of any Flow 6 lifecycle message — set on Supplier / Customer of both bill.Status and bill.Payment. Labels follow the French CTC specification, which assigns CDAR-specific meanings to WK (dematerialisation platform / operator) and DFH (Portail Public de Facturation). The normalizer fills the obvious defaults (Supplier → SE, Customer → BY) and leaves the rest for the caller to set explicitly.

CDAR Reason Code

Exact CDAR ReasonCode pinned on a bill.Reason under a bill.Status — Status-only (bill.Payment has no Reasons). The CDAR ReasonCode dimension is 1:N with bill.Reason.Key: this extension lets the caller pick the precise code within a bucket. The normalizer derives a default from Reason.Key (see normalizeReason); callers can override to one of the bucket’s other allowed codes.

CDAR Process Condition Code

CDAR ProcessConditionCode (MDT-9) identifying the lifecycle event reported by the Flow 6 message. Unified vocabulary; the rules narrow the allow-list per document type:
  • bill.Status accepts 200 / 201 / 202 / 203 / 204 / 205 / 206 / 207 / 208 / 209 / 210 / 213. The normalizer derives the value from the (StatusLine.Key, Status.Type) pair via processTable.
  • bill.Payment accepts 211 (Paiement transmis) and 212 (Encaissée). The normalizer derives the value from bill.Payment.Type (advice → 211, receipt → 212).
Callers can pre-set the ext directly to pin a specific code (e.g. when round-tripping a parsed CDV).

Flow 6 Condition Code

CDAR CharacteristicTypeCode (MDT-207). Unified vocabulary; the rules narrow the allow-list per document type:
  • On bill.Reason under bill.Status: CBB, DIV, DVA, MAJ (field-level corrections), MAP / MAPTTC / MNA / MNATTC (partial-approval / rejection amounts), ESC / RAB / REM (discount markers). Each Reason carries 0..1 condition classifying its dominant characteristic kind; the full field-level corrections ride the Reason’s bill.Fault entries (fault code = characteristic TypeCode, message = data name and value, paths = XML location).
  • On bill.Payment.Ext: MEN (Encaissé), MPA (Payé), RAP (Reste à payer). The normalizer defaults the value from bill.Payment.Type (receipt → MEN, advice → MPA); partial payments can override to RAP.

Flow 6 Action Code

CDAR RequestedActionCode (MDT-121) carried on a bill.Action under a bill.Status line. Tells the issuer what to do next with the referenced invoice — reissue it, send a credit note, provide more information, etc. The normalizer derives the default from bill.Action.Key (NOA / PIN / NIN / CNF / CNP / CNA / OTH); callers can override directly on the extension when round-tripping a parsed CDV.

Validation Rules