Calculate Leave Hours Automatically
Overview
Enabling this function will let UpSheets calculate leave hours using the employee setup in Xero and the working days in the given period. The hours column becomes optional and if included will override the calculated value.
Setup
To enable this function, select the Leave Hours option in your user settings and save.
![leave_hours_setting](https://malcolm-en-gb.s3.eu-west-1.amazonaws.com/instances/j0x2GOjMS3/resources/UhoZiF9KHf/leave_hours_setting.png)
Note: In order for this function to work, the Pay Item for Annual Leave must be named Annual Leave. If you have modified this value, please contact us.
Defaulting Leave Hours
When importing a file that includes Leave, the Hours column will display as Hours* and be optional.
If a value is provided in this field for any lines in a file, UpSheets will use this value. For all lines that do not have a value, UpSheets will calculate the hours automatically.
![leave_hours_select](https://malcolm-en-gb.s3.eu-west-1.amazonaws.com/instances/j0x2GOjMS3/resources/YNZgfZHkE8/leave_hours_select.png)
When the file is validated, the number of hours is calculated automatically.
![leave_hours_validated](https://malcolm-en-gb.s3.eu-west-1.amazonaws.com/instances/j0x2GOjMS3/resources/kfep1UO5xp/leave_hours_validated.png)
The calculation is made using the employee setup in Xero and uses the number of working days between the date
and end_date
of the imported line.
If the dates cover multiple pay periods, the calculation will include the appropriate amounts based on the number of days in each period (these will often differ for monthly employees).
![leave_hours_uploaded](https://malcolm-en-gb.s3.eu-west-1.amazonaws.com/instances/j0x2GOjMS3/resources/ZH041ZkTgV/leave_hours_uploaded.png)