Advance Salary Adjustment at the end of month

How can i adjust advance salary amount to salary at the end of month

You will have to create additional salary for each employee for advance salary component before processing payroll.