add preneed owner to deceased record

deepsource-autofix-76c6eb20
Dan Gowans 2022-11-22 15:54:58 -05:00
parent a06186ede0
commit 9c840b0e9e
2 changed files with 33 additions and 33 deletions

View File

@ -281,7 +281,7 @@ function importFromMasterCSV() {
}
let preneedOccupancyStartDateString;
let preneedLotOccupancyId;
if (masterRow.CM_PRENEED_ORDER || masterRow.CM_STATUS === "P") {
if (masterRow.CM_PRENEED_OWNER || masterRow.CM_STATUS === "P") {
preneedOccupancyStartDateString = formatDateString(masterRow.CM_PURCHASE_YR, masterRow.CM_PURCHASE_MON, masterRow.CM_PURCHASE_DAY);
let occupancyEndDateString = "";
if (masterRow.CM_INTERMENT_YR !== "" && masterRow.CM_INTERMENT_YR !== "0") {
@ -474,7 +474,6 @@ function importFromMasterCSV() {
}, user);
}
updateLotStatus(lotId, takenLotStatus.lotStatusId, user);
}
if (masterRow.CM_PRENEED_OWNER) {
addLotOccupancyOccupant({
lotOccupancyId: deceasedLotOccupancyId,
@ -491,6 +490,7 @@ function importFromMasterCSV() {
}
}
}
}
catch (error) {
console.error(error);
console.log(masterRow);

View File

@ -540,7 +540,7 @@ function importFromMasterCSV() {
let preneedOccupancyStartDateString: string;
let preneedLotOccupancyId: number;
if (masterRow.CM_PRENEED_ORDER || masterRow.CM_STATUS === "P") {
if (masterRow.CM_PRENEED_OWNER || masterRow.CM_STATUS === "P") {
preneedOccupancyStartDateString = formatDateString(
masterRow.CM_PURCHASE_YR,
masterRow.CM_PURCHASE_MON,
@ -890,7 +890,6 @@ function importFromMasterCSV() {
}
updateLotStatus(lotId, takenLotStatus.lotStatusId, user);
}
if (masterRow.CM_PRENEED_OWNER) {
addLotOccupancyOccupant(
@ -910,6 +909,7 @@ function importFromMasterCSV() {
);
}
}
}
} catch (error) {
console.error(error);
console.log(masterRow);