Attendance effect the salary slip

Hello
How i can make the attendance mark effect the total of salary slip ?
And does ERPNext automatically generate the salary at the end of each month?

In Payroll Settings check the appropriate option under Calculate Payroll Working Days Based On:

https://docs.erpnext.com/docs/v13/user/manual/en/human-resources/hr-settings#2-payroll-settings

No. You’ll have to process the same via Payroll Entry.

You can also try to use the Auto-Repeat to generate the entry every month. Scripts can be used for further automation of the process.