I fly TAP quite a bit (unfortunately) and have had two different fare classes on the departing and return trips on several occasions. It's very possible that one of your legs earned the mileage and the other was ineligible.
That part aside, TAP is horrible about crediting miles for legitimate flights. I spent nearly a year trying to get MP to credit me for a LIS-EWR trip flight - twenty something emails, four letters, etc. Nothing. According the MP, TAP never responded and "agreed" to credit the mileage.