fix charging reservation changes
This commit is contained in:
@@ -76,7 +76,14 @@ const getIncidentsFromChanges = (changes) => {
|
||||
const reservationHourlyRate = oldReservation.hourlyRate ? oldReservation.hourlyRate : newReservation.hourlyRate;
|
||||
const canceled = newReservation.canceled;
|
||||
|
||||
if (oldStart && oldEnd && newStart && newEnd && reservationHourlyRate){
|
||||
// console.log('oldStart : ', oldStart ? oldStart.format() : 'null');
|
||||
// console.log('oldEnd : ', oldEnd ? oldEnd.format() : 'null ');
|
||||
// console.log('newStart : ', newStart ? newStart.format() : 'null');
|
||||
// console.log('newEnd : ', newEnd ? newEnd.format() : 'null');
|
||||
// console.log('hourly Rate : old : ', oldReservation ? oldReservation.hourlyRate : ' - ', newReservation ? newReservation.hourlyRate : ' - ');
|
||||
// console.log('Canceled : ', newReservation.canceled);
|
||||
|
||||
if (oldStart && oldEnd && newStart && newEnd){
|
||||
const oldReservationLength = oldEnd.diff(oldStart, 'hours', true);
|
||||
const newReservationLength = newEnd.diff(newStart, 'hours', true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user