Giter Club home page Giter Club logo

zatca's People

Contributors

dependabot[bot] avatar ihadabs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

zatca's Issues

Query Regarding ZATCA E-Invoicing Integration

Issue 1: Inconsistency in E-Invoicing Statistics

After successfully integrating and following the official documentation provided by ZATCA, I have encountered an inconsistency in the e-invoicing statistics displayed on the Fatoora portal's simulation section. Despite receiving a "status":"PASS", "reportingStatus": "REPORTED" for submitted simplified invoices via the API endpoint "https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/invoices/reporting/single" and despite receiving a "status": "PASS", "clearanceStatus": "CLEARED" for standard invoices via "https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/invoices/clearance/single", the total count of submitted documents does not reflect accurately on the portal. This issue persists even after multiple checks over several days. Also, if I submitted and got a successful response from the API as the document is accepted and while checking on the Fatoora statistics page sometimes it is counted in rejected documents. Why is this mismatch happening? If I received REPORTED, CLEARED status with no error or warning messages, can I confirm that my document is submitted and accepted by ZATCA successfully? Please clarify this.

Issue 2: Lack of Clarity on Tax Amount Calculation

Additionally, I seek clarification on the calculation of the total tax amount payable to ZATCA for the submitted and accepted invoice documents. As there is no provision to retrieve this information from the ZATCA side, could you please confirm whether we need to calculate this amount internally based on the submitted invoices? For instance, if five invoices are successfully submitted and accepted, how do we determine the total tax amount owed to ZATCA?

Could someone please clarify these doubts?

Question about phase1

Hi, I was wondering, if this is compatible with ZATCA phase 1?

Is this the invoice data I need to save in a DB?

{
	sellerName: 'Axenda',
	vatRegistrationNumber: '1234567891',
	invoiceTimestamp: '2021-12-04T00:00:00Z',
	invoiceTotal: '100.00',
	invoiceVatTotal: '15.00',
}

Or do I save the qrCode base64?

Qr code doesn't repeat on multiple pages while printing a document.

Hi there,i am having an issue with my receipt printing code. My receipt is 12 pages and the qr code should repeat on each page as it is fixed on top of page.But it only renders once . Either first or last page. I cannot share the confidential document but i am attaching my code for fixed header which has the qr code in it.

.global-header{ position: fixed; width: 100%; bottom: 0; left: 0; padding: 1em }

<div className="global-header" style={{ display: "block", marginLeft: "auto", width: 180, height: 190 }} > <QRCode value={qrBarcodeInvoice} size={180} /> </div>

tag_1.Tag is not a constructor

invoice.js:14

   Uncaught (in promise) TypeError: tag_1.Tag is not a constructor
at new Invoice (invoice.js:14:13)
at _callee$ (App.jsx:32:25)
at tryCatch (regeneratorRuntime.js:86:17)
at Generator.eval [as _invoke] (regeneratorRuntime.js:66:24)
at Generator.eval [as next] (regeneratorRuntime.js:117:21)

react-scripts ^5.0.0 support (Buffer is not defined)

After updating my existing project to react-scripts ^5.0.0 i have faced an error which is

Uncaught (in promise) ReferenceError: Buffer is not defined

this is because of Buffer is removed in react-scripts ^5.0.0

the issue is in functions named [toHex, toTlv] at the time of creating new object of Invoice

Testing environment:

  • create-react-app
  • node = 16.13.1
  • react-scripts = 5.0.0
  • npm version = 8.1.2

Thanks
image

Buffer Error

when i am using zatca then it gives me below error

Screenshot 2022-07-23 at 1 15 09 PM

The decoded string is wrong when vatRegistrationNumber length is 15

Issue description

When I increase the vatRegistrationNumber to 15 characters/numbers (which is the length of the vat registration number for my KSA company) the decoded string gets missed up.

Steps to reproduce the issue

  1. use this as a sample
     const invoice = new Invoice({
        sellerName: 'شركة تجريبية',
        vatRegistrationNumber: '123456789135785',
        invoiceTimestamp: '2021-02-21T11:20:27.983Z',
        invoiceTotal: '2785.8',
        invoiceVatTotal: '361.8',
      })

      invoice.toBase64()
  1. then take the generated base64 string to https://www.base64decode.org/
  2. decode and check the results

What's the expected result?

a readable string similar to this

��شركة تجريبية�
123456789135785��2021-02-21T11:20:27.983Z��2785.8��361.8

What's the actual result?

image

Buffer is not defined

Uncaught ReferenceError: Buffer is not defined
at toHex (to-hex.js:14:1)
at Tag.toTlv (tag.js:19:1)
at to-tlv.js:10:1
at Array.map ()
at toTlv (to-tlv.js:10:1)
at _c (ComponentToPrint.js:17:1)
at renderWithHooks (react-dom.development.js:16305:1)
at updateForwardRef (react-dom.development.js:19226:1)
at beginWork (react-dom.development.js:21636:1)
at beginWork$1 (react-dom.development.js:27426:1)

**It's work fine on codesandbox** 
_but when it comes to npx create-react-app I get this message_ 

I downloaded Buffer as backage, but it didn't help

import { Invoice } from "@axenda/zatca";

function App() {
console.log(Invoice); --- ok

const invoice = new Invoice({
sellerName: "Axenda",
vatRegistrationNumber: "1234567891",
invoiceTimestamp: "2021-12-04T00:00:00Z",
invoiceTotal: "100.00",
invoiceVatTotal: "15.00",
});

console.log(invoice.toTlv()); --- throw error in console
.....

Buffer not defined

I am using this npm in angular getting issue buffer is not define in toHex(to-hex.js)
should I its support for angular or need to use any other framework could you please give me a solution

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.