|
|
|
@ -48,7 +48,7 @@ class CaseLog < ApplicationRecord
|
|
|
|
|
FormHandler.instance.get_form(form_name) || FormHandler.instance.forms.first.second |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def get_collection_start_year |
|
|
|
|
def collection_start_year |
|
|
|
|
window_end_date = Time.zone.local(startdate.year, 4, 1) |
|
|
|
|
startdate < window_end_date ? startdate.year - 1 : startdate.year |
|
|
|
|
end |
|
|
|
@ -56,7 +56,6 @@ class CaseLog < ApplicationRecord
|
|
|
|
|
def form_name |
|
|
|
|
return unless startdate |
|
|
|
|
|
|
|
|
|
collection_start_year = get_collection_start_year |
|
|
|
|
"#{collection_start_year}_#{collection_start_year + 1}" |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|