@extends('layouts.app') @section('title', __('hms::lang.reports')) @section('content') @include('hms::layouts.nav')

@lang('hms::lang.reports')

@lang('hms::lang.report_help_text')

@component('components.filters', ['title' => __('report.filters'), 'closed' => false])
{!! Form::open([ 'url' => action([\Modules\Hms\Http\Controllers\HmsReportController::class, 'index']), 'method' => 'get', ]) !!}
{!! Form::label('date_to', __('hms::lang.date_to') . ':') !!} {!! Form::text('date_to', request('date_to'), [ 'class' => 'form-control date_to', 'placeholder' => __('hms::lang.date_to'), 'readonly', 'required', 'id' => 'date_to', ]) !!}
{!! Form::label('date_from', __('hms::lang.date_from') . ':') !!} {!! Form::text('date_from', request('date_from'), [ 'class' => 'form-control date_from', 'placeholder' => __('hms::lang.date_from'), 'readonly', 'required', 'id' => 'date_from', ]) !!}
{!! Form::close() !!}
@endcomponent @if (request()->has('date_to') && request()->has('date_from')) @component('components.widget')

@lang('hms::lang.total_bookings_received'):
{{ $total_booking->total_count }}
@lang('hms::lang.total_guests'):
{{ $total_booking->total_guest }}
@lang('hms::lang.total_nights_booked'):
{{ $total_booking->total_nights }}
@lang('hms::lang.total_amount'):
{{ $total_booking->total_amount }}

@lang('hms::lang.total_confirmed_bookings'):
{{ $total_confirmed_booking->total_count }}
@lang('hms::lang.total_confirmed_guests'):
{{ $total_confirmed_booking->total_guest }}
@lang('hms::lang.total_confirmed_nights')
{{ $total_confirmed_booking->total_nights }}
@lang('hms::lang.total_amount'):
{{ $total_confirmed_booking->total_amount }}

@lang('hms::lang.total_cancelled_bookings'):
{{ $total_cancelled_booking->total_count }}
@lang('hms::lang.total_cancelled_guests'):
{{ $total_cancelled_booking->total_guest }}
@lang('hms::lang.total_cancelled_nights')
{{ $total_cancelled_booking->total_nights }}
@lang('hms::lang.total_amount'):
{{ $total_cancelled_booking->total_amount }}

@lang('hms::lang.total_pending_bookings'):
{{ $total_pending_booking->total_count }}
@lang('hms::lang.total_pending_guests'):
{{ $total_pending_booking->total_guest }}
@lang('hms::lang.total_pending_nights')
{{ $total_pending_booking->total_nights }}
@lang('hms::lang.total_amount'):
{{ $total_pending_booking->total_amount }}

