Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
22600 มุมมอง

In HR Payroll module...I just want to avoid scheduling process for working days calculation..rather calculate it manually.

Ex. I have created 2 nos. field (float) "Calendar Days" (x_cd) and "Working Days" (x_wd) in "Worked Days" lines in "Employee Payslip". Now I want to calculate it in the Salary Rules ex. HRA result = contract.wage x 0.200 x "Working Days" / "Calendar Days" i.e. if calendar days = 31 and after deducting 1 unpaid leave i.e. working days = 30, then the HRA will be calculated on 30 days basis.

Please help me to input the python code in HRA result or what will be the Quantity field code if we calculate on basis percentage.

Please note that I am working on v6.1

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Python code::::

datej = str(payslip.date_to)

datek = str(payslip.date_from)

dj = datej[-2:]

x=0

new = 0

while (x<=31):

x= x+1

if str(x) == dj or "0"+str(x) == dj:

new= x

dk = datek[-2:]

y=0

old = 0

while (y<=31):

y= y+1

if str(y) == dk or "0"+str(y) == dk:

old= y

no_of_days = new-old + 1

result = no_of_days

อวตาร
ละทิ้ง
ผู้เขียน

thanks..its works

How can we calculate Overtime in salary slip in openerp

คำตอบที่ดีที่สุด

Remya

Please provide code to fetch employee name and email id from system when setting server action email 

 

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ธ.ค. 17
10922
0
มี.ค. 15
2999
1
มี.ค. 15
5852
0
ธ.ค. 24
1002
0
มี.ค. 15
3754