SchemaGuard by Ironbark Digital · EN 16931 / Peppol / XRechnung Reference
← All 294 EN 16931 / Peppol Rules & Live Validator
WARNING ATW Library Diagnostic BT/BG Fields: BT-3, BT-131

ATW-CREDIT-NOTE-NEGATIVE-AMOUNTS — E-Invoice Validation Rule & Fix

Fixture ID: creditNoteNegative · XPath: /ubl:CreditNote/cac:CreditNoteLine/cbc:LineExtensionAmount

1. Why This Rule Triggers (Diagnostic Message)

This document is a credit note (BT-3 = "381") and states negative amounts: line 1 has a net amount (BT-131) of -1500. EN 16931 credit notes carry **positive** amounts — the document type is what conveys the direction of the money, and stating it twice reverses it. A credit note for 500.00 says 500.00; a credit note for −500.00 says the buyer owes 500.00 more, which is an invoice. The two idioms are both lawful separately: a "negative invoice" (BT-3 = "380" with negative amounts) is a different, equally legal construct, and the schematron rejects neither, so no validator will stop this. That is exactly why it is worth saying here.

2. How to Fix ATW-CREDIT-NOTE-NEGATIVE-AMOUNTS

Make the amounts positive and leave invoiceTypeCode at "381". If you meant a negative invoice instead, set invoiceTypeCode to "380" and keep the negative amounts. Either is fine; both together is not. Whichever you pick, name the invoice being adjusted in precedingInvoices (BT-25) so the receiver can net the two documents.

3. Valid Code / Payload Example

"invoiceTypeCode": "381", "lines": [{ "quantity": 2, "unitPrice": 250 }]
Test & Validate XML / JSON in Live SchemaGuard Validator →