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

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
mag 25
4098
0
mag 23
3581
1
mar 18
4477
3
dic 24
4914
2
dic 24
2301