Fix wrong date on fees #60

Merged
bilal.catic merged 3 commits from fix-wrong-date-on-fees into master 2019-09-11 12:27:08 +02:00
Showing only changes of commit dc0a335eb9 - Show all commits

View File

@@ -184,7 +184,9 @@ const bulkWriteReservationsWithChangesTracking = (reservations) => {
}
});
instance.setDataValue('hourlyRate', instance.previous('hourlyRate'));
if (instance.hourlyRate === 0 && parseFloat(instance.previous('hourlyRate')) > 0){
instance.setDataValue('hourlyRate', instance.previous('hourlyRate'));
}
if (realChange){
changes.push({