Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
8637 Ansichten

I want to create a new salary rule that would sum all the lines on a payslip input based on each input line's contract.

I'm new to Python, started reading some code but can't figure out how to get the contract.wage for each input line and sum it.

I tried something like

for input_line in payslip.input_line_ids:
  result += input_line.contract.wage

Of course, this is wrong. Any ideas?

Avatar
Verwerfen
Beste Antwort

For the input python code is

result = (inputs.A and inputs.A.amount) + (inputs.B and inputs.B.amount)

where A and B are the codes of inputs.

Avatar
Verwerfen

@Nagy Lajos

Beste Antwort

@Nagy Lajos,

Have you solved this problem? I'm having a similar request. Marc

Avatar
Verwerfen

Is your payroll working properly? Can you generate payslip?

My payroll works fine I can generate payslip. I need probably the right Python code to do this. I'm still searching ....

Verknüpfte Beiträge Antworten Ansichten Aktivität
1
März 15
4787
1
März 15
6098
1
Aug. 25
4569
0
Dez. 24
9703
3
Sept. 24
21979