diff --git a/temp/legacy.importFromCSV.js b/temp/legacy.importFromCSV.js index 0205e5b4..0496e1b4 100644 --- a/temp/legacy.importFromCSV.js +++ b/temp/legacy.importFromCSV.js @@ -321,6 +321,9 @@ function importFromMasterCSV() { masterRow.CM_DEATH_YR !== "" && masterRow.CM_DEATH_YR !== "0") { preneedOccupancyStartDateString = formatDateString(masterRow.CM_DEATH_YR, masterRow.CM_DEATH_MON, masterRow.CM_DEATH_DAY); + if (occupancyEndDateString === "0000-00-00" || occupancyEndDateString === "") { + occupancyEndDateString = preneedOccupancyStartDateString; + } } if (preneedOccupancyStartDateString === "" || preneedOccupancyStartDateString === "0000-00-00") { diff --git a/temp/legacy.importFromCSV.ts b/temp/legacy.importFromCSV.ts index 2bfd7029..07899260 100644 --- a/temp/legacy.importFromCSV.ts +++ b/temp/legacy.importFromCSV.ts @@ -602,6 +602,11 @@ function importFromMasterCSV() { masterRow.CM_DEATH_MON, masterRow.CM_DEATH_DAY ); + + // if death took place, and there's no preneed end date + if (occupancyEndDateString === "0000-00-00" || occupancyEndDateString === "") { + occupancyEndDateString = preneedOccupancyStartDateString; + } } if (