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

is PIH is required for generating ccid and how generate PIH

PIH for first invoice “0” value encoded to base64. On setting page you give this if your device submitting first invoice. Otherwise PIH of last invoice whenever you submitted.

from the next invoice, PIH is the hash of previous invoice. System takes it from setting page and update it with each invoice.

Please help i am testing invoice by clicking on check compliance.showing me error

Make sure you have ABBR in company doc, and your JSON for PIH having same ABBR in the structure.

yes .it is same

When i was enter OTP by selecting Simulation it is showing “OTP is invalid” but when i select Sandbox it is working but it is working with wrong otp also.

please can you explain why it is accepting wrong otp.

Sandbox does not validate OTP. SIimulation and Production does

@Support-at-ERPgulf i created the CSR data successfully like the format you tell me it should be , and use simulation to create the certification or CSID by using OTP , and it give me that msg

1 Like

@Support-at-ERPgulf I am facing same issue as above screenshot . Is there any prezatca code siging to add in csr.Please refer below screenshot received from zatca

2 Likes

@Support-at-ERPgulf hello guys , happy aid for you all , if there is any solution for this issue , because we all face the same issue in the thread , thanks in advance .

Let us look into this issue .
Join here Launch Meeting - Zoom

We found an issue on CSR validation with a certain set of VAT numbers. Our team trying to fix it. Will update here asap

1 Like

Pushed a bug-fix for CSR . Pls update.

1 Like

Pushed bug-fixes ( Correctred OID on CSR ) . please pull / update.
Lets know if anyone face any more issues.

If you get this error -
Failed to get method for command zatca_erpgulf.zatca_erpgulf.sign_invoice.create_csr with cannot import name ‘NameOID’ from ‘cryptography.hazmat._oid’ (/home/frappe/frappe-bench/env/lib/python3.8/site-packages/cryptography/hazmat/_oid.py)

Upgrade cryptography libraries with following command
env/bin/pip3 install pyOpenSSL --upgrade

If the above not working try this.
pip uninstall pyopenssl
pip uninstall cryptography
pip install pyopenssl
pip install cryptography

Error:
Failed to get method for command zatca_erpgulf.zatca_erpgulf.sign_invoice.create_csr with module ‘cryptography.utils’ has no attribute ‘Enum’

Upgrade cryptography libraries with following command
env/bin/pip3 install pyOpenSSL --upgrade

If the above not working try this.
pip uninstall pyopenssl
pip uninstall cryptography
pip install pyopenssl
pip install cryptography

Error
error in getting the tlv data value
error in getting the entire tlv data
error in getting the tlv data value: object of type ‘NoneType’ has no len()

Check TAX ID in compnay doc. 15 Digit VAT ID.

Is this app cover standard point of sales invoices ?

Working on it. Not yet implemented

On simplified invoice validation, old versions get a QR Validation Error because of the Arabic Name of the Company.

Error in complaince: {“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”:,“errorMessages”:[{“type”:“ERROR”,“code”:“QRCODE_INVALID”,“category”:“QRCODE_VALIDATION”,“message”:“Invalid QR code format, Please follow the ZATCA QR code specifications”,“status”:“ERROR”}],“status”:“ERROR”},“reportingStatus”:“NOT_REPORTED”,“clearanceStatus”:null,“qrSellertStatus”:null,“qrBuyertStatus”:null}

This issue has been fixed by latest update. Please pull or change the company name to Arabic.