From 261f1ba354df1bc040c5e43ac8572445c04a9ef7 Mon Sep 17 00:00:00 2001 From: Dan Gowans Date: Tue, 25 Mar 2025 12:21:34 -0400 Subject: [PATCH] include funeralHomeName --- database/getContracts.js | 4 +++- database/getContracts.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/database/getContracts.js b/database/getContracts.js index 8821b3da..09637e2e 100644 --- a/database/getContracts.js +++ b/database/getContracts.js @@ -111,7 +111,8 @@ export default async function getContracts(filters, options, connectedDatabase) o.purchaserName, o.purchaserAddress1, o.purchaserAddress2, o.purchaserCity, o.purchaserProvince, o.purchaserPostalCode, o.purchaserPhoneNumber, o.purchaserEmail, o.purchaserRelationship, - o.funeralHomeId, o.funeralDirectorName, + o.funeralHomeId, o.funeralDirectorName, f.funeralHomeName, + o.funeralDate, userFn_dateIntegerToString(o.funeralDate) as funeralDateString, o.funeralTime, userFn_timeIntegerToString(o.funeralTime) as funeralTimeString, o.committalTypeId, c.committalType @@ -121,6 +122,7 @@ export default async function getContracts(filters, options, connectedDatabase) left join BurialSites l on o.burialSiteId = l.burialSiteId left join BurialSiteTypes lt on l.burialSiteTypeId = lt.burialSiteTypeId left join Cemeteries m on l.cemeteryId = m.cemeteryId + left join FuneralHomes f on o.funeralHomeId = f.funeralHomeId ${sqlWhereClause} order by o.contractStartDate desc, ifnull(o.contractEndDate, 99999999) desc, l.burialSiteNameSegment1, diff --git a/database/getContracts.ts b/database/getContracts.ts index 13109f9e..a9b128c6 100644 --- a/database/getContracts.ts +++ b/database/getContracts.ts @@ -214,7 +214,8 @@ export default async function getContracts( o.purchaserName, o.purchaserAddress1, o.purchaserAddress2, o.purchaserCity, o.purchaserProvince, o.purchaserPostalCode, o.purchaserPhoneNumber, o.purchaserEmail, o.purchaserRelationship, - o.funeralHomeId, o.funeralDirectorName, + o.funeralHomeId, o.funeralDirectorName, f.funeralHomeName, + o.funeralDate, userFn_dateIntegerToString(o.funeralDate) as funeralDateString, o.funeralTime, userFn_timeIntegerToString(o.funeralTime) as funeralTimeString, o.committalTypeId, c.committalType @@ -224,6 +225,7 @@ export default async function getContracts( left join BurialSites l on o.burialSiteId = l.burialSiteId left join BurialSiteTypes lt on l.burialSiteTypeId = lt.burialSiteTypeId left join Cemeteries m on l.cemeteryId = m.cemeteryId + left join FuneralHomes f on o.funeralHomeId = f.funeralHomeId ${sqlWhereClause} order by o.contractStartDate desc, ifnull(o.contractEndDate, 99999999) desc, l.burialSiteNameSegment1,