If you do your taxes using PADRE, you have to be careful about withheld taxes paid outside of Spain. For Spanish source income ONLY, you put the amount withheld next to the income and all is good.
For non-Spanish income, you don’t do this! Very bad if you do.
What you do instead, is pull out an Excel and calculate your total foreign income, and then the taxes you had withheld on this income. To make the calculation even more fun, you have to exclude any taxes on income that was exempt from Spanish taxes (eg the first 1500 of dividends).
The program gives you no help whatsoever in figuring this, and you put the result in box 583.