Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
6177 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Just make a try in this,

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

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Did you manage to solve it?

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 25
3700
1
thg 7 25
2887
0
thg 12 24
1592
0
thg 12 23
1445
0
thg 9 20
1557