Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
2218 Vues

Can I use the  contract start date as condition in salary rules? To calculate the end of service of employee

So if the contract is less than 1 years this rules will appear?

The rule will be like


Today - contract.start_date > 1 year


Thanks

Avatar
Ignorer
Meilleure réponse

Hi,

Yes, you can use the contract start date as a condition in salary rules to calculate the end of service of an employee.You would typically achieve this using Python code within the salary rule.


time_difference = datetime.now() - contract.start_date

result = time_difference > relativedelta(years=1)


Hope it helps

Avatar
Ignorer

Thank you.

Auteur Meilleure réponse

thanks dear,

it dose work,

Avatar
Ignorer
Publications associées Réponses Vues Activité
0
juin 20
3526
0
mars 15
3700
0
mai 23
3472
1
févr. 20
3727
1
mars 18
4379