web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

QR Code encoded in Tag-Length-Value (TLV) in AX 2012 KSA Requirments

(0) ShareShare
ReportReport
Posted on by 110

Hi All

According to the requirements of  KSA  ZATCA for VAT invoices  we need implement the QR code fields to be encoded in Tag-Length-Value (TLV) .

MS added this feature in 365 F&O , Anyone can help how we can implement in AX 2012 ,

ZATCA Requirments :

"
For Electronic Tax Invoices, it is mandatory to generate and print QR code encoded in Base64 format with up to 500 characters that must contain the fields specified
in the below table as per Annex (2) of the Controls, Requirements, Technical Specifications and Procedural Rules for Implementing the Provisions of the E-Invoicing
Regulation.
● The QR code fields shall be encoded in Tag-Length-Value (TLV) format with the tag values specified in the “Tag” column of the adjacent table.
● The TLV encoding shall be as follows:
○ Tag: the tag value as mentioned above stored in one byte
[for tags 1 to 5]
○ Length: the length of the byte array resulted from the UTF8 encoding of the field value. The length shall be stored in one byte.
○ Value: the byte array resulting from the UTF8 encoding of the field value.
[for tag 6]
● Length: length of hash (SHA256 ) is 32 bytes
● Value: the byte array constituting the value of the field
● The QR code must also include a Cryptographic Stamp as specified in the next "

"

I have the same question (0)
  • Verified answer
    Ahmed Siliem Profile Picture
    508 on at

    Hello Hussien,

    We have discussed this issue at length in this post. You can find a code that works fine in dreamz's response but with some required modifications that I mentioned in my response right after it.

    I hope this post helps you.

    If it helped you in the solution, please confirm that by answering yes to the question Did this answer your question?

    Regards,

    Ahmed Siliem

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 663 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 540 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 348 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans