% if @fp_nilDate %> <% currentperiod = daterange_current() %> <% list_of_months = [] %> <% 1.downto(-12) do |m| %> <% list_of_months << currentperiod.next_month(m) %> <% end %> <% else %> <% currentperiod = @fp_valueDate %> <% list_of_months = [currentperiod] %> <% end %> <% if pundit_user.has_house_policyscope?(HouseQec) %> <% user_has_house_policyscope = true %> <% pundit_house_id = pundit_user.user.person.house_id %> <% ref_house_id = pundit_house_id %> <% ref_house = House.find(ref_house_id) %> <% else %> <% user_has_house_policyscope = false %> <% ref_house_id = @filter_params[:filterhouse_id] %> <% ref_house = ref_house_id.is_valid_id? ? House.find(ref_house_id) : nil %> <% end %>