Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
2578 Weergaven

hi,

Hello everyone, I want to ask, in the picture below I made an overtime calculation on the payslip based on the period that has been entered in the work entry, but the number of hours cannot be called on the payslip, is there something wrong with the python code? Please help. thank you


Avatar
Annuleer
Beste antwoord

Hi,

Try this code:overtime = 0
for line in employee.overtime_ids:
if payslip.date_from overtime+= line.duration
result = (contract.wage/30/contract.resource_calendar_id.hours_per_day)*(overtime)

This code aggregates the overtime duration for each relevant line within the specified payslip period and then calculates the corresponding overtime payment based on the hourly rate determined by the contract.


Hope it helps

Avatar
Annuleer
Auteur

thanks for you answer

Gerelateerde posts Antwoorden Weergaven Activiteit
2
jul. 25
3810
1
jul. 25
2973
0
dec. 24
1674
0
dec. 23
1508
0
sep. 20
1557