This commit is contained in:
oscar alvarez 2022-06-08 12:49:19 -05:00
parent 50feec00e7
commit 04ab10645d
3 changed files with 5 additions and 5 deletions

View File

@ -1201,8 +1201,8 @@ class RoomsOccupancyReport(Report):
all_rooms = Room.search([], order=[('code', 'ASC')])
folios = Folio.search([
('arrival_date', '<=', start_date),
('departure_date', '>=', start_date),
('registration_state', '=', 'check_in'),
('departure_date', '>', start_date),
('registration_state', 'in', ['check_in', 'check_out']),
])
def _get_default_room(r):

View File

@ -1641,8 +1641,8 @@ class GuestsListReport(Report):
for guest in op.guests:
guests.append({
'room': op.room.code,
'guest': guest.party.name,
'party': op.party.name if op.party else '',
'guest': guest.name,
'party': op.booking.party.name if op.booking.party else '',
'arrival_date': op.arrival_date,
'departure_date': op.departure_date,
'nights_quantity': op.nights_quantity,
@ -1651,7 +1651,7 @@ class GuestsListReport(Report):
report_context['total_rooms'] = _rooms_occupied
report_context['total_guests'] = sum(total_guests)
report_context['occupancy_rate'] = occupancy_rate
report_context['company'] = Company(data['company']).party.name
report_context['company'] = Company(data['company'])
report_context['date'] = data['date']
report_context['print_date'] = datetime.now()
report_context['user'] = user.name

Binary file not shown.