Browse Source

fixup! CLDC-4212: Add 0.1% tolerance to % calculations

update comment
pull/3214/head
samyou-softwire 1 month ago
parent
commit
02b71c223a
  1. 4
      app/models/sales_log.rb

4
app/models/sales_log.rb

@ -271,8 +271,8 @@ class SalesLog < Log
def expected_shared_ownership_deposit_value_tolerance def expected_shared_ownership_deposit_value_tolerance
return 1 unless value && equity return 1 unless value && equity
# we found that a simple tolerance was not quite what we wanted here. # we found that a fixed tolerance was not quite what we wanted here.
# CORE wants it so if a user say, has a 66.6% equity then can enter either 66.6% or 66.7% # CORE wants it so if a user say, has a 66.666% equity they can enter either 66.6% or 66.7% (or 66.5%)
# so in 2026 we base our tolerance off of a discount 0.1% higher or lower # so in 2026 we base our tolerance off of a discount 0.1% higher or lower
if form.start_year_2026_or_later? if form.start_year_2026_or_later?
lower_bound = value * ((equity - 0.1) / 100) lower_bound = value * ((equity - 0.1) / 100)

Loading…
Cancel
Save