Loan repayment from salary

Guys I need help the above ledger is for payable salary account when I make payroll entry in the end of the month loan repayments from each employee are going from a advances account to payable salary account 100,250 ,300,300 then total salaries and total loan repayments 26140 is going from the main account to payable salary account.
Where total salaries equal to 25190
So the total loan repayments 950 is going twice first time from advances account second from the main account.
Anyone can help me with this I would be appreciated
Thanks