@lang('hms::lang.adults_guests'):
{{ $total_confirmed_booking->total_adult_guest }} @if ($total_confirmed_booking->total_guest != 0) ({{ ($total_confirmed_booking->total_adult_guest / $total_confirmed_booking->total_guest) * 100 }} %) @endif
@lang('hms::lang.children_guests'):
{{ $total_confirmed_booking->total_childs_guest }} @if ($total_confirmed_booking->total_guest != 0) ({{ ($total_confirmed_booking->total_childs_guest / $total_confirmed_booking->total_guest) * 100 }} %) @endif
@endcomponent @component('components.widget')
@lang('hms::lang.rooms_per_booking') @lang('hms::lang.bookings') %
@lang('hms::lang.one_room_bookings') {{ $rooms_by_booking_count->one_line_count }} @if ( $rooms_by_booking_count->one_line_count + $rooms_by_booking_count->two_lines_count + $rooms_by_booking_count->more_than_two_lines_count != 0) {{ number_format(($rooms_by_booking_count->one_line_count / ($rooms_by_booking_count->one_line_count + $rooms_by_booking_count->two_lines_count + $rooms_by_booking_count->more_than_two_lines_count)) * 100) }} % @else 0 % @endif
@lang('hms::lang.two_room_bookings') {{ $rooms_by_booking_count->two_lines_count }} @if ( $rooms_by_booking_count->one_line_count + $rooms_by_booking_count->two_lines_count + $rooms_by_booking_count->more_than_two_lines_count != 0) {{ number_format(($rooms_by_booking_count->two_lines_count / ($rooms_by_booking_count->one_line_count + $rooms_by_booking_count->two_lines_count + $rooms_by_booking_count->more_than_two_lines_count)) * 100) }} % @else 0 % @endif
@lang('hms::lang.two_+_room_bookings') {{ $rooms_by_booking_count->more_than_two_lines_count }} @if ( $rooms_by_booking_count->one_line_count + $rooms_by_booking_count->two_lines_count + $rooms_by_booking_count->more_than_two_lines_count != 0) {{ number_format(($rooms_by_booking_count->more_than_two_lines_count / ($rooms_by_booking_count->one_line_count + $rooms_by_booking_count->two_lines_count + $rooms_by_booking_count->more_than_two_lines_count)) * 100) }} % @else 0 % @endif
@endcomponent @component('components.widget')
@php $total_nights = $count_by_night->one_night_count + $count_by_night->two_night_count + $count_by_night->three_night_count + $count_by_night->four_night_count + $count_by_night->five_night_count + $count_by_night->six_night_count + $count_by_night->more_than_six_night_count; @endphp
@lang('hms::lang.nights_per_booking') @lang('hms::lang.booking') %
@lang('hms::lang.1_night_bookings') {{ $count_by_night->one_night_count }} @if ($total_nights != 0) {{ number_format(($count_by_night->one_night_count / $total_nights) * 100) }} % @else 0% @endif
@lang('hms::lang.2_night_bookings') {{ $count_by_night->two_night_count }} @if ($total_nights != 0) {{ number_format(($count_by_night->two_night_count / $total_nights) * 100) }} % @else 0% @endif
@lang('hms::lang.3_night_bookings') {{ $count_by_night->three_night_count }} @if ($total_nights != 0) {{ number_format(($count_by_night->three_night_count / $total_nights) * 100) }} % @else 0% @endif
@lang('hms::lang.4_night_bookings') {{ $count_by_night->four_night_count }} @if ($total_nights != 0) {{ number_format(($count_by_night->four_night_count / $total_nights) * 100) }} % @else 0% @endif
@lang('hms::lang.5_night_bookings') {{ $count_by_night->five_night_count }} @if ($total_nights != 0) {{ number_format(($count_by_night->five_night_count / $total_nights) * 100) }} % @else 0% @endif
@lang('hms::lang.6_night_bookings') {{ $count_by_night->six_night_count }} @if ($total_nights != 0) {{ number_format(($count_by_night->six_night_count / $total_nights) * 100) }} % @else 0% @endif
@lang('hms::lang.6_+_night_bookings') {{ $count_by_night->more_than_six_night_count }} @if ($total_nights != 0) {{ number_format(($count_by_night->more_than_six_night_count / $total_nights) * 100) }} % @else 0% @endif
@endcomponent @component('components.widget')
@php $total_adults = $count_by_adults->one_adult_count + $count_by_adults->two_adults_count + $count_by_adults->three_adults_count + $count_by_adults->four_adults_count + $count_by_adults->five_adults_count + $count_by_adults->six_adults_count + $count_by_adults->more_than_six_adults_count; @endphp
@lang('hms::lang.guests_per_booking') @lang('hms::lang.booking') %
@lang('hms::lang.1_guest_bookings') {{ $count_by_adults->one_adult_count }} @if ($total_adults != 0) {{ number_format(($count_by_adults->one_adult_count / $total_adults) * 100) }} % @else 0% @endif
@lang('hms::lang.2_guest_bookings') {{ $count_by_adults->two_adults_count }} @if ($total_adults != 0) {{ number_format(($count_by_adults->two_adults_count / $total_adults) * 100) }} % @else 0% @endif
@lang('hms::lang.3_guest_bookings') {{ $count_by_adults->three_adults_count }} @if ($total_adults != 0) {{ number_format(($count_by_adults->three_adults_count / $total_adults) * 100) }} % @else 0% @endif
@lang('hms::lang.4_guest_bookings') {{ $count_by_adults->four_adults_count }} @if ($total_adults != 0) {{ number_format(($count_by_adults->four_adults_count / $total_adults) * 100) }} % @else 0% @endif
@lang('hms::lang.5_guest_bookings') {{ $count_by_adults->five_adults_count }} @if ($total_adults != 0) {{ number_format(($count_by_adults->five_adults_count / $total_adults) * 100) }} % @else 0% @endif
@lang('hms::lang.6_guest_bookings') {{ $count_by_adults->six_adults_count }} @if ($total_adults != 0) {{ number_format(($count_by_adults->six_adults_count / $total_adults) * 100) }} % @else 0% @endif
@lang('hms::lang.6_+_guest_bookings') {{ $count_by_adults->more_than_six_adults_count }} @if ($total_adults != 0) {{ number_format(($count_by_adults->more_than_six_adults_count / $total_adults) * 100) }} % @else 0% @endif
@endcomponent @component('components.widget')
@include('hms::partials.hms_report_table')
@endcomponent @endif
@endsection @section('javascript') @endsection