What does FX-SCH-A-275 mean?
Every quantity carries a "unitCode" attribute - the invoiced quantity of a line (BT-130) as well as the item price base quantity (BT-149). This code must come from UN/ECE Rec 20 with the Rec 21 extension. Free text such as "pcs" or a private abbreviation triggers the error. In Factur-X, Mustang checks this through rule FX-SCH-A-275; it matches BR-CL-23 of EN 16931 in substance.
Common causes of FX-SCH-A-275
- The attribute holds free text instead of a code, for example "Stueck", "pcs" or "hrs".
- A valid code is written wrongly, for example lower case instead of upper case ("h87" instead of "H87").
- A self-invented or outdated abbreviation was used.
- The code does not match the goods, for example "KGM" for an item sold by the piece.
How to fix FX-SCH-A-275
- Find the faulty spot in the XML. Open the XML of the invoice and go to field BT-130 along this XPath:
//ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode - Apply the fix. Use a valid unit of measure code from UN/ECE Rec 20 (with the Rec 21 extension), for example 'H87' for piece, 'KGM' for kilogram, 'LTR' for litre, 'MTR' for metre, 'HUR' for hour, 'DAY' for day or 'C62' for a dimensionless unit. Free text such as 'Stk' or 'piece' is not allowed. The 'unitCode' attribute sits on the invoiced quantity (ram:BilledQuantity) and on the price base quantity.
- Validate again. Save the file and validate it again to check that FX-SCH-A-275 is no longer reported.
Use a valid unit of measure code from UN/ECE Rec 20 (with the Rec 21 extension), for example 'H87' for piece, 'KGM' for kilogram, 'LTR' for litre, 'MTR' for metre, 'HUR' for hour, 'DAY' for day or 'C62' for a dimensionless unit. Free text such as 'Stk' or 'piece' is not allowed. The 'unitCode' attribute sits on the invoiced quantity (ram:BilledQuantity) and on the price base quantity.
//ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCodeBefore / after: the XML example
This is the spot in question before and after the fix (Cross Industry Invoice, ZUGFeRD/Factur-X).
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="Stk">3</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="H87">3</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
Frequent questions about FX-SCH-A-275
Which code stands for piece?
Where do I find the allowed codes?
Why does the validator report this although I did give a code?
Related error codes
Check FX-SCH-A-275 automatically
Instead of digging through the XML by hand you can validate your ZUGFeRD or XRechnung file online – upload the PDF or the XML and you get every error with rule ID, affected field, fix and XPath, as a readable report or as JSON through the API.