Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
14370 Weergaven

Hello all,

I read that rules object can be used inside python calculation of salary rules . If I undestand correctly, with that object I can get any rule value (i.e. its total ) already calculated for the employee during the calculation process in execution, and use it in current salary rule calculation for the same employee. If thas is correct, can anybody indicate the way rules object should be? ( I already know how to get a category current value that has been calculated for an employee during the process, but my point is wheter it is possible to get a specific previosly calculated value for a salary rule of the employee)

I appreciate your response.

Avatar
Annuleer
Beste antwoord

use the code of the rule, for example of the rule name is 'pension contribution' and code is 'PENS' then you can simply put it as shown in example below:


result = categories.BASIC - PENS
Avatar
Annuleer

@Bernard Kipkorir Too: Great! directly rule code can able to access. Tried rule.PENS not working PENS is working. (Not clear in document)

Life saver! There is no documentation for this kind of information.

Beste antwoord

You can get the previously calculated salary rule by using the salary code.

For Example,

If you salary rule name is Basic Salary and its code is BA then, you will get this data of this salary rule in another salary rule.

Lets Provident fund is another salary rule and its code is PF. Provident fund is 12% of the Basic Salary + Driving Allowance. (Assume that there is another salary rule called Driving Allowance with code DA)Then the PF is calculated as shown below.

result = (BA + DA) * 12 /100
By the above python code you can calculate the PF.
Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
mei 23
3270
1
mrt. 18
4188
2
dec. 24
2009
0
jan. 24
19
0
nov. 23
1655