Attestwire › Rule reference › ATW-CREDIT-NOTE-NEGATIVE-AMOUNTS
ATW-CREDIT-NOTE-NEGATIVE-AMOUNTS A credit note should state its amounts as positive figures
noun · Attestwire · warning · BT-3 / BT-131
For a sample invoice, the library reports: 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.
- Business term
BT-3 / BT-131- Severity
warning
The fix
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.
A passing value
"invoiceTypeCode": "381", "lines": [{ "quantity": 2, "unitPrice": 250 }]What the library returns
The full error returned by @attestwire/en16931. It includes the rule ID,
affected field and suggested correction. Developers can use this object in their application:
{
"rule": "ATW-CREDIT-NOTE-NEGATIVE-AMOUNTS",
"field": [
"BT-3",
"BT-131"
],
"severity": "warning",
"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.",
"fix": "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.",
"example": "\"invoiceTypeCode\": \"381\", \"lines\": [{ \"quantity\": 2, \"unitPrice\": 250 }]",
"xpath": "/ubl:CreditNote/cac:CreditNoteLine/cbc:LineExtensionAmount",
"docsUrl": "https://github.com/attestwire/en16931#not-implemented-yet"
}
xpath is always a UBL path. On a CII invoice, look for the
matching CII field instead.