Miss A! Posted August 11, 2016 Posted August 11, 2016 (edited) Hello Forum, Please assist me, i am struggling to get a working calculation for sick leave field, how to go about calculating how many sick leave days are due for employees if every employee has 30 sick leave days in 3 years, which will lapse if not taken. Can someone please point me in the right direction how to go about all this? Please ask if anymore question as i am also in an ambiguous situation. Many thanks, Miss Amen. Edited August 11, 2016 by Miss A!
comment Posted August 11, 2016 Posted August 11, 2016 (edited) This is more a matter for a relationship than a calculation. Construct a relationship to the table where sick leaves are recorded and make it show the sick leaves taken by the employee in the most recent 3 years. I cannot be more specific than that, because I don't know when exactly does a year end. Then sum the days of the related sick leaves and subtract that from 30. Edited August 11, 2016 by comment 1
webko Posted August 11, 2016 Posted August 11, 2016 Also consider the other end of this - up until they have been employed for 2 years and 1 day, they (presumably) don't have 30 days of leave. My company has 10 days of sick leave per year avaialble - 5 days upon employment, 5 days more at the end of the probation period (6 months). then 10 days per year added on the anniversary of employment. So at 1 year and 1 day, they have a maximum of 20 days. 1
Miss A! Posted August 12, 2016 Author Posted August 12, 2016 Thank you comment, will attempt that.... Webko, do you have this implementation in Filemaker? If so, please share some light. many Thanks
Agnes Riley Posted August 12, 2016 Posted August 12, 2016 Sick leave is not an attribute of the employee, such as a hire date or position. Sick leave has a many to one relationship to the person. So as Comment said, you need to set up a sick_leave table and store the sick leave information there, along with the ID of the employee. Then you can show them on a portal. Then you can calculate anything on those records.Sent from my iPad using Tapatalk HD 1
webko Posted August 15, 2016 Posted August 15, 2016 A very rough version might use a StartDate, and a TimeOfService field ( a number calc field: Get ( CurrentDate ) - StartDate ) Then an AccruedSickLeave: Case ( TimeOfService < 183; 5; TimeOfService < 365; 10; Round ( (TimeOfService) / 365 ; 0 ) *10 ) So, under half a year (roughly) - 5 days. One year ( in a normal non-Leap Year), 10 days, then 10 days per completed year of service. It will be out by some days over a long period of time, and is just off the top of my head rough calc...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now