|
|
|
|
@ -134,6 +134,15 @@ class BulkUpload::Lettings::Year2026::RowParser
|
|
|
|
|
field_127: "What is the support charge?", |
|
|
|
|
field_128: "After the household has received any housing-related benefits, will they still need to pay for rent and charges?", |
|
|
|
|
field_129: "What do you expect the outstanding amount to be?", |
|
|
|
|
|
|
|
|
|
field_130: "Lead tenant's sex, as registered at birth", |
|
|
|
|
field_131: "Person 2's sex, as registered at birth", |
|
|
|
|
field_132: "Person 3's sex, as registered at birth", |
|
|
|
|
field_133: "Person 4's sex, as registered at birth", |
|
|
|
|
field_134: "Person 5's sex, as registered at birth", |
|
|
|
|
field_135: "Person 6's sex, as registered at birth", |
|
|
|
|
field_136: "Person 7's sex, as registered at birth", |
|
|
|
|
field_137: "Person 8's sex, as registered at birth", |
|
|
|
|
}.freeze |
|
|
|
|
|
|
|
|
|
RENT_TYPE_BU_MAPPING = { |
|
|
|
|
@ -283,6 +292,15 @@ class BulkUpload::Lettings::Year2026::RowParser
|
|
|
|
|
attribute :field_128, :integer |
|
|
|
|
attribute :field_129, :decimal |
|
|
|
|
|
|
|
|
|
attribute :field_130, :string |
|
|
|
|
attribute :field_131, :string |
|
|
|
|
attribute :field_132, :string |
|
|
|
|
attribute :field_133, :string |
|
|
|
|
attribute :field_134, :string |
|
|
|
|
attribute :field_135, :string |
|
|
|
|
attribute :field_136, :string |
|
|
|
|
attribute :field_137, :string |
|
|
|
|
|
|
|
|
|
validate :validate_valid_radio_option, on: :before_log |
|
|
|
|
|
|
|
|
|
validates :field_11, |
|
|
|
|
@ -541,6 +559,7 @@ class BulkUpload::Lettings::Year2026::RowParser
|
|
|
|
|
!supported_housing? ? "field_24" : nil, # postcode |
|
|
|
|
"field_42", # age1 |
|
|
|
|
"field_43", # sex1 |
|
|
|
|
"field_130", # sexrab1 |
|
|
|
|
"field_46", # ecstat1 |
|
|
|
|
) |
|
|
|
|
if [field_124, field_125, field_126, field_127].all?(&:present?) |
|
|
|
|
@ -689,6 +708,7 @@ private
|
|
|
|
|
[ |
|
|
|
|
"startdate", |
|
|
|
|
"age1", |
|
|
|
|
"sexrab1", |
|
|
|
|
"sex1", |
|
|
|
|
"ecstat1", |
|
|
|
|
"owning_organisation", |
|
|
|
|
@ -979,6 +999,7 @@ private
|
|
|
|
|
errors.add(:field_24, error_message) unless supported_housing? # postcode_full |
|
|
|
|
errors.add(:field_25, error_message) unless supported_housing? # la |
|
|
|
|
errors.add(:field_42, error_message) # age1 |
|
|
|
|
errors.add(:field_130, error_message) # sexrab1 |
|
|
|
|
errors.add(:field_43, error_message) # sex1 |
|
|
|
|
errors.add(:field_46, error_message) # ecstat1 |
|
|
|
|
errors.add(:field_122, error_message) unless general_needs? # household_charge |
|
|
|
|
@ -1150,6 +1171,15 @@ private
|
|
|
|
|
town_or_city: [:field_21], |
|
|
|
|
county: [:field_22], |
|
|
|
|
uprn_selection: [:field_19], |
|
|
|
|
|
|
|
|
|
sexrab1: %i[field_130], |
|
|
|
|
sexrab2: %i[field_131], |
|
|
|
|
sexrab3: %i[field_132], |
|
|
|
|
sexrab4: %i[field_133], |
|
|
|
|
sexrab5: %i[field_134], |
|
|
|
|
sexrab6: %i[field_135], |
|
|
|
|
sexrab7: %i[field_136], |
|
|
|
|
sexrab8: %i[field_137], |
|
|
|
|
}.compact |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
@ -1335,6 +1365,15 @@ private
|
|
|
|
|
|
|
|
|
|
attributes["first_time_property_let_as_social_housing"] = first_time_property_let_as_social_housing |
|
|
|
|
|
|
|
|
|
attributes["sexrab1"] = field_130 |
|
|
|
|
attributes["sexrab2"] = field_131 |
|
|
|
|
attributes["sexrab3"] = field_132 |
|
|
|
|
attributes["sexrab4"] = field_133 |
|
|
|
|
attributes["sexrab5"] = field_134 |
|
|
|
|
attributes["sexrab6"] = field_135 |
|
|
|
|
attributes["sexrab7"] = field_136 |
|
|
|
|
attributes["sexrab8"] = field_137 |
|
|
|
|
|
|
|
|
|
if general_needs? |
|
|
|
|
attributes["uprn_known"] = field_18.present? ? 1 : 0 |
|
|
|
|
attributes["uprn_confirmed"] = 1 if field_18.present? |
|
|
|
|
|