Announcing the launch of the Saudi Zatca-2 E-Invoicing app on FrappeCloud

And for the CSR config I just use the code you’ve provided earlier. Correct?

it is sample for sanbox testing. For production and simulation, you need to put your company parameters.


@Support-at-ERPgulf please help me to solve this warnings and errors

put something in address line 1 and 2


thank you for valuable response.

i have added address line 1 and line 2 but it showing “Invoice tax categories MUST be coded using UNCL5305 code list” error message

Are you using item-tax template? So inside that there is tax category and reason. You need to give values there .

After inputting the CSR configuration. I am trying to check for compliance and keep getting this message"
image_2024-09-04_130259605

Is there an updated tutorial that reflects any changes done to the app and how it should be used? It would be greatly appreciated if we can have a documentation of some sort of the steps to follow in order to set it up properly after the updates that were made.

Thank you.

We are releasing a new tutorial video soon.

My apologies but it seems like there was an issue from my side originally in generating the Compliance CSID. I’ve managed to do so and this is the message I am getting when I generate it:

Blockquote{“requestID”:1234567890123,“dispositionMessage”:“ISSUED”,“binarySecurityToken”:“TUlJQ2N6Q0NBaHFnQXdJQkFnSUdBWkc4akFTcU1Bb0dDQ3FHU000OUJBTUNNQlV4RXpBUkJnTlZCQU1NQ21WSmJuWnZhV05wYm1jd0hoY05NalF3T1RBME1UQXhPVE16V2hjTk1qa3dPVEF6TWpFd01EQXdXakJ3TVFzd0NRWURWUVFHRXdKVFFURVlNQllHQTFVRUN3d1BNekV3TmpBeU5UVXpNVEF3TURBek1SNHdIQVlEVlFRS0RCVkZiV3RoYmlCSWIyeGthVzVuSUVOdmJYQmhibmt4SnpBbEJnTlZCQU1NSGxSVFZDMHlNRFV4TWpNd09EQTFMVE14TURZd01qVTFNekV3TURBd016QldNQkFHQnlxR1NNNDlBZ0VHQlN1QkJBQUtBMElBQkZqQndmRm10MXN3YkgvS3FaaUFldlFCLzlBNXM3emxsT0pFakxwU2dxQ0JXN1NvOFBpZ0JQcHJCaWNSTDE5bktlUGRKaHNSUTNna0ZkU0ErQWExTFoyamdmMHdnZm93REFZRFZSMFRBUUgvQkFJd0FEQ0I2UVlEVlIwUkJJSGhNSUhlcElIYk1JSFlNVHN3T1FZRFZRUUVEREl4TFZSVFZId3lMVlJUVkh3ekxXVmtNakptTVdRNExXVTJZVEl0TVRFeE9DMDVZalU0TFdRNVlUaG1NVEZsT0RjMFpqRWZNQjBHQ2dtU0pvbVQ4aXhrQVFFTUR6TXhNRFl3TWpVMU16RXdNREF3TXpFTk1Bc0dBMVVFREF3RU1URXdNREZSTUU4R0ExVUVHZ3hJT1RFNU9TQkxhVzVuSUVaaGFHRmtJR0pwYmlCQlltUjFiR0Y2YVhvZ1VtOWhaQ3dnUW1GdVpHRnlhWGxoSUVScGMzUWdNamsxTVNBdElFRnNhMmh2WW1GeUlETTBOREkwTVJZd0ZBWURWUVFQREExVVpYTjBhVzVuSUhwaGRHTmhNQW9HQ0NxR1NNNDlCQU1DQTBjQU1FUUNJRTNxY3RUeng2VWJnN0xFTEhIeDRNUE12b2JDalBObXJtWGdBdnkvZERYaUFpQk1NMnhlT1ZHLzlMYS96NkI0ckd3dThXQ2tFQVk4VGQ2TlRTOU1qQ0gzVGc9PQ==”,“secret”:“BwCMtS9u0GvRIRmaavyqiZfc9mlisZTMVphEYck+mmQ=”,“errors”:null}

Now when testing for compliance I am getting the following:

