From 2dc787d2ed9a71f3095606846d9b998664fd9277 Mon Sep 17 00:00:00 2001 From: Bilal Catic Date: Mon, 9 Dec 2019 06:51:03 +0100 Subject: [PATCH 1/4] reformat "moved to another day" fee text, show old booking time --- services/integration/invoiceIntegration.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/integration/invoiceIntegration.js b/services/integration/invoiceIntegration.js index 7101224..bec2c27 100644 --- a/services/integration/invoiceIntegration.js +++ b/services/integration/invoiceIntegration.js @@ -138,8 +138,8 @@ const createFeeFromIncident = (incident) => { roomExplanation = newResourceName || 'Unknown'; // dateExplanation = `${oldBookingStartMoment.clone().format('ddd, MMM DD')} -> ${newBookingStartMoment.clone().format('ddd, MMM DD')}`; - dateExplanation = `${newBookingStartMoment.clone().format('MMM DD')}`; - bookingTimeExplanation = `[${newBookingStartMoment.clone().format('HH:mm')} to ${newBookingEndMoment.clone().format('HH:mm')}]`; + dateExplanation = `${oldBookingStartMoment.clone().format('MMM DD')}`; + bookingTimeExplanation = `[${oldBookingStartMoment.clone().format('HH:mm')} to ${oldBookingEndMoment.clone().format('HH:mm')}]`; incidentTimeExplanation = `moved on : ${incidentTimestampMoment.clone().format('MMM DD, HH:mm')}`; incidentExplanation += `, ${incidentTimeExplanation}`; From 3b442f9b344f2b154a7fad21ea27aac3d19f1420 Mon Sep 17 00:00:00 2001 From: Bilal Catic Date: Mon, 9 Dec 2019 06:51:30 +0100 Subject: [PATCH 2/4] change "moved to another day" fee text explanation --- constants/constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constants/constants.js b/constants/constants.js index aaeff9f..5a44445 100644 --- a/constants/constants.js +++ b/constants/constants.js @@ -102,7 +102,7 @@ incidentTypeExplanations[incidentType.UNLOCKED_INCIDENT_STANDALONE] incidentTypeExplanations[incidentType.UNSCHEDULED_INCIDENT_BEFORE_RESERVATION] = 'room used before reservation'; incidentTypeExplanations[incidentType.UNSCHEDULED_INCIDENT_AFTER_RESERVATION] = 'room used after reservation'; incidentTypeExplanations[incidentType.UNSCHEDULED_INCIDENT_STANDALONE] = 'room used without reservation'; -incidentTypeExplanations[incidentType.BOOKING_MOVED_TO_ANOTHER_DAY] = 'reservation moved to another day'; +incidentTypeExplanations[incidentType.BOOKING_MOVED_TO_ANOTHER_DAY] = 'reservation moved to another day in less than 24 hrs'; incidentTypeExplanations[incidentType.BOOKING_SHORTENED] = 'reservation shortened after grace period'; incidentTypeExplanations[incidentType.BOOKING_CANCELED_LATE] = 'reservation cancelled after grace period'; From b13980a16d4d86f6e64271cd51f54ed4ac95dc08 Mon Sep 17 00:00:00 2001 From: Bilal Catic Date: Mon, 9 Dec 2019 06:55:14 +0100 Subject: [PATCH 3/4] change date of shortening fees to the date of booking --- services/integration/invoiceIntegration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/integration/invoiceIntegration.js b/services/integration/invoiceIntegration.js index bec2c27..3eab044 100644 --- a/services/integration/invoiceIntegration.js +++ b/services/integration/invoiceIntegration.js @@ -165,7 +165,7 @@ const createFeeFromIncident = (incident) => { incidentTimeExplanation = `reservation shortened from [${originalBookingExplanation}] on [${incidentTimestampMoment.clone().format('MMM DD, HH:mm')}]`; incidentExplanation = `${incidentTimeExplanation}`; - date = incidentTimestampMoment.clone().startOf('day').format(); + date = newBookingStartMoment.clone().startOf('day').format(); price = +totalChargeFee.toFixed(2); quantity = 1.00; From 052f2ac482cb82473c27b02b9a76d63f95f498f3 Mon Sep 17 00:00:00 2001 From: Bilal Catic Date: Mon, 9 Dec 2019 07:39:46 +0100 Subject: [PATCH 4/4] change date of shortening fees to the date of booking --- services/integration/invoiceIntegration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/integration/invoiceIntegration.js b/services/integration/invoiceIntegration.js index 3eab044..468b968 100644 --- a/services/integration/invoiceIntegration.js +++ b/services/integration/invoiceIntegration.js @@ -165,7 +165,7 @@ const createFeeFromIncident = (incident) => { incidentTimeExplanation = `reservation shortened from [${originalBookingExplanation}] on [${incidentTimestampMoment.clone().format('MMM DD, HH:mm')}]`; incidentExplanation = `${incidentTimeExplanation}`; - date = newBookingStartMoment.clone().startOf('day').format(); + date = newBookingStartMoment.clone().utc(UI_TIMEZONE).startOf('day').format(); price = +totalChargeFee.toFixed(2); quantity = 1.00;