跳至内容
菜单
此问题已终结

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

相关帖文 回复 查看 活动
0
1月 17
3514
3
7月 19
5873
0
3月 22
2519
0
6月 17
3062
1
2月 24
2115