Add dynamic headers and footers to templates, so their content can change automatically based on the selected internal party or on dynamic field values.
Company name, managing directors or register details of the contracting entity would be filled in automatically, so you can use one template for all of your group companies instead of maintaining a separate template or header/footer per entity.