|
|
@ -125,7 +125,7 @@ module Imports |
|
|
|
attributes["tcharge"] = safe_string_as_decimal(xml_doc, "Q18av") |
|
|
|
attributes["tcharge"] = safe_string_as_decimal(xml_doc, "Q18av") |
|
|
|
|
|
|
|
|
|
|
|
attributes["hbrentshortfall"] = unsafe_string_as_integer(xml_doc, "Q18d") |
|
|
|
attributes["hbrentshortfall"] = unsafe_string_as_integer(xml_doc, "Q18d") |
|
|
|
attributes["tshortfall"] = safe_string_as_decimal(xml_doc, "Q18dyes") |
|
|
|
attributes["tshortfall"] = tshortfall(xml_doc, attributes) |
|
|
|
|
|
|
|
|
|
|
|
attributes["voiddate"] = compose_date(xml_doc, "VDAY", "VMONTH", "VYEAR") |
|
|
|
attributes["voiddate"] = compose_date(xml_doc, "VDAY", "VMONTH", "VYEAR") |
|
|
|
attributes["mrcdate"] = compose_date(xml_doc, "MRCDAY", "MRCMONTH", "MRCYEAR") |
|
|
|
attributes["mrcdate"] = compose_date(xml_doc, "MRCDAY", "MRCMONTH", "MRCYEAR") |
|
|
@ -513,5 +513,12 @@ module Imports |
|
|
|
def people_with_details(xml_doc) |
|
|
|
def people_with_details(xml_doc) |
|
|
|
((2..8).map { |x| string_or_nil(xml_doc, "P#{x}Rel") } + [string_or_nil(xml_doc, "P1Sex")]).compact |
|
|
|
((2..8).map { |x| string_or_nil(xml_doc, "P#{x}Rel") } + [string_or_nil(xml_doc, "P1Sex")]).compact |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def tshortfall(xml_doc, attributes) |
|
|
|
|
|
|
|
shortfall = safe_string_as_decimal(xml_doc, "Q18dyes") |
|
|
|
|
|
|
|
return 0 if shortfall.blank? && attributes["hbrentshortfall"] == 1 && overridden?(xml_doc, "xmlns", "Q18dyes") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
shortfall |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|