There is one nonproft and one charity company, separate companies but working closely together.
One company with a website takes bookings for a course run by the other company, what entry is made for money received form these bookings, and then what entries are made when that company pays the money received to the other company?
I don't know what software you are using but irrespective of whether this is for profit or not, if money is simply being passed from one co to another without any commission etc (i.e. just money changing hands and company B is the 'middle man'), then it needs to be all balance sheet.
I would keep it simple and just:
DR bank (when money received) CR 'Company X booking control' (which recognises you have a liability of monies to pay out in this instance - and the name of the account is meaningful)
Then when passed over to 'Company X' just reverse those entries as and when the money changes hands again.
They have no legal relationship i.e they are not part of a corporate group, so whether they are 'friendly' or not is irrelevant.
Obviously if commission or a handling fee is charged then it would partially go via the P&L, as 'fee income' or the like.