Handling Unit Codes Not Found in UN/ECE Recommendation 20 for ZATCA XML

ZATCA documentation recommends using unit codes from UN/ECE Recommendation 20, Revision 16 (2020). However, I noticed the following issues:

  1. Common units like Pieces (PCE), LOT, and EACH (EA) are either missing or not explicitly listed in the UN/ECE file.
  2. Examples in ZATCA’s XML documentation often use codes like PCE, e.g.:
<cbc:InvoicedQuantity unitCode="PCE">2.000000</cbc:InvoicedQuantity>

Yet, PCE does not appear in the UN/ECE list.

Questions:

  1. Can I use codes like PCE, LOT, and EA even if they are not in the UN/ECE list?
  2. Will using such codes cause compliance issues?
  3. Is there any ZATCA-specific guidance for handling units not listed in UN/ECE Recommendation 20?

We use many such units in our business, and I seek clarification to ensure compliance.

@Ankit.K.Tiwari @idaoud @Lina-alrehaili1 @eCloud

I also didn’t find PCE in the list mentioned in XML_Implementation_Standard

Maybe that’s just a recommendation, I don’t find any unit code validation other than having to exist with a maximum of 127 characters.

               <xsl:if test="exists(cbc:InvoicedQuantity/@unitCode) and string-length(cbc:InvoicedQuantity/@unitCode) &gt; 127">
                  <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" location="{schxslt:location(.)}" flag="warning" id="BR-KSA-F-06-C18">
                     <xsl:attribute name="test">exists(cac:InvoiceLine/cbc:InvoicedQuantity/@unitCode) and string-length(cac:InvoiceLine/cbc:InvoicedQuantity/@unitCode) &gt; 127</xsl:attribute>
                     <svrl:text>[BR-KSA-F-06-C18] - Field character limits for Invoiced quantity unit of measure field (BT-130) have not been met. The maximum limit is 127 characters.</svrl:text>
                     <svrl:message-code>BR-KSA-F-06-C18</svrl:message-code>
                     <svrl:message-category>Business rules - integrity constraints (BR)</svrl:message-category>
                  </svrl:failed-assert>
               </xsl:if>
1 Like

@eCloud
Thank you for the valuable information and clarification

For a school client connecting student fee invoices to ZATCA, is “PCE” the correct unit code? The quantity will always be set to 1—is that acceptable?