View ProjeQtOr On SourceForge.net
Support us on Capterra
ProjeQtOr free project management software - HR module - Specific right for contract -French "ancienneté" - ProjeQtOr
 
 

HR module - Specific right for contract -French "ancienneté"

More
01 Jul 2020 08:04 #1 by ashofphoenix
Seems like "ancienneté" (in french) see in document

www.projeqtor.org/files/ProjeQtOr%20-%20...9glement%C3%A9es.pdf
round((year(now() ) - year(${EmploymentContract.startDate} ))/5)

is a bit wrong as it tells to round only "year" and "year on employement start" to calculate the specific additionnal acquired vacation day . A employee that has started AFTER the start of the period calculation should not have a full 5 / 10 / 15... years mandatory to obtain an additional day off.

I try to only remove year specification but seems not to work... What should be the exact formula to use to properly calculate this at the start of period ?

Please Log in or Create an account to join the conversation.

More
01 Jul 2020 17:53 #2 by babynus
Where did you find this formula ?

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

More
02 Jul 2020 07:39 - 02 Jul 2020 07:41 #3 by ashofphoenix
As said in the message.. in your documentation :P
Attachments:
Last edit: 02 Jul 2020 07:41 by ashofphoenix.

Please Log in or Create an account to join the conversation.

More
02 Jul 2020 09:24 #4 by babynus
Hi,

This is just an exemple.
You can define the way you want.
For instance following formula may give correct result :
- Rule = floor( ( now()-${EmploymentContract.startDate} ) / (365 * 5) )
Other option, possibly more easy to understand :
- Rule = 1
- Where = now()-employmentcontract.startDate > 365 * 5
that will add 1 day after 5 years
- Rule = 1
- Where = now()-employmentcontract.startDate > 365 * 10
that will add a second day after 10 yers... that is more accurate as second extra day may be aquired after 8 years.

Babynus
Administrator of ProjeQtOr web site
The following user(s) said Thank You: ashofphoenix

Please Log in or Create an account to join the conversation.

More
02 Jul 2020 10:57 - 02 Jul 2020 11:04 #5 by ashofphoenix
I tried both and none is working :oops:

I guess now()-${EmploymentContract.startDate} are not in the same format ?

Attachments:
Last edit: 02 Jul 2020 11:04 by ashofphoenix.

Please Log in or Create an account to join the conversation.

More
02 Jul 2020 13:58 #6 by ashofphoenix
Two possibilities

floor (DATEDIFF(CURDATE(),${Employee.startDate}) / ( 365 * 5 ) ) > tbh it doesn't take into account leap year.

floor((YEAR(NOW()) - YEAR(${Employee.startDate}) - IF( DAYOFYEAR(NOW()) < DAYOFYEAR(${Employee.startDate}) , 1, 0)) / 5)

This should work with leap year

Please Log in or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.053 seconds

Cookies settings

×

Functional Cookies

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Please login to see yours activities!

Other cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.