Damage deposit is not income, how do I record it

I run a holiday letting company and receive rental income as well as a returnable damage deposit, sometimes in the same payment. I have worked out how to split the two amounts on the invoice but need a way of categorising the damage deposit. If I mark it as miscellaneous income, it is recorded as income, which it isn’t, I have to give it back unless there is damage. Occasionally I do keep money for repairs (twice so far)
How do I record all this?

There’s an option now to configure balance sheet nominal codes so you can use them on sales invoices. I’d create a new nominal for this in the “assets & liabilities” range and mark it as available for invoices, then when you assign lines to this code on your invoices they’ll show up as liabilities on your balance sheet rather than income on your P&L. The liability will disappear when you credit note the original invoice to return the deposit.

In cases where you do need to keep some of the deposit you’d have to journal the appropriate amount across to an income code once you’ve (part) refunded the rest.

P.S. I’m not an accountant, you may want a second opinion particularly if you’re vat registered.

Edit: This post explains it with screenshots.

Thank you, it took some time, but I have managed to do it. Lets hope I can remember it! Thanks again