Browse Source

Set major repair date

pull/550/head
baarkerlounger 3 years ago
parent
commit
6b820a5c04
  1. 6
      app/services/imports/case_logs_import_service.rb

6
app/services/imports/case_logs_import_service.rb

@ -129,7 +129,11 @@ module Imports
attributes["voiddate"] = compose_date(xml_doc, "VDAY", "VMONTH", "VYEAR")
attributes["mrcdate"] = compose_date(xml_doc, "MRCDAY", "MRCMONTH", "MRCYEAR")
attributes["majorrepairs"] = attributes["mrcdate"].present? ? 1 : nil
attributes["majorrepairs"] = if attributes["mrcdate"].present? && previous_status.include?("submitted")
1
elsif previous_status.include?("submitted")
0
end
attributes["offered"] = safe_string_as_integer(xml_doc, "Q20")
attributes["propcode"] = string_or_nil(xml_doc, "Q21a")

Loading…
Cancel
Save