SchemaGuard by Ironbark Digital · EN 16931 / Peppol / XRechnung Reference
← All 294 EN 16931 / Peppol Rules & Live Validator
FATAL Official EN 16931 / Peppol / CIUS Rule BT/BG Fields: BT-146

BR-27 — E-Invoice Validation Rule & Fix

Fixture ID: lineNegativePrice · XPath: /ubl:Invoice/cac:InvoiceLine[1]/cac:Price/cbc:PriceAmount

1. Why This Rule Triggers (Diagnostic Message)

Line 1 (id "1") has a negative item net price (BT-146: -5). The net price must never be negative — EN 16931 models reductions as allowances, not as negative prices.

2. How to Fix BR-27

Make unitPrice positive and express the reduction as a line allowance instead — line.allowances[] carries the amount (BT-136), an optional base amount and percentage (BT-137/BT-138) and a reason (BT-139/BT-140), and it is subtracted from the line net amount for you. That is the mechanism EN 16931 intends here. To reverse a supply entirely, issue a credit note: set invoiceTypeCode to "381" and state the amounts positively, with precedingInvoices naming the invoice you are crediting (BT-25). The document type, not the sign, is what conveys the direction. "384" (corrected invoice) is the third option, for a process that replaces the earlier document rather than adjusting it.

3. Valid Code / Payload Example

"unitPrice": 150
Test & Validate XML / JSON in Live SchemaGuard Validator →