Error in compliance: {“validationResults”:{“infoMessages”:,“warningMessages”:[{“type”:“WARNING”,“code”:“BR-KSA-F-06-C9”,“category”:“KSA”,“message”:“[BR-KSA-F-06-C9] - Field character limits for the Seller Address - District field (KSA-3) have not been met. The minimum limit is 1 character and the maximum limit is 127 characters.”,“status”:“WARNING”}],“errorMessages”:[{“type”:“ERROR”,“code”:“XSD_ZATCA_INVALID”,“category”:“XSD validation”,“message”:“Schema validation failed; XML does not comply with UBL 2.1 standards in line with ZATCA specifications. ERROR: org.xml.sax.SAXParseException; lineNumber: 84; columnNumber: 182; cvc-datatype-valid.1.2.1: ‘{"data": [{"company": "PD", "pih": "Z2MUlF0UMgOBHH2bdcyBlwNnocmeWR+ZWzOiHTfGyoQ="}]}’ is not a valid value for ‘base64Binary’.”,“status”:“ERROR”},{“type”:“ERROR”,“code”:“BR-CL-18”,“category”:“EN_16931”,“message”:“Invoice tax categories MUST be coded using UNCL5305 code list”,“status”:“ERROR”}],“status”:“ERROR”},“reportingStatus”:“NOT_REPORTED”,“clearanceStatus”:null,“qrSellertStatus”:null,“qrBuyertStatus”:null}

ERROR in clearance invoice, ZATCA validation: Error in compliance: {“validationResults”:{“infoMessages”:,“warningMessages”:[{“type”:“WARNING”,“code”:“BR-KSA-F-06-C9”,“category”:“KSA”,“message”:“[BR-KSA-F-06-C9] - Field character limits for the Seller Address - District field (KSA-3) have not been met. The minimum limit is 1 character and the maximum limit is 127 characters.”,“status”:“WARNING”}],“errorMessages”:[{“type”:“ERROR”,“code”:“XSD_ZATCA_INVALID”,“category”:“XSD validation”,“message”:“Schema validation failed; XML does not comply with UBL 2.1 standards in line with ZATCA specifications. ERROR: org.xml.sax.SAXParseException; lineNumber: 84; columnNumber: 182; cvc-datatype-valid.1.2.1: ‘{"data": [{"company": "PD", "pih": "Z2MUlF0UMgOBHH2bdcyBlwNnocmeWR+ZWzOiHTfGyoQ="}]}’ is not a valid value for ‘base64Binary’.”,“status”:“ERROR”},{“type”:“ERROR”,“code”:“BR-CL-18”,“category”:“EN_16931”,“message”:“Invoice tax categories MUST be coded using UNCL5305 code list”,“status”:“ERROR”}],“status”:“ERROR”},“reportingStatus”:“NOT_REPORTED”,“clearanceStatus”:null,“qrSellertStatus”:null,“qrBuyertStatus”:null}

Error in Zatca invoice call: ERROR in clearance invoice, ZATCA validation: Error in compliance: {“validationResults”:{“infoMessages”:,“warningMessages”:[{“type”:“WARNING”,“code”:“BR-KSA-F-06-C9”,“category”:“KSA”,“message”:“[BR-KSA-F-06-C9] - Field character limits for the Seller Address - District field (KSA-3) have not been met. The minimum limit is 1 character and the maximum limit is 127 characters.”,“status”:“WARNING”}],“errorMessages”:[{“type”:“ERROR”,“code”:“XSD_ZATCA_INVALID”,“category”:“XSD validation”,“message”:“Schema validation failed; XML does not comply with UBL 2.1 standards in line with ZATCA specifications. ERROR: org.xml.sax.SAXParseException; lineNumber: 84; columnNumber: 182; cvc-datatype-valid.1.2.1: ‘{"data": [{"company": "PD", "pih": "Z2MUlF0UMgOBHH2bdcyBlwNnocmeWR+ZWzOiHTfGyoQ="}]}’ is not a valid value for ‘base64Binary’.”,“status”:“ERROR”},{“type”:“ERROR”,“code”:“BR-CL-18”,“category”:“EN_16931”,“message”:“Invoice tax categories MUST be coded using UNCL5305 code list”,“status”:“ERROR”}],“status”:“ERROR”},“reportingStatus”:“NOT_REPORTED”,“clearanceStatus”:null,“qrSellertStatus”:null,“qrBuyertStatus”:null}

