Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
1686 Представления

Hello, I am getting an error while computing the sheet for payslip
Can somebody please help me out with what I am doing wrong.

User Error

Wrong python condition defined for:: - 

Salary rule: Expenses Reimbursement (EX) 

- Error: : "0" 

while evaluating "result = inputs['EX'].amount > 0.0 if 'EX' in inputs else False\n"

Rule name - Expense Reimbursement
category - Allowance

code - EX

Python condition - 

result = inputs['EX'].amount > 0.0 if 'EX' in inputs else False


python code for computation - 

result = inputs['EX'].amount if 'EX' in inputs else 0


Аватар
Отменить
Лучший ответ

Hi

Hope everything well

you can write python condition like below

if 'EX' in inputs:

​return 1

else:

​return 0

Аватар
Отменить
Автор

Hi, thanks for answering.
Now i am getting this error after trying your condition
Please help

User Error

Wrong python condition defined for::
- Salary rule: Expenses Reimbursement (EX)
- Error: invalid non-printable character U+200B (, line 3)

Please post screen shot of rules and you can try below code as well
1 select value in field Condition Based on field - Python Expression and then add this below code in field python condition
result = 'EX' in inputs

Related Posts Ответы Просмотры Активность
0
янв. 17
3743
3
июл. 19
6161
0
мар. 22
2644
0
июн. 17
3352
1
февр. 24
2372