Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3358 Visualizzazioni

Hi all

i am trying to make overtime rule and get wrong python code

the rule
 result = (((contract.wage/30)/8)*0.25)*(inputs.OVERTIME_DAY_DAYS and inputs.OVERTIME_DAY_DAYS.amount)

 

Avatar
Abbandona
Risposta migliore

I guess the problem is with this part: (inputs.OVERTIME_DAY_DAYS and inputs.OVERTIME_DAY_DAYS.amount).

Try to write it as: (bool(inputs.OVERTIME_DAY_DAYS.amount) and inputs.OVERTIME_DAY_DAYS.amount).

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
mag 22
3017
1
mag 22
2566
1
gen 22
2308
1
ott 21
14774
2
gen 24
14870