Dear @hariomojha please note that ICV and PIH sequence continues per CSID irrespective of the type of document and irrespective of acceptance status of the document. Simply put, every new document you generate should take the hash value from immediately preceding document and increment ICV by 1 based on immediately preceding document irrespective of type and status.
Consider below:
| Document | ICV | PIH | Status |
|---|---|---|---|
| Inv 1 | 1 | Equivalent of 0 (value is provided within Data Dictionary) | Accepted |
| Inv 2 | 2 | hash(Inv 1) | Rejected |
| Inv 3 | 3 | hash(Inv 2) | Accepted |
| CN 1 | 4 | hash(Inv 3) | Accepted |
| Inv 2 (fixed) | 5 | hash**(CN 1)** | Accepted |
| CN 2 | 6 | hash(Inv 2 fixed) | Accepted |
| DN 1 | 7 | hash(CN 2) | Accepted |
| Inv 4 | 8 | hash(DN 1) | Accepted |
| CN 3 | 9 | hash(Inv 4) | Rejected |
| Inv 5 | 10 | hash(CN 3) | Accepted |
| CN 3 (fixed) | 11 | hash(Inv 5) | Accepted |
| DN 2 | 12 | hash(CN 3 fixed) | Accepted |