If PCSID has expired, and some invoices have been generated with the expired PCSID but not posted to ZATCA. Now, when PCSID has been renewed, the invoices will be regenerated using the PIH, counter, information as in the old invoice?
e.g.: I created 5 invoices, 2nd one was created with expired PCSID. Now when I regenerate this invoice, I should use Hash of 1st invoice as PIH to post 2nd invoice. Kindly confirm.
Have you faced the given scenario in the same EGS unit? Because it’s not possible to have such a scenario in the same EGS unit. Let me explain:
You have created 5 invoices from the same EGS, but the second invoice has been signed with an expired PCSID while the rest have been signed with a valid PCSID. However, this is not possible because each EGS has its own one PCSID and not multiple ones. So, the EGS can’t sign invoices with different PCSIDs, only one. Either valid or expired. You can’t have both on the same EGS unit.
If your question is about having multiple EGSs and one has an expired certificate and the other has a valid certificate, then please note that the PIH is being counted separately. Because each EGS with its own PCSID will only consider the PIH of the reported/cleared invoices from its generated invoices only. Even if there are multiple EGSs under the same VAT, each EGS will be isolated from the other regarding PIH.
If you have faced an error that prevented you from submitting your 2nd invoice correctly due to any reason, then after fixing the issue, you should put the PIH of the last submitted invoice regardless of whether it’s accepted or rejected. So, you have submitted 5 invoices and the 2nd one is rejected, then the 3rd invoice should include the invoice hash of the 2nd invoice. (Even if it’s rejected, it’s still the last submitted to ZATCA). So, if you have submitted invoice number 5 and it’s the last submitted invoice, then the 2nd invoice (which the invoice is rejected previously) should have the invoice hash of invoice number 5 as a PIH after fixing it.
I hope this answers your question. Please do not hesitate to reach out if you have any further questions.
Let me clear, the invoices where created when PCSID was not expired. 4 of them were shared with ZATCA successfully, but the 2nd invoice was not shared. (let’s assume it was simplified invoice created in offline mode)
Now when the the PCSID has been renewed, the 2nd invoice is still pending to be shared with ZATCA.
And with the renewed PCSID it shall be shared with the same information without any modifications. The PIH should be of the 1st invoice. Also 2nd invoice hash shall also not be changed as it’s been used in the 3rd as PIH.