Attestwire › Rule reference › ATW-CREDIT-NOTE-UNSUPPORTED
ATW-CREDIT-NOTE-UNSUPPORTED Retired — credit notes are supported now
noun · Attestwire
If you have an error naming this rule, you are looking at output from an older build of this library, which could not handle credit notes. Since @attestwire/en16931 0.5.0 credit notes are supported: set the document type code to "381" and the library emits a UBL CreditNote or a CII document with type code 381, and both read back. This page exists so the old link still lands somewhere useful.
This rule ID is retired. The library no longer emits it.
- Applies to
n/a
The fix
Set invoiceTypeCode to "381" and keep every amount positive: the document type conveys the direction of the money, and stating it twice reverses it. Name the invoice you are crediting in precedingInvoices (BT-25) so the receiver can net the two documents. The four findings that exist only on a credit note are linked below.
What the rule requires
Nothing. This rule id is no longer emitted by any version of the library from 0.5.0 onwards. Earlier builds returned it, fatally, for any invoice whose type code (BT-3) named a credit note.
What replaced it is a field you were already setting: invoiceTypeCode: "381", or any other code on the credit-note half of UNTDID 1001, makes the document a credit note. In UBL that means a real ubl:CreditNote, with its own root element, its own schema and cac:CreditNoteLine. In CII it means the same CrossIndustryInvoice with ram:TypeCode 381, because CII has one document for both.
The rule set does not change. EN 16931 binds the same rule ids to both document types, so every rule on this site applies to a credit note as it applies to an invoice.
Why it exists
A refusal like this one costs a reader real time: they build a workaround, or they choose another library. When the refusal stops being true, deleting the page would leave the old message in every cache and index that ever fetched it while offering nothing in its place. So the URL stays and says what changed.
See also: ATW-CREDIT-NOTE-NEGATIVE-AMOUNTS — a credit note stating negative amounts mixes two idioms; ATW-CREDIT-NOTE-NO-PRECEDING-INVOICE — a credit note that names no preceding invoice; ATW-CREDIT-NOTE-DUE-DATE-UNBOUND — BT-9 has no element on a UBL CreditNote; ATW-CREDIT-NOTE-PROJECT-REFERENCE-UNBOUND — BT-11 has none either.