OK I know the tax thing is a nightmare with so many complications regarding nationality etc etc BUT try this - go onto the TERRA search engine, search for PADRE HACIENDA. This is a free Spanish government software package - download it - OK its in Spanish - you will enjoy the challenge! But it will calculate your tax for you. The tax offices and some banks have this as well.
FOR THE RESIDENT BRITS….......If you want to pay your tax in Spain (ie you are resident and want to abide by the law) You can download the forms to get out of the UK tax system from the UK government tax site called:-
United Kingdom/Spain Double Taxation Convention (SI 1976 Number 1919)
APPLICATION for relief at source from United Kingdom income tax and
CLAIM to repayment of United Kingdom income tax
This form is for use by an individual resident of Spain receiving pensions, purchased annuities,.............
Fill them out and take them to your SPANISH tax office with your residents card, passport etc and they will stamp it up for you then you can send it to the UK (address on the form) and start the process to get UK tax exemption.
Assuming you qualify you will (eventually!) receive a letter and then your UK pensions etc should be paid to you gross of UK tax.
However (according to my calculations) if you are a HIGH income earner you might end up paying more here as the allowances are lower to reflect the lower income levels in Spain - obviously it depends what allowances you can claim - see a good asesor fiscal!