{% if booking.localBilled == true %}
{% set duration = d2_get_accomodation_duration(booking.id) %} {% if booking.adultOccupants > 0 %} {% set adult_total = d2_get_adult_accomodation_charge(booking.id) %} {% endif %} {% if booking.childrenOccupants > 0 %} {% set child_total = d2_get_child_accomodation_charge(booking.id) %} {% endif %}
{{ booking.unit.unitName|upper }} - OUTSTANDING
DateItemPersonsDaysTotal (incl)
{{ booking.arrivalDate|date('Y-m-d') }} to {{ booking.checkoutDate|date('Y-m-d') }} Accomodation: Adult {{ booking.adultOccupants }} {{ duration }} {{ adult_total|number_format(2, '.', '') }}
{{ booking.arrivalDate|date('Y-m-d') }} to {{ booking.checkoutDate|date('Y-m-d') }} Accomodation: Child {{ booking.childrenOccupants }} {{ duration }} {{ child_total|number_format(2, '.', '') }}
{% endif %} {% if activities|length > 0 %}
{% for activity_sched in activities %} {% set activity_totals = d2_get_shed_activity_total(activity_sched) %} {% endfor %}
SERVICES - OUTSTANDING
DateServiceQtyTotal (incl)
{{ activity_sched.startDate|date('Y-m-d') }} {{ activity_sched.activity.activityName }} {{ activity_sched.quantity }} {{ activity_totals['total']|number_format(2, '.', '') }}
{% endif %} {% if pos_sessions|length > 0 %}
{% for session in pos_sessions %} {% for item in session.cartItems %} {% set item_totals = d2_get_pos_item_total(item) %} {% endfor %} {% endfor %}
POINT OF SALE - OUTSTANDING
DateItemQtyTotal (incl)
{{ session.date|date('Y-m-d') }}
{{ item.stockItem.description }} {{ item.quantity }} {{ item_totals['total']|number_format(2, '.', '') }}
{% endif %} {% if invoices|length > 0 %}
{% for invoice in invoices %} {% endfor %}
Invoices
DateDocumentAmountStatusOutstanding (incl)
{{ invoice.date|date('Y-m-d') }} {{ invoice.docNo }} {{ invoice.total|number_format(2, '.', '') }} {{ invoice.status }} {% if invoice.status == 'outstanding' and invoice.outstanding|round(2) == 0.00 %} {{ invoice.total|number_format(2, '.', '') }} {% else %} {{ invoice.outstanding|number_format(2, '.', '') }} {% endif %}
{% endif %}
SUB TOTAL{{ sub_total|number_format(2, '.', '') }}
VAT (15%){{ vat|number_format(2, '.', '') }}
TOTAL{{ total|number_format(2, '.', '') }}
TYPE
REFERENCE
AMOUNT{{ total|number_format(2, '.', '') }}