Employee Salary Calculation Error

Dear Team, How do I configure that system such that employees’ salary is calculated based on the number of days worked and daily rate? For example, if an employee is present for 7 days in a month and the attendance is marked accordingly, then the basic salary of that employee should be 7 multiplied by the daily rate.