Forum

HR module - Specifi...
 
Notifications
Retirer tout

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

26 Posts
2 Utilisateurs
0 Reactions
12.6 K Vu
ash
 ash
(@ashofphoenix)
Posts: 140
Estimable Member
Début du sujet
 
[#6790]

Seems like "ancienneté" (in french) see in document

https://www.projeqtor.org/files/ProjeQtOr%20-%20Documentation%20-%20Absences%20r%C3%A9glement%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 ?


 
Posté : 01/07/2020 10:04 am
(@babynus)
Posts: 14952
Membre Admin
 

Where did you find this formula ?


 
Posté : 01/07/2020 7:53 pm
ash
 ash
(@ashofphoenix)
Posts: 140
Estimable Member
Début du sujet
 

As said in the message.. in your documentation 😛


 
Posté : 02/07/2020 9:39 am
(@babynus)
Posts: 14952
Membre Admin
 

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.


 
Posté : 02/07/2020 11:24 am
ash
 ash
(@ashofphoenix)
Posts: 140
Estimable Member
Début du sujet
 

I tried both and none is working 😳

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


 
Posté : 02/07/2020 12:57 pm
ash
 ash
(@ashofphoenix)
Posts: 140
Estimable Member
Début du sujet
 

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


 
Posté : 02/07/2020 3:58 pm
ash
 ash
(@ashofphoenix)
Posts: 140
Estimable Member
Début du sujet
 

I've got another pb.

I've change the special right configuration, but It's working well only for me...
My additional days are well calculated but those for other employees stay to 0, even with a correct entrance day and said to be employee...

Any clue ?


 
Posté : 02/07/2020 4:22 pm
ash
 ash
(@ashofphoenix)
Posts: 140
Estimable Member
Début du sujet
 

small *bump* 😉 regards


 
Posté : 08/07/2020 1:29 pm
ash
 ash
(@ashofphoenix)
Posts: 140
Estimable Member
Début du sujet
 

Did Projeqtor team see my pb or tell me if you prefer that I put it specifically on another thread with this specific problem for tracability ?


 
Posté : 15/07/2020 1:19 pm
(@babynus)
Posts: 14952
Membre Admin
 

Specific rights are defined at contract type level.
Do other employees have same contract type ?


 
Posté : 15/07/2020 2:26 pm
ash
 ash
(@ashofphoenix)
Posts: 140
Estimable Member
Début du sujet
 

Yes and Yes


 
Posté : 15/07/2020 3:47 pm
(@babynus)
Posts: 14952
Membre Admin
 

Did you connect as the "other" employee.
I think leave rights are calculated on connection.


 
Posté : 15/07/2020 4:13 pm
ash
 ash
(@ashofphoenix)
Posts: 140
Estimable Member
Début du sujet
 

Yes, My collegues connected into projeqtor and have 0 specific right day


 
Posté : 15/07/2020 4:50 pm
(@babynus)
Posts: 14952
Membre Admin
 

Ticket #4784 recorded.
I'll have a look.


 
Posté : 15/07/2020 4:55 pm
(@babynus)
Posts: 14952
Membre Admin
 

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

In fact both formulas are wrong, as extra day off for seniority is generally calculated only at the end of the vesting period


 
Posté : 18/07/2020 8:01 pm
Page 1 / 2
Share:
Retour en haut