{% extends 'D2BandBBundle::base_admin.html.twig' %} {% macro list_scheduled_activities(schedules) %} {% if schedules|length > 0 %} {% for schedule in schedules %} {% if schedule.booking %} {% set customer = schedule.booking.account.customers|first %} {% else %} {% set customer = null %} {% endif %} {% if loop.first %}
{% endif %}
IMAGE
{{ schedule.activity.activityName|title }}
{{ customer.firstname|slice(0,1) }} {{ customer.lastname|title }}
{{ schedule.startDate|date('Y-m-d H:i') }}
{% if not loop.first and loop.index%6 == 0 %}
{% endif %} {% endfor %}
{% endif %} {% endmacro %} {% macro list_activities(activities) %} {% if activities|length > 0 %} {% for activity in activities %} {% if loop.first %}
{% endif %}
IMAGE
{{ activity.activityName|title }}
{% if not loop.first and loop.index%6 == 0 %}
{% endif %} {% endfor %}
{% endif %} {% endmacro %} {% macro list_units(units) %} {% if units|length > 0 %} {% for unit in units %} {% if loop.first %}
{% endif %}
{% if unit.path is not null %} IMAGE {% else %} IMAGE {% endif %}
{{ unit.unitName|title }}
{% if not loop.first and loop.index%6 == 0 %}
{% endif %} {% endfor %}
{% endif %} {% endmacro %} {% macro list_bookings(bookings, booking_status_opts) %} {% if bookings|length > 0 %} {% for booking in bookings %} {% if loop.first %}
{% endif %}
{% set customer = booking.account.customers|first %} {% if booking.bookingStatus == constant('D2\\BandBBundle\\Entity\\BandBBooking::TYPE_BS_PROVISIONAL') %} IMAGE {% elseif booking.bookingStatus == constant('D2\\BandBBundle\\Entity\\BandBBooking::TYPE_BS_BOOKED') %} IMAGE {% elseif booking.bookingStatus == constant('D2\\BandBBundle\\Entity\\BandBBooking::TYPE_BS_CHECKED_IN') %} IMAGE {% elseif booking.bookingStatus == constant('D2\\BandBBundle\\Entity\\BandBBooking::TYPE_BS_CHECKED_OUT') %} IMAGE {% else %} IMAGE {% endif %}
{{ customer.firstname|slice(0,1) }} {{ customer.lastname|title }}
{{ booking }}
{% if not loop.first and loop.index%6 == 0 %}
{% endif %} {% endfor %}
{% endif %} {% endmacro %} {% macro list_invoices(invoices) %} {% if invoices|length > 0 %} {% for invoice in invoices %} {% if loop.first %}
{% endif %}
{% if invoice.getStatus|upper == 'OUTSTANDING' %} IMAGE {% else %} IMAGE {% endif %}
{{ invoice.getDocNo }}
{% if invoice.booking %}{{ invoice.booking }}{% else %}{{ invoice.getAccount.getAccountNumber }}{% endif %}
{{ invoice.getStatus|upper }}
{% if not loop.first and loop.index%6 == 0 %}
{% endif %} {% endfor %}
{% endif %} {% endmacro %} {% macro list_pos_sessions(sessions) %} {% if sessions|length > 0 %} {% for session in sessions %} {% if session.booking is not null %} {% set customer = session.booking.account.customers|first %} {% else %} {% set customer = session.account.customers|first %} {% endif %} {% if loop.first %}
{% endif %}
{% if session.invoice is not null %} IMAGE {% else %} IMAGE {% endif %}
{% if customer is not null %}{{ customer.firstname|slice(0,1) }} {{ customer.lastname|title }}{% endif %}
{% if session.booking %}{{ session.booking }}{% endif %}
{% if session.invoice is not null %}{{ session.invoice.getDocNo }}{% else %}NOT INVOICED{% endif %}
{% if not loop.first and loop.index%6 == 0 %}
{% endif %} {% endfor %}
{% endif %} {% endmacro %} {% block head_style_extra %} {% endblock head_style_extra %} {% block head_script_extra %} {% endblock head_script_extra %} {% block page_header %}
{% for k, v in app.request.query %} {% if k|lower not in ['customer', 'booking', 'page'] %} {% endif %} {% endfor %}
{% endblock page_header %} {% block content %}
{#
#}
{#
#}
Reservations: Recent Today Tomorrow
{{ _self.list_bookings(recent_bookings, booking_status_opts) }}
{{ _self.list_units(recent_units) }}
{{ _self.list_activities(recent_activities) }}
Recent Services
{{ _self.list_scheduled_activities(recent_activity_schedules) }}
Point of Sale
{{ _self.list_pos_sessions(recent_pos_sessions) }}
Invoices
{{ _self.list_invoices(recent_invoices) }}
{% endblock content %}