BR-28 A line (id "1") has a negative item gross price (BT-148: -200)
Line 1 (id "1") has a negative item gross price (BT-148: -200). The gross price is the list price *before* the item price discount (BT-147) is taken off, so it is the larger of the two figures by construction — a negative one means the sign has been applied at the wrong end. EN 16931 models every reduction as an allowance or a discount, never as a negative price, and BR-27 says the same thing about the net price (BT-146).
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-148- Severity
fatal
What the library returns
The exact object in result.errors when this rule fires.
Generated by running @attestwire/en16931, not transcribed:
{
"rule": "BR-28",
"field": "BT-148",
"severity": "fatal",
"message": "Line 1 (id \"1\") has a negative item gross price (BT-148: -200). The gross price is the list price *before* the item price discount (BT-147) is taken off, so it is the larger of the two figures by construction — a negative one means the sign has been applied at the wrong end. EN 16931 models every reduction as an allowance or a discount, never as a negative price, and BR-27 says the same thing about the net price (BT-146).",
"fix": "Set line.grossUnitPrice to the positive list price and line.priceDiscount to the reduction. If the price genuinely is the net price, omit grossUnitPrice entirely — this build derives the discount as grossUnitPrice − unitPrice when you do not state it.",
"example": "\"grossUnitPrice\": 200, \"priceDiscount\": 50, \"unitPrice\": 150",
"xpath": "/ubl:Invoice/cac:InvoiceLine[1]/cac:Price/cac:AllowanceCharge/cbc:BaseAmount",
"docsUrl": "https://attestwire.com/rules/BR-28"
}
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
"grossUnitPrice": 200, "priceDiscount": 50, "unitPrice": 150The fix
Set line.grossUnitPrice to the positive list price and line.priceDiscount to the reduction. If the price genuinely is the net price, omit grossUnitPrice entirely — this build derives the discount as grossUnitPrice − unitPrice when you do not state it.