[FIX] Use real_dates for showing correct checkin/checkout in splitted reservation

This commit is contained in:
Pablo
2019-01-22 18:50:39 +01:00
parent 81a69f5a1d
commit ed9ffcb31e
3 changed files with 6 additions and 4 deletions

View File

@@ -68,6 +68,7 @@ class BusHotelCalendar(models.TransientModel):
'type': vals['reservation_type'],
'out_service_description': vals['out_service_description'],
'splitted': vals['splitted'],
'real_dates': vals['real_dates'],
'channel_type': vals['channel_type'],
}
}

View File

@@ -117,6 +117,7 @@ class HotelReservation(models.Model):
or _('No reason given'),
'splitted': reserv['splitted'],
'channel_type': reserv['channel_type'],
'real_dates': [reserv['real_checkin'], reserv['real_checkout']],
# TODO: Add Board Services and Extra Service as Cradle, Bed, ...
}
})

View File

@@ -746,10 +746,10 @@ var PMSCalendarController = AbstractController.extend({
'room_type_name': tp['room_type_name'],
'adults': tp['adults'],
'children': tp['children'],
'checkin': HotelCalendar.toMomentUTC(tp['checkin'], '').format("DD MMMM"),
'checkin_day_of_week': HotelCalendar.toMomentUTC(tp['checkin'], '').format("dddd"),
'checkout': HotelCalendar.toMomentUTC(tp['checkout'], '').format("DD MMMM"),
'checkout_day_of_week': HotelCalendar.toMomentUTC(tp['checkout'], '').format("dddd"),
'checkin': HotelCalendar.toMomentUTC(tp['real_dates'][0], '').format("DD MMMM"),
'checkin_day_of_week': HotelCalendar.toMomentUTC(tp['real_dates'][0], '').format("dddd"),
'checkout': HotelCalendar.toMomentUTC(tp['real_dates'][1], '').format("DD MMMM"),
'checkout_day_of_week': HotelCalendar.toMomentUTC(tp['real_dates'][1], '').format("dddd"),
'arrival_hour': tp['arrival_hour'],
'departure_hour': tp['departure_hour'],
'amount_total': Number(tp['amount_total']).toLocaleString(),