コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
5876 ビュー


Hi every one,

i want compute allwance based on worked years in salary rules.

i will apply different % to contract.wage depending on number of worked years

eg :

{ 5% if worked years is between 2 and 5 years

15% if worked years is between 5 and 10 years

and so ...

}

I try Based Condition python :

result= (payslip.date_to - contract.date_start).days >= 735

where 735 = 2years in days



should i import datetime lib, casting difference days to integer ????

thanks for any help


アバター
破棄
著作者 最善の回答

I ve try :

Condition python :

result = payslip.date_to - contract.date_start > 735

But i cant make deduction on strings types.

Try import datetime library to cast those dates fields but no way.

Any idea?

アバター
破棄
関連投稿 返信 ビュー 活動
0
1月 20
2834
0
12月 17
3169
2
10月 17
5865
2
12月 24
11696
2
12月 22
7923