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

{{ t('Approval Workflow') }}

{{ t('Who approves what. For each document the first active rule that matches (branch, department, amount) is used; no matching rule means no approval is needed. The person who submits a document never approves it.') }}
{{ t('Approval Roles') }}+ {{ t('New rule') }}
{% for key, info in types.items() %}

{{ t(info.label) }}

{% for r in rows if r.doc_type == key %} {% else %}{% endfor %}
{{ t('Rule') }}{{ t('Applies to') }}{{ t('From amount') }}{{ t('Up to') }}{{ t('Steps') }}{{ t('Priority') }}{{ t('Status') }}
{{ r.name }} {{ r.bcode or t('All branches') }}{% if r.department %} · {{ r.department }}{% endif %} {{ r.min_amount|money(currency) }}{{ r.max_amount|money(currency) if r.max_amount is not none else '∞' }} {% for s in steps.get(r.id, []) %}{{ s.step_no }}. {{ s.name }}{% if s.dynamic == 'project_manager' %} ({{ t('Project manager') }}){% endif %}{% if s.role_en %} ({{ nm({'name_en': s.role_en, 'name_ar': s.role_ar}) }}){% endif %}{% if s.mode == 'all' %} · {{ t('all') }}{% elif s.required > 1 %} · {{ s.required }}{% endif %} {% endfor %} {{ r.priority }}{{ t('Active') if r.active else t('Off') }}
{{ t('No rule: these documents need no approval.') }} + {{ t('Add a rule') }}
{% endfor %}

{{ t('Amounts are in the company currency') }} ({{ currency }}).

{% endblock %}