Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

21 lines
650 B

class Form::Sales::Pages::Deposit < ::Form::Page
def initialize(id, hsh, subsection, ownershipsch:, optional:)
super(id, hsh, subsection)
@ownershipsch = ownershipsch
@optional = optional
end
def questions
@questions ||= [
Form::Sales::Questions::DepositAmount.new(nil, nil, self, ownershipsch: @ownershipsch, optional: @optional),
]
end
def routed_to?(log, _user)
return false unless super
return true if log.ownershipsch == 2 || (log.ownershipsch == 3 && log.mortgageused == 1)
return false if log.stairowned_100? != @optional && form.start_year_2024_or_later?
log.ownershipsch == 1
end
end