Fix wrong date in the charge

This commit is contained in:
Senad Uka
2019-09-11 19:12:39 +02:00
parent 4ca6fd7363
commit dd381db50e
3 changed files with 14 additions and 5 deletions

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({