1. Company should have at least 10 employees on their payroll – while processing the Full and Final the option is available with the Payroll Manager to decide if gratuity has to be paid or not.
2. There is a Madras High Court ruling which mentions that a duration of 4 years and 240 days makes an employee eligible for gratuity.
3. Gratuity is to be paid in case of death, resignation, retirement or termination
  of service
 a) If the employee has died or has had permanent disability then the constraint
  of 5 years is not applicable and he is eligible for gratuity for the period worked
 b) If an employee resigns or retires then he should have had minimum 5 years
  of continuous service. But as per Section 4(2) of the Payment of Gratuity Act
  - if an employee works for more than 6 months in an year than it is considered
  as a year. This makes anyone working for more than 4 years and 6 months eligible
  for gratuity. Companies are free to pay gratuity to employees who have served
  lesser period also.
 c) You can define separate condition for employees whose employment is being
  terminated
 d) For Journalists the minimum period of employment to become eligible for gratuity
  is 3 years. To model this conditions you will need to set the parameter on employee's
  Payroll Details page - refer article for more details.
 e) If an employee is taken for a fixed term contract then gratuity is payable
  if the employment is for one year or more. The option to hire an employee for
  a fixed term contract is explained in the article on HRIS Setup
4. The period of training or internship is not included as employment period. So only confirmed employees are eligible for gratuity. Gratuity is payable from "Date of Joining", the date from which they start working in the company is captured as "Date of Entry"
5. Continuity of employment – if employees are transferred within the group to
  another company their employment contract from one company is terminated and
  a new one is started. In such condition there is continuity of employment and
  period for the purpose of gratuity calculation is taken from earliest date of
  joining in the new company (also referred to as Group Date of Joining). If the
  previous employment in the group company is not captured in EazeWork HRMS then you can
  use the Gratuity Initialization Date parameter to initialize gratuity calculations
  from a date earlier than Date of Joining.
You can setup the period beyond which gratuity is to be paid in Payroll general setup.
2. Once the employee is eligible then the number of years for which gratuity is paid is calculated. If someone has worked for 6 months or more in the last year it is rounded up to 1 year. So 6 years, 6 months of employment is rounded up as 7 years. Similarly if someone has worked fro 5 years 5 months and 20 days he will be paid based on 5 years.
3. The basis for gratuity payment is defined by selecting the applicable heads
  in Deduction and Encashment grid.
  Typically is the heads include Basic, DA
 Gratuity = No of years of service x (Salary basis) x 15 / 26