The function of Undeposited Funds just means "On its way to the bank."
You are really asking about the Income activity, not the UF activity.
If this is a Cash Basis entity, you have to report it as income when you got it. You don't want to carry negative AR.
So, here is what you do:
That other person should have created an Other Charge Type item linked to Income, for using on Sales Receipt and not using Deposit manually. Now you have a customer name with an item on customer transactions, that would have helped you track and report.
You can make that item Now.
Then, Use it on a credit memo for this customer, to apply it to their invoice. This reduces their total owed now, in consideration of those funds being received previously.
And this is the same as:
Income when we got it = negative income, the same as a discount, when we have the actual sale.
If your entity type is on Accrual Basis, that money should have been Liability when you got it and offset that Liability when you apply it; that means the Other Charge type item is linked to Liability, not to income. But now, any customer you should have been tracking as Liability, you did not track as such, so you Already called this income, and the application of their prepayment still is a reduction of your income.
Always use an item on a credit memo for this. Don't carry negative AR.