track legacy work order number field

deepsource-autofix-76c6eb20
Dan Gowans 2023-03-09 15:43:42 -05:00
parent 38ce826e9d
commit bd749ccb48
2 changed files with 40 additions and 0 deletions

View File

@ -231,6 +231,14 @@ async function importFromMasterCSV() {
lotOccupancyComment: masterRow.CM_REMARK2 lotOccupancyComment: masterRow.CM_REMARK2
}, user); }, user);
} }
if (masterRow.CM_WORK_ORDER.trim() !== '') {
await addLotOccupancyComment({
lotOccupancyId: preneedLotOccupancyId,
lotOccupancyCommentDateString: preneedOccupancyStartDateString,
lotOccupancyCommentTimeString: '00:00',
lotOccupancyComment: 'Imported Contract #' + masterRow.CM_WORK_ORDER
}, user);
}
if (occupancyEndDateString === '') { if (occupancyEndDateString === '') {
await updateLotStatus(lotId, importIds.reservedLotStatusId, user); await updateLotStatus(lotId, importIds.reservedLotStatusId, user);
} }
@ -369,6 +377,14 @@ async function importFromMasterCSV() {
lotOccupancyComment: masterRow.CM_REMARK2 lotOccupancyComment: masterRow.CM_REMARK2
}, user); }, user);
} }
if (masterRow.CM_WORK_ORDER.trim() !== '') {
await addLotOccupancyComment({
lotOccupancyId: deceasedLotOccupancyId,
lotOccupancyCommentDateString: deceasedOccupancyStartDateString,
lotOccupancyCommentTimeString: '00:00',
lotOccupancyComment: 'Imported Contract #' + masterRow.CM_WORK_ORDER
}, user);
}
await updateLotStatus(lotId, importIds.takenLotStatusId, user); await updateLotStatus(lotId, importIds.takenLotStatusId, user);
if (masterRow.CM_PRENEED_OWNER !== '') { if (masterRow.CM_PRENEED_OWNER !== '') {
await addLotOccupancyOccupant({ await addLotOccupancyOccupant({

View File

@ -507,6 +507,18 @@ async function importFromMasterCSV(): Promise<void> {
) )
} }
if (masterRow.CM_WORK_ORDER.trim() !== '') {
await addLotOccupancyComment(
{
lotOccupancyId: preneedLotOccupancyId,
lotOccupancyCommentDateString: preneedOccupancyStartDateString,
lotOccupancyCommentTimeString: '00:00',
lotOccupancyComment: 'Imported Contract #' + masterRow.CM_WORK_ORDER
},
user
)
}
if (occupancyEndDateString === '') { if (occupancyEndDateString === '') {
await updateLotStatus(lotId, importIds.reservedLotStatusId, user) await updateLotStatus(lotId, importIds.reservedLotStatusId, user)
} }
@ -762,6 +774,18 @@ async function importFromMasterCSV(): Promise<void> {
) )
} }
if (masterRow.CM_WORK_ORDER.trim() !== '') {
await addLotOccupancyComment(
{
lotOccupancyId: deceasedLotOccupancyId,
lotOccupancyCommentDateString: deceasedOccupancyStartDateString,
lotOccupancyCommentTimeString: '00:00',
lotOccupancyComment: 'Imported Contract #' + masterRow.CM_WORK_ORDER
},
user
)
}
await updateLotStatus(lotId, importIds.takenLotStatusId, user) await updateLotStatus(lotId, importIds.takenLotStatusId, user)
if (masterRow.CM_PRENEED_OWNER !== '') { if (masterRow.CM_PRENEED_OWNER !== '') {