|
|
@ -146,7 +146,7 @@ class LettingsLog < Log |
|
|
|
|
|
|
|
|
|
|
|
AUTOGENERATED_FIELDS = %w[id status created_at updated_at discarded_at].freeze |
|
|
|
AUTOGENERATED_FIELDS = %w[id status created_at updated_at discarded_at].freeze |
|
|
|
OPTIONAL_FIELDS = %w[tenancycode propcode chcharge].freeze |
|
|
|
OPTIONAL_FIELDS = %w[tenancycode propcode chcharge].freeze |
|
|
|
RENT_TYPE_MAPPING_LABELS = { 1 => "Social Rent", 2 => "Affordable Rent", 3 => "Intermediate Rent" }.freeze |
|
|
|
RENT_TYPE_MAPPING_LABELS = { 1 => "Social Rent", 2 => "Affordable Rent", 3 => "Intermediate Rent", 4 => "Specified accommodation" }.freeze |
|
|
|
HAS_BENEFITS_OPTIONS = [1, 6, 8, 7].freeze |
|
|
|
HAS_BENEFITS_OPTIONS = [1, 6, 8, 7].freeze |
|
|
|
NUM_OF_WEEKS_FROM_PERIOD = { 2 => 26, 3 => 13, 4 => 12, 5 => 50, 6 => 49, 7 => 48, 8 => 47, 9 => 46, 1 => 52, 10 => 53 }.freeze |
|
|
|
NUM_OF_WEEKS_FROM_PERIOD = { 2 => 26, 3 => 13, 4 => 12, 5 => 50, 6 => 49, 7 => 48, 8 => 47, 9 => 46, 1 => 52, 10 => 53 }.freeze |
|
|
|
SUFFIX_FROM_PERIOD = { 2 => "every 2 weeks", 3 => "every 4 weeks", 4 => "every month" }.freeze |
|
|
|
SUFFIX_FROM_PERIOD = { 2 => "every 2 weeks", 3 => "every 4 weeks", 4 => "every month" }.freeze |
|
|
@ -158,6 +158,7 @@ class LettingsLog < Log |
|
|
|
rent_to_buy: 3, |
|
|
|
rent_to_buy: 3, |
|
|
|
london_living_rent: 4, |
|
|
|
london_living_rent: 4, |
|
|
|
other_intermediate_rent_product: 5, |
|
|
|
other_intermediate_rent_product: 5, |
|
|
|
|
|
|
|
specified_accommodation: 6, |
|
|
|
}.freeze |
|
|
|
}.freeze |
|
|
|
|
|
|
|
|
|
|
|
def form |
|
|
|
def form |
|
|
@ -826,6 +827,12 @@ private |
|
|
|
elsif is_general_needs? |
|
|
|
elsif is_general_needs? |
|
|
|
owning_organisation[:provider_type] == "PRP" ? 9 : 11 |
|
|
|
owning_organisation[:provider_type] == "PRP" ? 9 : 11 |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
when "Specified accommodation" |
|
|
|
|
|
|
|
if is_supported_housing? |
|
|
|
|
|
|
|
owning_organisation[:provider_type] == "PRP" ? 14 : 16 |
|
|
|
|
|
|
|
elsif is_general_needs? |
|
|
|
|
|
|
|
owning_organisation[:provider_type] == "PRP" ? 13 : 15 |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|