@ -280,7 +280,9 @@ module Csv
record = nil
year = @year
while year >= 2021 && record.nil?
record = records.find { |r| r.log_type == "lettings" && r.year == year }
record = records.find do |r|
r.year == year && (!@user.support? || r.user_type == "support" || r.user_type == "user")
end
year -= 1
record || records.first
@ -184,7 +184,9 @@ module Csv
while year >= 2022 && record.nil?
record = records.find { |r| r.log_type == "sales" && r.year == year }