BR-KSA-CL-03: Attachment mimeCode must be one of the allowed types
Every cac:AdditionalDocumentReference/cac:Attachment/cbc:EmbeddedDocumentBinaryObject must have @mimeCode equal to one of: text/csv, text/plain, application/pdf, image/png, image/jpeg, image/tiff, application/acad, application/dwg, drawing/dwg, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.oasis.opendocument.spreadsheet.
How to fix it
Use a listed value, e.g. <cbc:EmbeddedDocumentBinaryObject mimeCode="text/plain">...</cbc:EmbeddedDocumentBinaryObject> for the PIH and QR attachments.
ZATCA's official text
[BR-KSA-CL-03]-Mime code must be according to subset of IANA code list.
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules
Fails when (the condition ZATCA's SDK runs)
not(((not(contains(normalize-space(@mimeCode), ' ')) and contains(' text/csv text/plain application/pdf image/png image/jpeg image/tiff application/acad application/dwg drawing/dwg application/vnd.openxmlformats-officedocument.spreadsheetml.sheet application/vnd.oasis.opendocument.spreadsheet ', concat(' ', normalize-space(@mimeCode), ' ')))))
Related rules
- BR-KSA-99 · Buyer VAT number must not be empty when the element is present
- BR-KSA-CL-01 · Invoice currency code must be a valid ISO 4217 code
- BR-KSA-CL-02 · Every amount's currencyID must match the invoice currency
- BR-KSA-CL-04 · VAT exemption reason code must fit the VAT category
- BR-KSA-CL-06 · Charge reason codes must come from UNTDID 7161
- BR-KSA-CL-07 · Prepayment exemption reason code must fit its VAT category
Validate your invoice against ZATCA's rules
Paste the XML and see every error and warning. It runs in your browser; the invoice goes nowhere.
Validate an invoice or try Matheel