Preskočiť na obsah
Späť na blog
ValidationPublikované 6. októbra 20268 min čítania

BR-S-02 is not the problem. Finding the field in your ERP is.

Peppol and EN 16931 rejections name a rule, not the place to fix it. How to get from BR-S-02 or PEPPOL-EN16931-R003 to the master-data field, the CSV column or the SAP IDoc segment that caused it — and why the fix often belongs in master data, not in the invoice.

Anyone who has run e-invoicing for a few weeks knows this message: "[BR-S-02] An Invoice that contains an Invoice line where the VAT category code is Standard rated shall contain the Seller VAT Identifier (BT-31)…". The rule is correct. It is also almost useless to the person who has to fix it. It tells you what is missing in the XML. It does not tell you where that value comes from in your ERP, whether it is a one-off typo or a hole in your master data, or whether the same thing will happen on the next fifty invoices.

Why rule messages send you in circles

Schematron rules are written against the output document. Your people work in the input system. Between the two sits a mapping, and the error message only speaks the language of one side.

  • The rule names a business term (BT-31) and an XPath. Your accountant knows a field called "VAT registration number" on the company card.
  • One missing value often fires several rules at once — BR-S-02, BR-S-03 and BR-Z-02 can all mean "the seller has no VAT id". Three errors, one cause.
  • The same cause hides behind different rule ids in different rule sets: a missing buyer reference is PEPPOL-EN16931-R003 in Peppol and BR-DE-15 in XRechnung.
  • For a "value is missing" rule, the location in the report is the parent element or the document root — not the place where the value should have been.

So the support ticket goes to IT, IT looks at the XML, the XML looks fine apart from the missing element, and someone eventually opens the ERP and starts guessing.

Three questions every rejection should answer

  • What is actually wrong, in plain language? Not the rule text — the cause.
  • Where does the fix belong? In master data (the customer or company record), in this one document, in the mapping between systems, in routing, or nowhere on your side.
  • Which field, exactly? The CSV column, the IDoc segment and partner role, the Business Central field — whatever your system calls it.

The second question matters most. A fix in master data is done once and every later invoice is right. A fix in the document has to be repeated each time. Teams that keep correcting single invoices are usually fixing the wrong layer.

Master data, document or mapping?

Some examples of how the same kind of rejection lands in different places:

  • Seller VAT id missing — almost always master data: the company record or the sales organisation has no VAT number, or it sits in a field the export does not read.
  • Buyer reference missing on a German B2G invoice — the document: the Leitweg-ID belongs on this invoice, usually from the order.
  • Wrong unit code or tax category on every line — mapping: the export translates your internal codes into the wrong standard codes.
  • Receiver not found on Peppol — routing: the endpoint id or scheme is wrong, or the receiver is not registered.

How MyInvoice answers it

Every MyInvoice response with findings now carries diagnostics next to the familiar errors. One diagnostic per cause, not per rule. Each one gives the cause and the fix in plain language, the fix location (master_data, document, mapping, routing or platform), who it concerns (the seller, the buyer, a specific line) and, when we can prove it, the exact source field in your own input.

{
  "symptom": "seller-vat-id-missing",
  "terms": ["BT-31"],
  "findings": [{ "rule": "BR-S-02" }, { "rule": "BR-S-03" }],
  "subject": { "kind": "seller" },
  "source": { "connector": "csv", "path": "seller_vat_id" },
  "fix_location": "master_data"
}

For a SAP IDoc that path is a segment and partner role, for Business Central or Dynamics 365 F&O it is the field of the export, for a CSV it is the column, for a UBL file the XPath. When the source cannot be proven for certain, the diagnostic leaves it out rather than guessing — a wrong pointer costs more time than none.

The texts come in English, German and Croatian. The diagnosis is deterministic: a versioned knowledge base of causes and fixes over the official rule sets, no AI in the verdict. And if you leave the diagnosis log switched on, each diagnostic also tells you how often the same cause hit the same customer in the last 30 days — the quickest way to see that a problem is in master data and not in one invoice.

The same applies when you only want to check a file: /v1/validate takes an invoice you already have — from your ERP or from a supplier — and returns the findings and diagnostics without producing anything.

See the diagnostics in the API docs

Or put one of your own files through the sandbox and look at what comes back.

Try the sandbox