Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
2542 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ

Thank you.

Tác giả Câu trả lời hay nhất

thanks dear,

it dose work,

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 6 20
3791
0
thg 3 15
3976
0
thg 5 23
3797
1
thg 2 20
3973
1
thg 3 18
4615