Absent to deduct

I need the following:

  • Number of Absents (Attendance)
    • Discount based on the number of Absents for that month
    • Calculation will be BS /26 * Number_Absent

The only way I am doing this is by going to each Employee and adding the discount again and click my button (script) that will do this for me … but what about when I have 100 Employees and at least 10 or 16 have absents !!!
Should I add a custom field (number_absent) but how will this field reflect on Salary Structure so I can pull the value of it?

Hello,

In ERPNext, absents doesn’t have direct impact on the salary calculation. If Employee is absent, Leave Application record must be made for that. If Leave Application is made for Unpaid Leave, then it will have impact on the Salary Calculation of an Employee.

When creating Salary Structure for an Employee, Earning Type which should have impact of unpaid leave, ensure to check “Depends on LWP (leave without pay)”.

Hope this helps.

2 Likes

@umair I checked this in salary structure and created leaved without pay record in leave application. When creating salary slip… Leave without pay xx days not fetched automatically. If I put it manually, I got “Leave Without Pay doesnot matched any approved Leave application record”

Whats wrong? Using v8

It’s caused by leave application took holiday date…