Raman,
The previous company has to make agreement with the new company to take over the liabilities of the previous company like gratuity, PF transfer, leaves, etc as the employees are not at fault. else, they have to make settlement to the employees before merger.
Pon