Browse Source

CLDC-4333: staircasing value hint text/validation fix (#3270)

* CLDC-4333: update purchase price soft vals to take stairbought into account

* CLDC-4333: set hard min to 0 for staircasing

* CLDC-4333: add dynamic hard min based on stairbought

* CLDC-4333: step value input width up to next option

* CLDC-4333: update value spec

* CLDC-4333: update hint text instead to ensure value is 100% of equity

* CLDC-4333: update hint text instead to ensure value is 100% of equity

* CLDC-4333: revert q text change to align with spec

* CLDC-4333: revert spec changes

* CLDC-4333: revert 2025 changes

* CLDC-4333: clarify 2026 question

* CLDC-4333: revert question fix

* CLDC-4333: revert initial purchase hint text update
main v0.6.6
Nat Dean-Lewis 3 days ago committed by GitHub
parent
commit
3124107db8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      app/models/form/sales/questions/value.rb
  2. 2
      config/locales/forms/2026/sales/sale_information.en.yml
  3. 2
      config/locales/validations/sales/sale_information.en.yml
  4. 2
      spec/models/form/sales/questions/value_spec.rb

2
app/models/form/sales/questions/value.rb

@ -6,7 +6,7 @@ class Form::Sales::Questions::Value < ::Form::Question
@type = "numeric"
@min = form.start_year_2026_or_later? ? 15_000 : 0
@step = 1
@width = 5
@width = 10
@prefix = "£"
@question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR_AND_SECTION, value_key: subsection.id)
@top_guidance_partial = "financial_calculations_shared_ownership"

2
config/locales/forms/2026/sales/sale_information.en.yml

@ -153,7 +153,7 @@ en:
value_shared_ownership_staircase:
check_answer_label: "Full purchase price"
check_answer_prompt: ""
hint_text: "Enter the full purchase price paid for the equity bought in this staircasing transaction (this is equal to the value of the share bought by the purchaser)."
hint_text: "Enter the full purchase price of the property before any discounts are applied. For shared ownership, enter the full purchase price paid for 100% equity (this is equal to the value of the share owned by the PRP plus the value bought by the purchaser in the current and all previous transactions)."
question_text: "What was the full purchase price for this staircasing transaction?"
equity:

2
config/locales/validations/sales/sale_information.en.yml

@ -76,7 +76,7 @@ en:
mortgage_not_used: "The cash deposit is %{deposit}.</br></br>The full purchase price (%{value}) multiplied by the percentage bought is %{expected_shared_ownership_deposit_value}.</br></br>These two amounts should be the same."
mortgage_used_socialhomebuy: "The mortgage amount (%{mortgage}), cash deposit (%{deposit}), and cash discount (%{cashdis}) added together is %{mortgage_deposit_and_discount_total}.</br></br>The full purchase price (%{value}) multiplied by the percentage equity stake purchased (%{equity}) is %{expected_shared_ownership_deposit_value}.</br></br>These two amounts should be the same."
mortgage_not_used_socialhomebuy: "The cash deposit (%{deposit}) and cash discount (%{cashdis}) added together is %{deposit_and_discount_total}.</br></br>The full purchase price (%{value}) multiplied by the percentage bought (%{equity}) is %{expected_shared_ownership_deposit_value}.</br></br>These two amounts should be the same."
staircasing_mortgage: # this key
staircasing_mortgage:
mortgage_used: "The mortgage (%{mortgage}) and cash deposit (%{deposit}) added together is %{mortgage_and_deposit_total}.</br></br>The full purchase price (%{value}) multiplied by the percentage bought is %{stairbought_part_of_value}.</br></br>These two amounts should be the same."
mortgage_not_used: "The cash deposit is %{deposit}.</br></br>The full purchase price (%{value}) multiplied by the percentage bought is %{stairbought_part_of_value}.</br></br>These two amounts should be the same."
mortgage_used_socialhomebuy: "The mortgage amount (%{mortgage}), cash deposit (%{deposit}), and cash discount (%{cashdis}) added together is %{mortgage_deposit_and_discount_total}.</br></br>The full purchase price (%{value}) multiplied by the percentage bought (%{stairbought}) is %{stairbought_part_of_value}.</br></br>These two amounts should be the same."

2
spec/models/form/sales/questions/value_spec.rb

@ -32,7 +32,7 @@ RSpec.describe Form::Sales::Questions::Value, type: :model do
end
it "has correct width" do
expect(question.width).to eq(5)
expect(question.width).to eq(10)
end
it "has correct prefix" do

Loading…
Cancel
Save