{% load i18n %} {% load static %} {% load rules %} {# This div will be replaced by new content when the user clics on "Generate orders". #}
{% has_perm 'sous_chef.edit' request.user as can_edit_data %} {% if has_ordered_orders %} {% include 'partials/generated_orders_table_head.html' %} {# Display orders in error at top #} {% for order in orders %} {% if order.status == 'O' and order.is_in_error_for_the_kitchen_count %} {% include 'partials/generated_orders_order_row_content.html' %} {% endif %} {% endfor %} {# Then display orders not in error #} {% for order in orders %} {% if order.status == 'O' and not order.is_in_error_for_the_kitchen_count %} {% include 'partials/generated_orders_order_row_content.html' %} {% endif %} {% endfor %}
{% endif %} {% if has_cancelled_orders %}

{% trans "Cancelled Orders" %}

{% trans 'These clients will not receive a meal today, but their order can be enabled if needed (by viewing the order and setting the status to "Ordered").' %}

{% include 'partials/generated_orders_table_head.html' %} {% for order in orders %} {% if order.status == 'C' %} {% endif %} {% endfor %}
{{order.id}} {{order.client.member}} {% if order.client_planned_status_at_delivery != 'A' %} ({{ order.client_planned_status_at_delivery_verbose }}) {% endif %} {{order.delivery_date}} {{order.client.route}} {{order.get_status_display}} {{order.price}}
{% endif %} {% if not has_ordered_orders and not has_cancelled_orders %}

{% trans 'No orders found.' %}

{% endif %} {% if can_edit_data %} {% endif %}