Skip to Content
Menú
This question has been flagged
2 Respostes
2277 Vistes

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
Descartar
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
Descartar

Thank you.

Autor Best Answer

thanks dear,

it dose work,

Avatar
Descartar
Related Posts Respostes Vistes Activitat
0
de juny 20
3580
0
de març 15
3765
0
de maig 23
3536
1
de febr. 20
3779
1
de març 18
4427