A couple of points on residents/non-residents, dividends and DTA's
1. Any dividend is exempt from South African income tax (normal tax), whether resident or not.
2. Dividends received by a non-resident, would still be subject to a dividends withholding tax. The following being the notable exceptions
a) any dividend declared by a foreign company listed on the JSE (i.e. the dividend is paid from a non-resident to a non-resident). BHP is an example.
b) where via a DTA, the dividend withholdings tax has been reduced to below the 15% withholding tax rate. For example, the DTA with the UK, allows the withholding tax to be reduced to 10%. Having a quick look at the SA-Portugal DTA, the rate stays at 15%
3. To qualify for the exemption/reduction referred to 2(a) or 2(b) above, one needs to apply for exemption with the withholding agent, typically your stock broker.
4. Note that when your residency status (via either the "ordinarily residence" test or "physical presence test"), changes from resident to not resident, you have a deemed capital gain (at current market value) on any shares held for investment purposes.
5. Thereafter, any capital gains on the RSA shares are exempt from South African Capital gains tax. But may, depending on local rules, be subject to tax in any other tax jurisdiction.
6. The effect of DTA, is to clear up source rules (i.e. where taxed), and attempt to eliminate any possible double taxation. Similar rules, also exist in the RSA income tax act which may assist in ensuring you aren't taxed in two countries.
7. The general underlying principles that exist with DTA, is that you only get taxed once, and that any withholding tax paid in the other country, could be set off against the tax that you pay in the 1st country. I.e. should you be resident in Portugal, and receive a dividend from a South African company, any withholding tax withhold in South Africa, may (depending on the provisions of the DTA and the Portuguese tax legislation), be set off against your Portuguese tax liability.
8. Do not assume that a DTA exists between the two countries. Check - they are all listed on the SARS website. Individual provisions can differ between DTA's.
9. Also do not assume South Africa principles apply in other juridicitions, i.e, dividends may be taxed as ordinary income, and the tax rate be higher than the 15% you effectively pay in SA.
10. If in doubt, consult a tax expert who deals with DTA's. Tt might save you money.
Hope all the above makes sense