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

Good morning!!

Please, i want to get the amount of many rules previously calculated but with some conditions on some fields. I have tried rules.*** but it doesnt give me what i have pretected Please who can help me.

Thanks in advance.

頭像
捨棄
最佳答案

Hi,

First: you have to take care of the sequence of the rule .

Then you can include the rule previously calculated by write its code

e.g if you have a rule with code COLA "lower sequence, higher priority"

you can use :

result = COLA + 100

if you'd like to make some conditions on COLA for example you can use:

result = ((COLA - 75 < 0) and 0 or (COLA -75)) + 100

and so on ...

you can access all fields/objects that listed in the comment

# Available variables: #---------------------- 
# payslip: object containing the payslips # employee: hr.employee object 
# contract: hr.contract object # rules: object containing the rules code (previously computed) 
# categories: object containing the computed salary rule categories (sum of amount of all rules belonging to that category). 
# worked_days: object containing the computed worked days. 
# inputs: object containing the computed inputs. 
# Note: returned value have to be set in the variable 'result' 
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
4
10月 16
31242
1
9月 15
3916
1
6月 15
834
0
4月 15
678
2
4月 15
853