İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3413 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
May 22
3066
1
May 22
2600
1
Oca 22
2323
1
Eki 21
14797
2
Oca 24
14903