Browse Source

Set the scheme as available from previous year if the collection is in crossover

further-bulk-upload-year-fixes
Kat 2 years ago
parent
commit
3b0cc9879d
  1. 4
      app/models/scheme.rb

4
app/models/scheme.rb

@ -219,8 +219,12 @@ class Scheme < ApplicationRecord
end
def available_from
if FormHandler.instance.in_crossover_period?(now: created_at)
FormHandler.instance.collection_start_date(created_at) - 1.year
else
FormHandler.instance.collection_start_date(created_at)
end
end
def open_deactivation
scheme_deactivation_periods.deactivations_without_reactivation.first

Loading…
Cancel
Save