errorubl-2.1

UBL-SR-08:Quantity missing unit code

Quantity elements must have unitCode attribute.

We can fix this automatically

AUTO-FIX

Auto-fix: Keep the first occurrence and remove duplicate elements. EN16931 requires exactly one of this element.

No manual changes needed
Upload and Fix Now

Why This Error Matters

Invoice will be rejected by EN16931 validators. These structural constraints ensure consistent processing by receiving systems.

How to Fix It

1

Find quantities

InvoicedQuantity, BaseQuantity, etc.

2

Add unitCode

C62 (unit), HUR (hour), KGM (kg), etc.

Technical Details

XPath: //cbc:InvoicedQuantity/@unitCode, //cbc:BaseQuantity/@unitCode

Common Causes

  • ERP system exports multiple references where only one is allowed in EN16931
  • Data consolidation merged records that should have been deduplicated
  • Template or mapping incorrectly configured to output duplicate elements
  • Manual editing introduced extra elements
  • Invoice conversion from another format did not merge duplicate entries

Frequently Asked Questions

Quantity elements must have unitCode attribute.
Add unitCode attribute using UN/ECE Rec 20. You can also use Invoice Navigator's automatic Fixer tool to correct this instantly.
Yes, UBL-SR-08 is a critical error that will cause invoice rejection. It must be fixed before submission.

Related Errors

Last updated: 16 January 2026

Share this guide: