mrsool / zatca

An unofficial Ruby library for generating ZATCA e-invoices, QR Codes, and submitting e-invoices to ZATCA's servers.
MIT License
36 stars 12 forks source link

Have Implementation Validated by ZATCA #3

Closed obahareth closed 2 years ago

obahareth commented 2 years ago

We're currently in talks with ZATCA to validate this implementation. It's made to match the docs as close as we could understand.

GeeSuth commented 2 years ago

if accepted should I do one In .NET I think .NET it's more popular and used in more systems.

Thanks for sharing

naeem5364 commented 2 years ago

is this approved by zatca?

obahareth commented 2 years ago

is this approved by zatca?

@naeem5364

It is not officially approved or looked at by ZATCA. However ZATCA has released an official SDK, and this Rubygem's output is designed to match the SDK's. You can verify this yourself if you wish, and report any errors here, or make a pull request to fix them.

I personally am in the process of having someone from ZATCA take a look at this gem, but for the meantime the output matches their official SDK.

obahareth commented 2 years ago

if accepted should I do one In .NET I think .NET it's more popular and used in more systems.

Thanks for sharing

@GeeSuth Thank you for the kind words.

Definitely more packages in more languages would help out developers to implement this. We use Ruby and thought to open source our implementation in the hopes that it helps others, many other languages still need an open source implementation for E-Invoicing.

GeeSuth commented 2 years ago

Yes. You are right, I understand it. BTW I finish the Library in .Net https://github.com/GeeSuth/GeeSuthSoft.KSA.ZATCA I'll be happy if you take a look on it

Regards

obahareth commented 2 years ago

@naeem5364 @GeeSuth I just was on a call with the tech team from ZATCA and they helped us fix one minor bug and they were able to successfully parse the output of this library on the call, so we are good to go!

alan-sapaad commented 2 years ago

@obahareth what if the value contains Arabic characters (in seller name), that is outside ASCII set ?

obahareth commented 2 years ago

@alan-sapaad It works out, there was a bug in it that was fixed in the latest release. There's also unit tests for unicode variants.

alan-sapaad commented 2 years ago

Nice, I just saw the test cases. I had also implemented a solution, exactly like this source code. But when I validated it with the SDK, it was not showing arabic in the decoded tags. I just tried with a base64 encoded value from the test case as well.

I think it has to do with the way the SDK is rendering characters ?

GeeSuth commented 2 years ago

@alan-sapaad I face same problem with our tools. https://github.com/GeeSuth/GeeSuthSoft.KSA.ZATCA/issues/1 I was can reflect to Arabic Two<>way , but in ZATCA SDK can't.. I Think the problem was from Console try to write code convert from BASE64 To DATA. with Arabic Content