Pih(previous invoice hash) need from previous invoice or previos any doc(cn/dn) for egs

PIH For current sharing document ( TAX INV / CN/DN/SIMPLIFIED INV ) Need from last cleared document or we must take it based on what we sharing now

Means,
if EGS is sharing TAX Inv now , can we consider last shared documents Hash as PIH even if that is a CN / DN/ Simplified TAX inv
or we must consider like
HASH of last cleared TAX Inv itself as PIH for current TAX Inv
HASH of last cleared CN itself as PIH for current CN
HASH of last cleared DN itself as PIH for current DN
.
Hope our concern is clear from this above briefed, please advise on this !

Thanks in advance

Dear @INFOGATE_R_D

Please note that the PIH for the first sent invoice from the EGS must be a “0” value encoded to base64. This sequence is associated with each device/PCISID onboarded, and after that, it will be the previous hash of the latest submitted invoice, whatever the type of invoice sent when using the same device.

Please do not hesitate to reach out if you require any additional information.

Actually the rule of serial or invoice no from stage 1 say that
for example
no 1 -------- Invoice
No 2---------Invoice
No 3 …Creadit Note
No 4 … Whatever

So what is your previous submitted documnt (PIH)

Hi @idaoud

Just to follow up Q.

Each device will have its own PIH and therefore each device will start from 0 PIH?

Hello Daoud,

Regarding to the PIH and the ICV

If I revoked or renew PCSID, should I reset the PIH and ICV to ‘0’?
Thanks in advance