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

Hi, 

I am trying to calculate an Allowance item in the salary slip. The contract has a custom field called x_ctc_mo (contract.x_ctc_mo)

The rule requires the medical allowance, basic salary, food allowance, and other categories to be deducted from contract.x_ctc_mo 

I tried 

result = contract.x_ctc_mo - rules.BASIC - rules.MEDA .... and so on.


However, the result shows the value of contract.x_ctc_mo - rules.BASIC only for some reasons other categories are not calculated at all. 

What am doing wrong?

الصورة الرمزية
إهمال
أفضل إجابة

Just make a try in this,

result = contract.x_ctc_mo - BASIC - MEDA .... and so on.

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

I managed to :-). Not sure if that was the best way available but my requirement needed to calculate the salary remainder after the deductions and allowances. So all I had to do was i used contract.x_ctc_mo - categories.BASIC - categories.ALW

الصورة الرمزية
إهمال
أفضل إجابة

Did you manage to solve it?

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
يوليو 25
3699
1
يوليو 25
2886
0
ديسمبر 24
1591
0
ديسمبر 23
1445
0
سبتمبر 20
1557