Ir al contenido
Menú
Se marcó esta pregunta

In  WORKED DAYS table i have 2 line


code ​ ​number_of_days


GLOBAL -​2


GLOBAL ​-1


and my code in 


Salary Rules, i create:

Amount Type: Python code


def get_total_days_global():

  total = 0

  for line in worked_days.GLOBAL:

    total += line.number_of_days

  return total


result = worked_days.GLOBAL and (contract.wage / worked_days.WORK100.number_of_days) * get_total_days_global()


This code get only number_of_days of line 2 ( number_of_days = -1)

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
may 25
4104
0
may 23
3592
1
mar 18
4482
3
dic 24
4922
2
dic 24
2303