Attendance Validation

Hi

We are using ERPNext: v12.17.0 (version-12)

Frappe Framework: v12.14.0 (version-12)

While proceeding with salaries every time we receive a bug regarding validation of attendance of employees those have left the organization in the middle of month and those who joined in the middle of month kindly help with that.