How can we keep accounts when other companies withdraw money from our account?

1. When funds from other companies enter our account, the accounting entries are as follows:

Debit: 00000 in the bank.

Credit: other payables -xxx 00000

2. When other companies withdraw cash from the company, they should make accounting entries:

Debit: other payables -xxx 00000

Creditor: cash 00000