Can i invest in a company for long and short term at same time in Zerodha?

FIFO method is used because those are the rules set by GOI - https://www.incometaxindia.gov.in/Communications/Circular/910110000000000355.htm.

I think you likely got confused because of the other thread that I quoted above - Portfolio-average price and p&l on kite - #15 by nithin.

Regarding that specific thread, I am also curious about how a broker can provide a share lock-in facility if it ends up violating FIFO. As FIFO needs to be followed always, is the share lock-in facility only for show? (That specific thread has become a little confusing because the user that asked the question (@Gautam) has left the forum and their replies on the forum have been deleted. Only quoted parts of their reply remain. If I remember correctly, the broker they mentioned was HDFC Sec, which provides a lock-in share facility).