Inter company balance is something that looks easy and simple but this can be most complex at times. Considering your situation of Loan Payable recorded as loan receivable, you may want to first check the Bank Reconciliation report, if the loan was given in cash and make sure that when loan was taken by the company the bank/cash was debited as a deposit. And check that transaction what account was credited when the deposit was made of the loan.
Ideally, while recording that deposit, The Inter Company loan account should have been credited (to create a loan liability in Balance Sheet). You would want to correct that deposit entry of loan and change the credit account. You would only be able to do it if books are still open for that period. Otherwise debit that account and credit the loan account.
Once you clear this loan account transaction, you may want to check with other reconciliations for all inter company balances.
If this is not clear or if you need more help, let me know!
Thanks! Have a good weekend!