跳至內容
選單
此問題已被標幟
2 回覆
2636 瀏覽次數

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

頭像
捨棄
最佳答案

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

頭像
捨棄

Thank you.

作者 最佳答案

thanks dear,

it dose work,

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
6月 20
3889
0
3月 15
4071
0
5月 23
3934
1
2月 20
4080
1
3月 18
4713