Add parenthesis to separate the 2nd condition from the 3rd:
WHERE (e.TotalCount = 1 OR e.LastThreeMonths = 1)
AND OINV.[TaxDate] >= (GETDATE() - 7)
AND
takes precedence over OR
, so your criteria was not applying the date requirement to all lines, just those with e.LastThreeMonths = 1