I have checked on local account and it’s working properly, have created payroll entry and on submission of salary slip from payroll entry system credits the principal amount into the employee loan account. This scenario didn’t work if you’re not making salary slip from the payroll entry and making manually.
I figured the issue.
When the first payroll entry was made, the default account for the salary component was not in place. Even though I updated the account and then cancelled & amended the payroll entry/salary slip, it would not take the updated salary account.
Completely cancelled the original payroll entry and created afresh - this works correctly with the posting to salary, to employee loan and bank.
I am facing the same issue, I tried following your method, even created a new test environment so that I could test from scratch, still the loan amount is not deducted from bank account while making bank entry. Could you please assist what other changes you might have made.