I'm populating a table which has outer join. I have some weird data with fiscal_year 0 and acct_period(month) 0 which is valid

..
where
...
AND ps.analysis_type = anmap.analysis_type (+)
and ps.accounting_period between (to_number(to_char(sysdate,'MM')) - 2) and to_number(to_char(sysdate, 'MM')) and fiscal_year=to_number(to_char(sysdate,'YYYY')) or (ps.accounting_period = 0 and ps.fiscal_year = 0)
I'm trying to populate data for the current month and the previous month and for all the valid years along with fiscal_year 0 and acct_per 0(this is valid data)

But I get an error here "You tried to perform an outer join when using an OR Condition."

then I changed the condition as follows using Union all

AND ps.analysis_type = anmap.analysis_type (+)
and ps.accounting_period between (to_number(to_char(sysdate, 'MM')) - 2) and to_number(to_char(sysdate, 'MM'))
and ps.fiscal_year=to_number(to_char(sysdate,'YYYY')) and ps.accounting_period <> 0 and ps.fiscal_year <> 0
union all (select ps1.accounting_period, ps1.fiscal_year from ps_proj_resource ps1 where ps1.accounting_period = 0 and ps1.fiscal_year = 0)


I'm pretty sure this is wrong, but can someone please help me with this.