@Ankit_Tiwari , @eCloud , @advancesystem
I am implementing ZATCA-compliant XML invoicing and need clarification on the appropriate value for the unitCode attribute in the <cbc:InvoicedQuantity> tag when the unit of measurement is area in square meters (height in meters multiplied by width in meters).
Just try, if it matches the invoice created by the user on their ERP and the eInvoice passes Zatca validation, then it is correct.
<xsl:if test="exists(cbc:InvoicedQuantity/@unitCode) and string-length(cbc:InvoicedQuantity/@unitCode) > 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) > 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>
Quantity unit of measure is string with a maximum length of 127 characters.