Trouble with Boolean to Integer
AND (inv.is_active = CASE WHEN $P!{dwhDBSchema}.dwh_boolean_to_int_fct($P{zInActiveIdea}) = 1 THEN inv.is_active ELSE 1 END)
AND (inv.is_active = CASE WHEN $P!{dwhDBSchema}.dwh_boolean_to_int_fct($P{zInActiveIdea}) = 1 THEN inv.is_active ELSE 1 END)