Back to the error catalogue
BR-CO-07BT-140
input

On a line, the allowance reason and its code diverge

When an invoice line allowance (BG-27) carries both a reason in plain text (BT-139) and a reason code (BT-140), the two must indicate the same reason.

Only the issuer holds this value: Factlint reports it and never fabricates it. Test your invoice to find out whether it is affected.

The message your validator prints

Copied verbatim from the sealed artefact: this is the exact sentence the check prints when this rule fails.

[BR-CO-07]-Invoice line allowance reason code (BT-140) and Invoice line allowance reason (BT-139) shall indicate the same type of allowance reason.

Quoted from schematron-cen 1.3.16, licensed under EUPL-1.2.

Common searches around this code

These phrases mirror what an integrator searches for: code, syntax, rule, business field and correction.

BR-CO-07 On a line, the allowance reason and its code divergeBR-CO-07 CEN EN 16931 SchematronBR-CO-07 BT-140[BR-CO-07]-Invoice line allowance reason code (BT-140) and Invoice line allowance reason (BT-139) shall indicate the same type of allowance reason.BR-CO-07 correction

Test your file with this error in mind

Upload the invoice involved: the report will say whether this code appears, where it appears in the document, and whether Factlint can only report it or also fix it.

To automate this check in an ERP flow, call the validation API and link every returned code to its public page.

Why this error happens

At line level the divergence spreads: the reason is often copied from the order line or the price list, while the code stays the one of the discount model applied. A single line is enough to fail the whole document.

How to fix it

Align the two on the reported line. If the allowance comes from a configured model, fix the model: the divergence will be back on the next invoice.

XML correction example

BEFORE (invalid)
<ram:ReasonCode>95</ram:ReasonCode>
<ram:Reason>Remise quantitative</ram:Reason>
AFTER (compliant)
<ram:ReasonCode>68</ram:ReasonCode>
<ram:Reason>Remise quantitative</ram:Reason>