You can create Sales and Purchase Orders that will be available to be invoiced by more than one company. That way, you can leave it for later to decide which company will be invoiced.
In order to achieve this, you have to create a New Document Template either for Sales or Purchases and select the “Any” option for the Company Associated with that certain Document Template.
Following that, when it's time to Approve the Sales or Purchase Order, you will have the chance to select the company that will issue an Invoice or Bill for this Sales or Purchase Order. You can do this by selecting one of the locations of the relevant company.