I need to use total absence days in the salary slip like Working Days, Leave Without Pay, Payment Days fields
I have to create a field called Absent Days i need a custom script to fetch total absent days Depending on Employee Name, Start Date, End Date fields in Salary Slip doctype like the total absence in Monthly Attendance Sheet report
After that, I can use it in Salary Component formula
Basically, first you need to add custom field on Salary Slip doctype.
Then on your custom app, open hooks.py, add event before_validate for Salary Slip doctype.
Then in your method in your custom_script.py you need to update your custom field.
After that, you can use your custom field in the formula