Skip to Content
मेन्यू
This question has been flagged
2 Replies
2385 Views

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

Thank you.

Author Best Answer

thanks dear,

it dose work,

Avatar
Discard
Related Posts Replies Views Activity
0
जून 20
3679
0
मार्च 15
3850
0
मई 23
3660
1
फ़र॰ 20
3867
1
मार्च 18
4511