콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

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
3862
4
9월 25
6345
0
3월 22
2745
0
6월 17
3442
1
2월 24
2468