Skip to Content
Menu
This question has been flagged
2 Replies
2510 Zobrazenia

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
Zrušiť
Best Answer

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
Zrušiť

Thank you.

Autor Best Answer

thanks dear,

it dose work,

Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
0
jún 20
3769
0
mar 15
3930
0
máj 23
3771
1
feb 20
3953
1
mar 18
4579