Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
6 Răspunsuri
34713 Vizualizări

I want to calculate the salary of the employees based on the number of days they worked. For eg if an employee works for 25 days, his salary for 5 days needs to eb deducted from his basic salary. how to do it??

Imagine profil
Abandonează

See The bellow Answer bro

Cel mai bun răspuns

Create a salary that multiplies the daily/hourly rate by the number of worked days/hours For example, assuming you have 26 working days in a month:

result = worked_days.WORK100.number_of_days * (contract.wage / 26)

Imagine profil
Abandonează

for slip in self.browse(cu, uid, ids, context=None): NameError: global name 'cu' is not defined

you should put "cr" not "cu"

Cel mai bun răspuns

Change the Salary Rules/Basic Code -

The code is,

result = 0

for line in payslip.worked_days_line_ids:

result += line.number_of_days

if result >= 28:

result = 30

result = result*(contract.wage/30)

 

Note:

Go to the Salary Rules ---> Basic ---> Under the Computation ---> Click the Python Code option ---> Replace the New Code


Thanks & Regards,

Mohanraj J

(SrikeshInfotech)

Imagine profil
Abandonează

not working this code

Cel mai bun răspuns

Hi, can i ask a question? what command is used to get the total attendance within the whole month but under a weekly payroll please help me

Imagine profil
Abandonează
Autor Cel mai bun răspuns

please help me

Imagine profil
Abandonează

Hi I am also looking for the same .....................

Cel mai bun răspuns

How to calculate hours based salary for employee?

please help me

Imagine profil
Abandonează
Cel mai bun răspuns

try this hours calculator

Imagine profil
Abandonează