跳至内容
菜单
此问题已终结

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)

形象
丢弃
相关帖文 回复 查看 活动
2
5月 25
4107
0
5月 23
3599
1
3月 18
4486
3
12月 24
4928
2
12月 24
2307