you need to put
address line 1
Address line 2
PO Box
On item-tax-tempalte - tax category and reason code

OTP expired and now every time I generate a new one and try to use it to regenerate the Compliance CSID I get the following error:

Error: OTP is not valid. {“errors”:[{“code”:“Invalid-OTP”,“message”:“The provided OTP is invalid”}]}

Error in creating CSID: Error: OTP is not valid. {“errors”:[{“code”:“Invalid-OTP”,“message”:“The provided OTP is invalid”}]}

For more clarification nothing was changed aside from the OTP and I’ve been trying with a new code every 15 minutes for over 2 hours and still the same error.

make sure you have OTP from simulation portal if you are trying simulation .
On the zatca portal verify that your VAT is matching your CSR config.

Message

After following the instructions, except for being stuck with choosing the “reason code” as I can’t find a reference on how to choose the proper one, these are the errors I am getting now.

Error in compliance: {“validationResults”:{“infoMessages”:[{“type”:“INFO”,“code”:“XSD_ZATCA_VALID”,“category”:“XSD validation”,“message”:“Complied with UBL 2.1 standards in line with ZATCA specifications”,“status”:“PASS”}],“warningMessages”:[{“type”:“WARNING”,“code”:“BR-CO-17”,“category”:“EN_16931”,“message”:“VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals.”,“status”:“WARNING”}],“errorMessages”:[{“type”:“ERROR”,“code”:“BR-CL-18”,“category”:“EN_16931”,“message”:“Invoice tax categories MUST be coded using UNCL5305 code list”,“status”:“ERROR”}],“status”:“ERROR”},“reportingStatus”:“NOT_REPORTED”,“clearanceStatus”:null,“qrSellertStatus”:null,“qrBuyertStatus”:null}

ERROR in clearance invoice, ZATCA validation: Error in compliance: {“validationResults”:{“infoMessages”:[{“type”:“INFO”,“code”:“XSD_ZATCA_VALID”,“category”:“XSD validation”,“message”:“Complied with UBL 2.1 standards in line with ZATCA specifications”,“status”:“PASS”}],“warningMessages”:[{“type”:“WARNING”,“code”:“BR-CO-17”,“category”:“EN_16931”,“message”:“VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals.”,“status”:“WARNING”}],“errorMessages”:[{“type”:“ERROR”,“code”:“BR-CL-18”,“category”:“EN_16931”,“message”:“Invoice tax categories MUST be coded using UNCL5305 code list”,“status”:“ERROR”}],“status”:“ERROR”},“reportingStatus”:“NOT_REPORTED”,“clearanceStatus”:null,“qrSellertStatus”:null,“qrBuyertStatus”:null}

Error in Zatca invoice call: ERROR in clearance invoice, ZATCA validation: Error in compliance: {“validationResults”:{“infoMessages”:[{“type”:“INFO”,“code”:“XSD_ZATCA_VALID”,“category”:“XSD validation”,“message”:“Complied with UBL 2.1 standards in line with ZATCA specifications”,“status”:“PASS”}],“warningMessages”:[{“type”:“WARNING”,“code”:“BR-CO-17”,“category”:“EN_16931”,“message”:“VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals.”,“status”:“WARNING”}],“errorMessages”:[{“type”:“ERROR”,“code”:“BR-CL-18”,“category”:“EN_16931”,“message”:“Invoice tax categories MUST be coded using UNCL5305 code list”,“status”:“ERROR”}],“status”:“ERROR”},“reportingStatus”:“NOT_REPORTED”,“clearanceStatus”:null,“qrSellertStatus”:null,“qrBuyertStatus”:null}

Forgot to mention that I have 6 different “Item Tax Templates”. Not sure if that would help…