Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
1637 Weergaven

Having problem with the condition based on in salary rule when creating payroll my problem is that if i write any condition in the (condition based on section) this condition must be achieved otherwise the rule won't work and give me an error like for example.

To calculate the sick days for employees to shown in their pay slips  wrote this code in the COMPUTATION  panel and it work very fine only if the employee have sick leave but it won't work with the employee who don't have sick days it gives error. 

the code is:


result = worked_days['LEAVE110'] and worked_days['LEAVE110'].number_of_days


the problem comes from the condition panel i can't choose (always true) as i want to calculate this only if the employee have sick leave other wise i don't want to calculate this rule

would you plz help me with condition base on panel 

what should i write? 



Avatar
Annuleer
Beste antwoord

Hi,You can set a Python condition to apply this rule. The screenshot below provides an example of how to set condition for applying rules in payslips.


Hope it helps

Avatar
Annuleer
Auteur

Thanks so much it works very well

Gerelateerde posts Antwoorden Weergaven Activiteit
1
okt. 24
1256
5
aug. 24
2726
2
aug. 22
2155
2
jul. 19
3883
2
mrt. 15
5574