|
|
|
@ -8,7 +8,7 @@ class Form::Sales::Questions::Mortgageused < ::Form::Question |
|
|
|
@answer_options = ANSWER_OPTIONS |
|
|
|
@answer_options = ANSWER_OPTIONS |
|
|
|
@ownershipsch = ownershipsch |
|
|
|
@ownershipsch = ownershipsch |
|
|
|
@question_number = QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.fetch(form.start_date.year, QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.max_by { |k, _v| k }.last)[ownershipsch] |
|
|
|
@question_number = QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.fetch(form.start_date.year, QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.max_by { |k, _v| k }.last)[ownershipsch] |
|
|
|
@top_guidance_partial = "financial_calculations_discounted_ownership" if @ownershipsch == 2 |
|
|
|
@top_guidance_partial = top_guidance_partial |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def displayed_answer_options(log, _user = nil) |
|
|
|
def displayed_answer_options(log, _user = nil) |
|
|
|
@ -35,4 +35,9 @@ class Form::Sales::Questions::Mortgageused < ::Form::Question |
|
|
|
2023 => { 1 => 90, 2 => 103, 3 => 111 }, |
|
|
|
2023 => { 1 => 90, 2 => 103, 3 => 111 }, |
|
|
|
2024 => { 1 => 91, 2 => 104, 3 => 112 }, |
|
|
|
2024 => { 1 => 91, 2 => 104, 3 => 112 }, |
|
|
|
}.freeze |
|
|
|
}.freeze |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def top_guidance_partial |
|
|
|
|
|
|
|
return "financial_calculations_shared_ownership" if @ownershipsch == 1 |
|
|
|
|
|
|
|
return "financial_calculations_discounted_ownership" if @ownershipsch == 2 |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|