{#- The grid itself. Served alone when the address carries partial=1. -#} {% macro state_fields() %}{% for k, v in state.params() %}{% endfor %}{% endmacro %} {% set headers = [("id", "Bill"), ("arrived", "Arrived"), ("customer", "Customer"), ("service", "Service"), ("outlet", "Outlet"), ("unit", "Units"), ("payment", "Charged"), ("status", "Status")] %}
{% if message %}

{{ message[1] }}

{% endif %} {% if keyset %}

Newest first, {{ rows|length }} bills after the last one you saw (keyset paging).

{% elif total %}

Showing {{ (state.page - 1) * state.size + 1 }}–{{ [state.page * state.size, total]|min }} of {{ "{:,}".format(total) }} bills · page {{ state.page }} of {{ pages }}

{% else %}

No bill matches these filters.

{% endif %} {% for key, label in headers %} {% endfor %} {% for r in rows %} {% if r.id == edit and r.status in next_status %} {% elif r.id == confirm and r.status == "queued" and r.paid == 0 %} {% else %} {% endif %} {% endfor %} {% if not keyset %} {% endif %}
{{ label }} {%- if key == state.sort %} {{ "▲"|safe if state.dir == "asc" else "▼"|safe }}{% endif %}Paid Actions
{{ r.id }}{{ r.arrived[:16] }}{{ r.customer }}{{ r.service }} {{ r.outlet|replace("Profitina Laundry ", "") }}{{ r.unit }} {{ r.payment|rupiah }}
{{ state_fields() }}
{{ r.paid|rupiah }} Cancel
{{ r.id }}{{ r.arrived[:16] }}{{ r.customer }}{{ r.service }} {{ r.outlet|replace("Profitina Laundry ", "") }}{{ r.unit }} {{ r.payment|rupiah }} {{ r.status }} {{ r.paid|rupiah }}
{{ state_fields() }} Delete for good? Keep
{{ r.id }}{{ r.arrived[:16] }}{{ r.customer }}{{ r.service }} {{ r.outlet|replace("Profitina Laundry ", "") }}{{ r.unit }} {{ r.payment|rupiah }} {{ r.status }} {{ r.paid|rupiah }} {% if r.status in next_status %}Edit{% endif %} {% if r.status == "queued" and r.paid == 0 %}Delete{% endif %}
Total charged, all {{ "{:,}".format(total) }} matching bills {{ charged|rupiah }}
{% if keyset %} {% elif pages > 1 %} {% endif %}

Download all matching bills as CSV