Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
2464 Prikazi

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

Thank you.

Avtor Best Answer

thanks dear,

it dose work,

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
jun. 20
3714
0
mar. 15
3878
0
maj 23
3733
1
feb. 20
3921
1
mar. 18
4557