Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
2538 Visninger

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
Kassér
Bedste svar

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
Kassér

Thank you.

Forfatter Bedste svar

thanks dear,

it dose work,

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
0
jun. 20
3790
0
mar. 15
3973
0
maj 23
3797
1
feb. 20
3973
1
mar. 18
4604