Invoice xml hash does not match with qr code invoice xml hash

We are encountering an issue with specific invoices that we have been unable to resolve. We have not been able to pinpoint what is wrong with them. After thoroughly reviewing the invoice details, invoice lines, journals, and other related data, everything appears to be correct.

Error message:
{


   "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":"invalid-invoice-hash",
            "category":"INVOICE_HASHING_ERRORS",
            "message":"The invoice hash API body does not match the (calculated) Hash of the XML",
            "status":"ERROR"
         },
         {
            "type":"ERROR",
            "code":"invoiceHash_QRCODE_INVALID",
            "category":"QRCODE_VALIDATION",
            "message":"Invoice XML hash does not match with QR code invoice XML hash",
            "status":"ERROR"
         }
      ],
      "status":"ERROR"
   },
   "reportingStatus":"NOT_REPORTED"
}

The message doesn’t appear anywhere else in the web and it was not reported. we are using Odoo 15 and the standard zatca module.

Please find bellow a link to the invoice XML hash, and the request data.
I already send an email to the support team and got no response for over a month now.

https://we.tl/t-B5T7fqnmSG

Any help would be appreciated.
Thank you so much.
Regards

Dear @Abderrahmen

Thanks for reaching out,

Can I kindly ask you to answer the below questions to ensure comprehensive support as usual:

1- Are you using our SDK tool? if yes, JAVA or .Net
2- Are you using the latest version of SDK?
3- Did you successfully onboard new device? If yes, what are the steps you followed.
4- Before sending the simplified invoice, what are the steps you following?

Thanks,
Ibrahem Daoud.

@Abderrahmen

Check the QR Code value.
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: 155; cvc-datatype-valid.1.2.1: ‘غير منطبق’ is not a valid value for ‘base64Binary’.

<cbc:EmbeddedDocumentBinaryObject mimeCode="text/plain">&#1594;&#1610;&#1585; &#1605;&#1606;&#1591;&#1576;&#1602;</cbc:EmbeddedDocumentBinaryObject>
1 Like

Hello @idaoud,

Thank you for your response.
1- No, we are using the official zatca module from Odoo. it is a customized solution in python (It is working just fine, the problem only occurs on few invoices).
2- Everything is up to date we update our production regularly to the latest Odoo version.
3- It is not a new device, as i said, we used the same configurations to process invoices just fine (it is still working and we are processing invoices daily).
4- We just create an invoice, confirm it , and process normally. (Odoo uses the Zatca standard for signing, simplified invoices).

As i explained, 99% of the invoices are processed without any problems. But for some reasons, 16 invoices are just blocked due to the error mentioned above. I could not find any documentation on the QR Code error in the official Zatca documentation.

I hope my answers are clear and could help for further assistance.
Thank you.

Best regards,

Dear @Abderrahmen

Thanks for reaching out,

Can I kindly ask you to share the invoices after being signed and rejected with the full request body via the below email to do our investigate and get back to you ASAP?

SP email: sp_support@zatca.gov.sa

Thanks,
Ibrahem Daoud.

1 Like

Dear @idaoud ,

Yes, i’ll be sending the full request body via email in few mintues, but i’am hoping for an answer as I’ve been sending email for the past 30 days with no actual response.

Thank you for your collaboration dear @idaoud, have a great day.

@Abderrahmen Seems your QR Code value is wrong, its some encoded Arabic Text. you can compare the CLEARED XML with the one you uploaded here.

1 Like

@Ather
Thanks for your response man.
Can you please validate the XML of the following invoice also?

Have a good day !

@Abderrahmen Please upload file here, or copy paste. Link is Expired

Good day @Ather ,

Please find below the link for the invoices as requested

Best,

Dear @Ather

Please find bellow attached invoices

Best,

@Abderrahmen
your XML missing this line at top, add this line and check again

<?xml version="1.0" encoding="UTF-8"?>
1 Like