Rule reference

PEPPOL-EN16931-R121 A line has an item price base quantity (BT-149) of 0, and Peppol requires it to be a positive number above zero

Line 1 has an item price base quantity (BT-149) of 0, and Peppol requires it to be a positive number above zero. BT-149 is the denominator of the price: it says "the unit price is for this many units", which is how you quote 12.50 per 100 sheets instead of 0.125 per sheet. Zero would make the line net amount a division by zero, and a negative base would silently invert the sign of the line. Core EN 16931 has no rule on this at all, which is precisely why documents with a zero base reach validators that then fail on the arithmetic instead, reporting BR-CO-10 and sending the reader to the wrong place. This is a Peppol BIS Billing 3.0 profile rule: it applies because profile is "peppol-bis-3". It does not apply to the en16931, xrechnung-ubl or xrechnung-cii profiles, whose validators will accept the same document.

This rule is implemented and its error payload below is real, but the long-form write-up — normative text, worked example, divergence note — is not written yet. Everything the library knows about this rule is on this page. Ask and we will prioritise it.

Business term
BT-149
Severity
fatal

What the library returns

The exact object in result.errors when this rule fires. Generated by running @attestwire/en16931, not transcribed:

TeachingError
{
  "rule": "PEPPOL-EN16931-R121",
  "field": "BT-149",
  "severity": "fatal",
  "message": "Line 1 has an item price base quantity (BT-149) of 0, and Peppol requires it to be a positive number above zero. BT-149 is the denominator of the price: it says \"the unit price is for this many units\", which is how you quote 12.50 per 100 sheets instead of 0.125 per sheet. Zero would make the line net amount a division by zero, and a negative base would silently invert the sign of the line. Core EN 16931 has no rule on this at all, which is precisely why documents with a zero base reach validators that then fail on the arithmetic instead, reporting BR-CO-10 and sending the reader to the wrong place. This is a Peppol BIS Billing 3.0 profile rule: it applies because profile is \"peppol-bis-3\". It does not apply to the en16931, xrechnung-ubl or xrechnung-cii profiles, whose validators will accept the same document.",
  "fix": "Set lines[0].baseQuantity to the number of units the unit price covers — 1 in the ordinary case, in which case you can simply omit it. If you meant the invoiced quantity, that is lines[0].quantity, a different term.",
  "example": "\"unitPrice\": 12.5, \"baseQuantity\": 100, \"quantity\": 250",
  "xpath": "/ubl:Invoice/cac:InvoiceLine[1]/cac:Price/cbc:BaseQuantity",
  "docsUrl": "https://attestwire.com/rules/PEPPOL-EN16931-R121"
}

xpath locates the element in the generated UBL document, which is where a KoSIT or Peppol validator will report the same problem.

A passing value

the shape this field expects
"unitPrice": 12.5, "baseQuantity": 100, "quantity": 250

The fix

Set lines[0].baseQuantity to the number of units the unit price covers — 1 in the ordinary case, in which case you can simply omit it. If you meant the invoiced quantity, that is lines[0].quantity, a different term.

Arrived from a stack trace? The docsUrl on every error links straight here. Something wrong on this page — tell us.