Company Pension Contributions

Hi,

I understand that the maximum that a company can make as a contribution to a directors pension pot is up to the value of the directors salary but what happens if a director only joins the company part way through the year.

For example in this tax year the director earns £20k in his previous role but then nothing in his new role - can the new company put up to £20k contribution in the directors pension pot or is the maximum alloable contribution based on the salary in the new role?

Any help would be appreciated.

Matt