[UPD] Show price_room_services_set, pending_amount and invoices_paid

This commit is contained in:
Pablo
2019-01-28 11:15:20 +01:00
parent 2d1da3dd9f
commit 4b412c3f51
4 changed files with 13 additions and 12 deletions

View File

@@ -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'],

View File

@@ -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

View File

@@ -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'],

View File

@@ -117,7 +117,7 @@
<p><t t-esc="board_service_name"/></p>
<span class="circle pull-left"><t t-esc="amount_total" t-widget="monetary"/></span>
<span class="circle pull-left"><t t-esc="price_room_services_set" t-widget="monetary"/></span>
<p>Adults: <t t-esc="adults"/></p>
<p class="children">Children: <t t-esc="children"/></p>
</div>
@@ -129,11 +129,11 @@
<div class="col-sm-3 bg-gray-light pb-10 pr-0">
<!-- FIXME: HARD CURRENCY -->
<p>Folio Pending</p>
<h3><t t-esc="amount_total" t-widget="monetary"/></h3>
<h3><t t-esc="pending_amount" t-widget="monetary"/></h3>
</div>
<div class="col-sm-3 bg-gray-lighter pb-10">
<!-- FIXME: HARD CURRENCY -->
<h3><t t-esc="amount_paid" t-widget="monetary"/></h3>
<h3><t t-esc="invoices_paid" t-widget="monetary"/></h3>
<p>Total Paid</p>
</div>
<div class="col-sm-6 bg-gray-light">