Browse Source

Fix date check

pull/2158/head
Kat 2 years ago
parent
commit
3e7c5a91b7
  1. 4
      app/services/bulk_upload/lettings/year2023/csv_parser.rb
  2. 4
      app/services/bulk_upload/lettings/year2024/csv_parser.rb

4
app/services/bulk_upload/lettings/year2023/csv_parser.rb

@ -105,9 +105,9 @@ private
def first_record_start_date def first_record_start_date
if with_headers? if with_headers?
Date.new(row_parsers.first.field_98.to_i + 2000, row_parsers.first.field_97.to_i, row_parsers.first.field_96.to_i) Date.new(row_parsers.first.field_9.to_i + 2000, row_parsers.first.field_8.to_i, row_parsers.first.field_7.to_i)
else else
Date.new(rows.first[97].to_i + 2000, rows.first[96].to_i, rows.first[95].to_i) Date.new(rows.first[8].to_i + 2000, rows.first[7].to_i, rows.first[6].to_i)
end end
end end
end end

4
app/services/bulk_upload/lettings/year2024/csv_parser.rb

@ -105,9 +105,9 @@ private
def first_record_start_date def first_record_start_date
if with_headers? if with_headers?
Date.new(row_parsers.first.field_98.to_i + 2000, row_parsers.first.field_97.to_i, row_parsers.first.field_96.to_i) Date.new(row_parsers.first.field_10.to_i + 2000, row_parsers.first.field_9.to_i, row_parsers.first.field_8.to_i)
else else
Date.new(rows.first[97].to_i + 2000, rows.first[96].to_i, rows.first[95].to_i) Date.new(rows.first[9].to_i + 2000, rows.first[8].to_i, rows.first[7].to_i)
end end
end end
end end

Loading…
Cancel
Save