Attestwire › Rule reference › ATW-CREDIT-NOTE-PROJECT-REFERENCE-UNBOUND

ATW-CREDIT-NOTE-PROJECT-REFERENCE-UNBOUND A UBL credit note cannot carry a project reference

noun · Attestwire · warning · BT-11

For a sample invoice, the library reports: This credit note states a project reference (BT-11 = "PRJ-ERECHNUNG-2026"), and a UBL CreditNote cannot carry one. cac:ProjectReference is not in UBL-CreditNote-2.1.xsd at all — it exists on Invoice and on nothing else — so the reference will be **absent from the generated UBL document**.

Business term
BT-11
Severity
warning

The fix

Drop projectReference, or move the project identifier somewhere the document can hold it: buyerAccountingReference (BT-19, the buyer's cost centre) is the usual home, and contractReference (BT-12) or invoicedObjectIdentifier (BT-18) fit some processes better. If the project reference is load-bearing for your buyer, emit the credit note as CII instead — profile "xrechnung-cii" keeps it.

A passing value

the shape this field expects
"buyerAccountingReference": "PRJ-ERECHNUNG-2026"

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:

TeachingError
{
  "rule": "ATW-CREDIT-NOTE-PROJECT-REFERENCE-UNBOUND",
  "field": "BT-11",
  "severity": "warning",
  "message": "This credit note states a project reference (BT-11 = \"PRJ-ERECHNUNG-2026\"), and a UBL CreditNote cannot carry one. cac:ProjectReference is not in UBL-CreditNote-2.1.xsd at all — it exists on Invoice and on nothing else — so the reference will be **absent from the generated UBL document**. This is a hole in the syntax rather than in this library or in EN 16931: the CII binding has ram:SpecifiedProcuringProject and keeps it, so generateCii on this same input loses nothing.",
  "fix": "Drop projectReference, or move the project identifier somewhere the document can hold it: buyerAccountingReference (BT-19, the buyer's cost centre) is the usual home, and contractReference (BT-12) or invoicedObjectIdentifier (BT-18) fit some processes better. If the project reference is load-bearing for your buyer, emit the credit note as CII instead — profile \"xrechnung-cii\" keeps it.",
  "example": "\"buyerAccountingReference\": \"PRJ-ERECHNUNG-2026\"",
  "xpath": "/ubl:CreditNote",
  "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.