Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
6172 Visualizzazioni

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?

Avatar
Abbandona
Risposta migliore

Just make a try in this,

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

Avatar
Abbandona
Autore Risposta migliore

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

Avatar
Abbandona
Risposta migliore

Did you manage to solve it?

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
lug 25
3696
1
lug 25
2884
0
dic 24
1588
0
dic 23
1445
0
set 20
1557