A witness can refer to any writing they made themselves at the time of the transaction or shortly thereafter if it's deemed likely that the transaction was still fresh in their memory.
If a witness read a writing made by another person within the timeframe mentioned above and knew it to be correct, they can also refer to it.
With the court's permission, a witness may refer to a copy of a document if there's a sufficient reason for not producing the original, according to the Indian Evidence Act.
Section 159 of the Indian Evidence Act, 1872 addresses the process of refreshing a witness's memory while under examination.
It allows a witness to use writings or copies of documents to jog their memory regarding a transaction they're being questioned about.