تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1986 أدوات العرض

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
مايو 25
4194
0
مايو 23
3714
1
مارس 18
4549
3
ديسمبر 24
5094
2
ديسمبر 24
2448