Skip to Content
मेन्यू
This question has been flagged
1 Reply
310 Views

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.

Avatar
Discard
Best Answer

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' 
Avatar
Discard
Related Posts Replies Views Activity
4
अक्तू॰ 16
31236
1
सित॰ 15
3912
1
जून 15
833
0
अप्रैल 15
674
2
अप्रैल 15
851