diff --git a/services/integration/doorLockCharges.js b/services/integration/doorLockCharges.js index 582ba28..0a1d706 100644 --- a/services/integration/doorLockCharges.js +++ b/services/integration/doorLockCharges.js @@ -18,7 +18,8 @@ const { getAllFinishedBookings, getFirstPreviousBooking, getFirstNextBooking } = const getSortedIncidentsForMember = (memberId) => { const attributes = ['bookingStart', 'incidentLevel', 'incidentLevelPrice', 'unlockTimestamp']; const filters = { - memberId + memberId, + deleted: false }; const order = [['unlockTimestamp', 'DESC']]; @@ -59,6 +60,7 @@ const insertUnscheduledIncidents = (incidents) => { bookingEnd: end, unlockTimestamp, lockTimestamp, + deleted: false }, defaults: {...incidentForDB}, })); @@ -93,6 +95,7 @@ const insertUnlockedIncidents = (incidents) => { bookingEnd: end, unlockTimestamp, incidentLevel, + deleted: false }, defaults: {...incidentForDB}, })); diff --git a/services/integration/reports.js b/services/integration/reports.js index 3717112..c605c5c 100644 --- a/services/integration/reports.js +++ b/services/integration/reports.js @@ -18,7 +18,9 @@ const { getChargedCanceledReservations } = require('../integration/bookingChange const getUnlockedIncidents = (startDate, endDate, memberIds) => { const attributes = ['id', 'reservationId', 'memberId', 'resourceId', 'bookingStart', 'bookingEnd', 'unlockTimestamp', 'incidentLevel', 'incidentLevelPrice']; - const filters = {}; + const filters = { + deleted: false + }; if (startDate && endDate) { const bookingStartCondition = { @@ -76,7 +78,9 @@ const getUnscheduledIncidents = (startDate, endDate, memberIds) => { 'totalChargeFee' ]; - const filters = {}; + const filters = { + deleted: false + }; if (startDate && endDate) { const bookingStartCondition = {