How can we post transactions between two different companies?

If you are making journal entries across different companies, you are now forced to keep each company in balance and make your entries happen with standard inter-company accounting procedures. For each company you would create matching Due To/From accounts on the balance sheet. There are lots of ways to set this up but here is a quick example:

Lets assume you are only using the company segment and the account number

Company 01 would need an asset account - 01-1501 Due To/From Company 02
Company 02 would need an asset account - 02-1501 Due To/From Company 01

Now instead of one journal entry you make two, one journal entry per company. Say, for example, we posted some G&A expense to company 01 and need to move it to company 02.

Credit 01-6500 $500
Debit 01-1501 $500

Credit 02-1501 $500
Debit 02-6500 $500

If our inter-company (Due to/from) account started at $0 we would now see a $500 balance in the account for company 01 and a ($500) balance for company 02.

The inter-company account(s) must remain in balance at all times, no exceptions. Any entry made to an inter-company account requires that a corresponding entry be made to the other inter-company account immediately. Any individual using inter-company account must know that they are not allowed to leave their desk if the inter-company accounts are out of balance, no exceptions. Inter-company accounts can really get out of control if people are not careful.