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.
 
 
 
 

24 lines
686 B

class Form::Sales::Questions::ServiceCharge < ::Form::Question
def initialize(id, hsh, subsection, staircasing:)
super(id, hsh, subsection)
@id = "mscharge"
@type = "numeric"
@min = 1
@max = 9999.99
@step = 0.01
@width = 5
@prefix = "£"
@copy_key = "sales.sale_information.servicecharges.servicecharge"
@staircasing = staircasing
@question_number = question_number_from_year[form.start_date.year] || question_number_from_year[question_number_from_year.keys.max]
@strip_commas = true
end
def question_number_from_year
if @staircasing
{ 2026 => 0 }.freeze
else
{ 2025 => 88, 2026 => 0 }.freeze
end
end
end