diff --git a/hotel_calendar/models/bus_hotel_calendar.py b/hotel_calendar/models/bus_hotel_calendar.py index a40514443..751e54235 100644 --- a/hotel_calendar/models/bus_hotel_calendar.py +++ b/hotel_calendar/models/bus_hotel_calendar.py @@ -63,9 +63,9 @@ class BusHotelCalendar(models.TransientModel): 'checkout': vals['checkout'], 'arrival_hour': vals['arrival_hour'], 'departure_hour': vals['departure_hour'], - 'amount_total': vals['amount_total'], + 'price_room_services_set': vals['price_room_services_set'], + 'invoices_paid': vals['invoices_paid'], 'pending_amount': vals['pending_amount'], - 'amount_paid': vals['amount_paid'], 'type': vals['reservation_type'], 'closure_reason': vals['closure_reason'], 'out_service_description': vals['out_service_description'], diff --git a/hotel_calendar/models/inherited_hotel_reservation.py b/hotel_calendar/models/inherited_hotel_reservation.py index b09828a82..5c145ec38 100644 --- a/hotel_calendar/models/inherited_hotel_reservation.py +++ b/hotel_calendar/models/inherited_hotel_reservation.py @@ -109,9 +109,9 @@ class HotelReservation(models.Model): 'checkout': reserv['checkout'], 'arrival_hour': reserv['arrival_hour'], 'departure_hour': reserv['departure_hour'], - 'amount_total': reserv['amount_total'], + 'price_room_services_set': reserv['price_room_services_set'], + 'invoices_paid': reserv['invoices_paid'], 'pending_amount': reserv['pending_amount'], - 'amount_paid': reserv['amount_total'] - (reserv['pending_amount'] or 0.0), 'type': reserv['reservation_type'] or 'normal', 'closure_reason': reserv['closure_reason'], 'out_service_description': reserv['out_service_description'] @@ -189,8 +189,9 @@ class HotelReservation(models.Model): hr.id, hr.room_id, hr.adults, hr.children, hr.checkin, hr.checkout, hr.reserve_color, hr.reserve_color_text, hr.splitted, hr.parent_reservation, hr.overbooking, hr.state, hr.real_checkin, hr.real_checkout, hr.out_service_description, hr.arrival_hour, hr.departure_hour, hr.channel_type, + hr.price_room_services_set, - hf.id as folio_id, hf.name as folio_name, hf.reservation_type, hf.amount_total, hf.pending_amount, + hf.id as folio_id, hf.name as folio_name, hf.reservation_type, hf.invoices_paid, hf.pending_amount, rp.mobile, rp.phone, rp.email, rp.name as partner_name, @@ -415,9 +416,9 @@ class HotelReservation(models.Model): 'state': self.state, 'fix_days': self.splitted, 'overbooking': self.overbooking, - 'amount_total': self.folio_id.amount_total, + 'price_room_services_set': self.price_room_services_set, + 'invoices_paid': self.folio_id.invoices_paid, 'pending_amount': self.folio_id.pending_amount, - 'amount_paid': self.folio_id.amount_total - self.folio_id.pending_amount, 'reservation_type': self.reservation_type or 'normal', 'closure_reason': self.closure_reason_id.name, 'out_service_description': self.out_service_description diff --git a/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js b/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js index c69dfcb81..0180b8513 100644 --- a/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js +++ b/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js @@ -752,9 +752,9 @@ var PMSCalendarController = AbstractController.extend({ '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(), + 'price_room_services_set': Number(tp['price_room_services_set']).toLocaleString(), + 'invoices_paid': Number(tp['invoices_paid']).toLocaleString(), 'pending_amount': Number(tp['pending_amount']).toLocaleString(), - 'amount_paid': Number(tp['amount_paid']).toLocaleString(), 'reservation_type': tp['type'], 'closure_reason': tp['closure_reason'], 'out_service_description': tp['out_service_description'], diff --git a/hotel_calendar/static/src/xml/hotel_calendar_templates.xml b/hotel_calendar/static/src/xml/hotel_calendar_templates.xml index 1686be60d..3a4c0596d 100644 --- a/hotel_calendar/static/src/xml/hotel_calendar_templates.xml +++ b/hotel_calendar/static/src/xml/hotel_calendar_templates.xml @@ -117,7 +117,7 @@
Adults:
Children:
Folio Pending
-Total Paid