|
|
|
@ -280,7 +280,9 @@ module Csv |
|
|
|
record = nil |
|
|
|
record = nil |
|
|
|
year = @year |
|
|
|
year = @year |
|
|
|
while year >= 2021 && record.nil? |
|
|
|
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 |
|
|
|
year -= 1 |
|
|
|
end |
|
|
|
end |
|
|
|
record || records.first |
|
|
|
record || records.first |
|
|
|
|