{% extends "base.html" %} {% from "_macros.html" import branch_tag with context %} {% block title %}{{ t('Point of Sale') }}{% endblock %} {% block content %}

{{ t('Point of Sale') }}

{% if can_write %}
+ {{ t('New Register') }}
{% endif %}
{% for r in registers %}
{{ branch_tag(branches, r.branch_id) }} {{ r.name }}
{% if r.open_session %}
● {{ t('Open') }}
{{ r.cashier or '' }}
{% else %}
{{ t('Closed') }}
{% if can_write %}
{{ t('Settings') }}
{% endif %} {% endif %}
{% else %}
{{ t('Create a register to start selling.') }}
{% endfor %}

{{ t('Sessions') }}

{% for s in sessions %}{% set cur = branches[s.branch_id].currency if s.branch_id in branches else none %} {% else %}{% endfor %}
{{ t('Session') }}{{ t('Register') }}{{ t('Branch') }}{{ t('Cashier') }}{{ t('Opened') }}{{ t('Closed') }} {{ t('Orders') }}{{ t('Total') }}{{ t('Status') }}
{{ s.number }}{{ s.register_name }}{{ branch_tag(branches, s.branch_id) }} {{ s.cashier or '' }}{{ (s.opened_at or '').replace('T', ' ')[:16] }}{{ (s.closed_at or '').replace('T', ' ')[:16] }} {{ s.n }}{{ s.total|money(cur) }} {{ t('Closed') if s.state == 'closed' else t('Open') }}
{{ t('Nothing yet.') }}
{% endblock %}