|
|
|
@ -154,7 +154,7 @@ module Imports |
|
|
|
attributes["buyer_livein_value_check"] = 0 |
|
|
|
attributes["buyer_livein_value_check"] = 0 |
|
|
|
attributes["percentage_discount_value_check"] = 0 |
|
|
|
attributes["percentage_discount_value_check"] = 0 |
|
|
|
|
|
|
|
|
|
|
|
if attributes["saledate"] >= Time.zone.local(2023, 4, 1) |
|
|
|
# 2023/34 attributes |
|
|
|
attributes["uprn"] = string_or_nil(xml_doc, "UPRN") |
|
|
|
attributes["uprn"] = string_or_nil(xml_doc, "UPRN") |
|
|
|
attributes["uprn_known"] = attributes["uprn"].present? ? 1 : 0 |
|
|
|
attributes["uprn_known"] = attributes["uprn"].present? ? 1 : 0 |
|
|
|
attributes["uprn_confirmed"] = attributes["uprn"].present? ? 1 : 0 |
|
|
|
attributes["uprn_confirmed"] = attributes["uprn"].present? ? 1 : 0 |
|
|
|
@ -174,7 +174,6 @@ module Imports |
|
|
|
|
|
|
|
|
|
|
|
attributes["staircasesale"] = unsafe_string_as_integer(xml_doc, "STAIRCASESALE") |
|
|
|
attributes["staircasesale"] = unsafe_string_as_integer(xml_doc, "STAIRCASESALE") |
|
|
|
attributes["prevtenbuy2"] = unsafe_string_as_integer(xml_doc, "PREVTENBUY2") |
|
|
|
attributes["prevtenbuy2"] = unsafe_string_as_integer(xml_doc, "PREVTENBUY2") |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Sets the log creator |
|
|
|
# Sets the log creator |
|
|
|
owner_id = meta_field_value(xml_doc, "owner-user-id").strip |
|
|
|
owner_id = meta_field_value(xml_doc, "owner-user-id").strip |
|
|
|
@ -589,12 +588,10 @@ module Imports |
|
|
|
attributes["relat2"] ||= "R" |
|
|
|
attributes["relat2"] ||= "R" |
|
|
|
attributes["inc2mort"] ||= 3 |
|
|
|
attributes["inc2mort"] ||= 3 |
|
|
|
attributes["buy2livein"] ||= 1 unless attributes["ownershipsch"] == 3 |
|
|
|
attributes["buy2livein"] ||= 1 unless attributes["ownershipsch"] == 3 |
|
|
|
if attributes["saledate"] >= Time.zone.local(2023, 4, 1) |
|
|
|
|
|
|
|
attributes["ethnic_group2"] ||= 17 |
|
|
|
attributes["ethnic_group2"] ||= 17 |
|
|
|
attributes["ethnicbuy2"] ||= 17 |
|
|
|
attributes["ethnicbuy2"] ||= 17 |
|
|
|
attributes["nationalbuy2"] ||= 13 |
|
|
|
attributes["nationalbuy2"] ||= 13 |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# other household members characteristics |
|
|
|
# other household members characteristics |
|
|
|
(2..[attributes["hhmemb"], 6].min).each do |index| |
|
|
|
(2..[attributes["hhmemb"], 6].min).each do |index| |
|
|
|
|