Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
2171 Näkymät

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
Hylkää
Paras vastaus

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
Hylkää

Thank you.

Tekijä Paras vastaus

thanks dear,

it dose work,

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
kesäk. 20
3483
0
maalisk. 15
3656
0
toukok. 23
3436
1
helmik. 20
3686
1
maalisk. 18
4345