Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
6152 Представления

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?

Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
июл. 25
3663
1
июл. 25
2839
0
дек. 24
1552
0
дек. 23
1401
0
сент. 20
1557