Fix bugs with dor lock charges

This commit is contained in:
Senad Uka
2019-07-03 18:07:22 +02:00
parent 1d9d5ac684
commit 2fcb10522c
3 changed files with 234 additions and 97 deletions

View File

@@ -116,10 +116,10 @@ const getFirstPreviousBooking = (reservation) => {
const getFirstReservationInBlock = (reservation) => {
return new Promise ((resolve, reject) => {
const {resourceId, memberId, start} = reservation;
const { resourceId, memberId, start } = reservation;
const fromTimestamp = moment.utc(start).subtract(MAX_BACK_TO_BACK_DIFFERENCE).toISOString();
const toTimestamp = reservation.end;
const toTimestamp = start;
const filters = {
resourceId,