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. 6
      app/models/scheme.rb

6
app/models/scheme.rb

@ -219,7 +219,11 @@ class Scheme < ApplicationRecord
end
def available_from
FormHandler.instance.collection_start_date(created_at)
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

Loading…
Cancel
Save