From 1b45741278bffb3350218fc1ca33382f0b7543b2 Mon Sep 17 00:00:00 2001 From: Phil Lee Date: Tue, 10 Jan 2023 10:22:21 +0000 Subject: [PATCH] fix leftreg mapping for bulk upload --- app/services/bulk_upload/lettings/row_parser.rb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/services/bulk_upload/lettings/row_parser.rb b/app/services/bulk_upload/lettings/row_parser.rb index b000f6aab..bc167f6f9 100644 --- a/app/services/bulk_upload/lettings/row_parser.rb +++ b/app/services/bulk_upload/lettings/row_parser.rb @@ -394,7 +394,7 @@ private attributes["ecstat1"] = field_35 attributes["armedforces"] = field_45 - attributes["leftreg"] = field_114 + attributes["leftreg"] = leftreg attributes["reservist"] = field_46 attributes["preg_occ"] = field_47 @@ -441,6 +441,19 @@ private attributes end + def leftreg + case field_114 + when 3 + 3 + when 4 + 1 + when 5 + 2 + when 6 + 0 + end + end + def homeless case field_68 when 1