İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
2538 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
Üretici

thanks for you answer

İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Tem 25
3751
1
Tem 25
2942
0
Ara 24
1647
0
Ara 23
1499
0
Eyl 20
1557