ERROR and Not REPORTED

Is it possible to have status = ERROR and reportingStatus = NOT_REPORTED

Does ZATCA return status ERROR
a. REPORTED
b. NOT REPORTED

a. In case of ERROR REPORTED, the ICV counter should be incremented by 1 for the next invoice
b. In case of ERROR NOT REPORTED, should the ICV counter be incremented by 1 for the next invoice?

Dear @malar ,

the ICV should be incremented by 1 In both scenarios mentioned above (for both reported and not reported), for REPORTED there should be no errors with the XML, but it may has warning(s) and then the status will be reported with warnings, however, in the following responses:

1- 200

2-202

3-400

The ICV should being incremented, alongside with the PIH, it should be reflected to the last generated invoice, ICV & PIH sequence should be maintained in the generation level of the XMLs.

Regards,

thank you @Aturkistani

@Aturkistani
What about error 409 - Invoice was already Reported successfully earlier.
as eg shown on Zatca
it returns status “status”: “ERROR” and “reportingStatus”: “NOT_REPORTED”
Should the ICV be incremented and next PIH reflected to this invoice?

@malar 409 response code is for duplicate invoices where the hash of second or subsequent submission is found to have been successfully reported to ZATCA earlier. All duplicates with exact same hash should be treated as 1 invoice. For next invoice (non-duplicate), ICV should incremented by 1 and PIH should take the hash of previous document (hash of invoice with 409 response - 409 code implies that the hash remained unchanged irrespective of number of duplicate submissions).