{% extends "base.html" %} {% block title %}Approvals{% endblock %} {% block header %}Approvals{% endblock %} {% block content %} {% set show_waiting = (request.args.get('show_waiting') in ['1','true','yes','on']) %} {% macro money(v) -%} {%- if v is none -%}0.00 {%- else -%} {%- set s = v|string -%} {%- set s = s|replace(",", "") -%} {%- if s == "" -%}0.00{%- else -%}{{ "%.2f"|format(s|float) }}{%- endif -%} {%- endif -%} {%- endmacro %}
| Quote | Opportunity | Total | Rule | Step | Assigned To | Status | Action |
|---|---|---|---|---|---|---|---|
|
{% if a.quote %}
{{ a.quote.quote_code }}
V{{ a.quote.version }}
{% else %}
—
{% endif %}
|
{% if opp %}
{{ opp.opp_code }}
{{ opp.title }}
{% else %}
—
{% endif %}
|
{% if a.quote %} {{ money(a.quote.total) }} {% else %} 0.00 {% endif %} |
{{ a.rule.name if a.rule else '—' }}
{% if a.rule and (a.rule.min_amount is not none or a.rule.max_amount is not none) %}
Min: {{ money(a.rule.min_amount or 0) }} •
Max: {{ money(a.rule.max_amount) if a.rule.max_amount is not none else '∞' }}
{% endif %}
|
#{{ a.step_order or 1 }} |
{% if a.approver_user %}
{{ a.approver_user.name }}
User-mapped
{% else %}
{{ a.approver_role or '—' }}
Role-mapped
{% endif %}
|
{% if a.status == "PENDING" %} PENDING {% elif a.status == "WAITING" %} WAITING {% elif a.status == "APPROVED" %} APPROVED {% elif a.status == "REJECTED" %} REJECTED {% elif a.status == "CANCELLED" %} CANCELLED {% else %} {{ a.status }} {% endif %} | {% if a.status == "PENDING" %} {% else %} No action required {% endif %} |
| {% if show_waiting %} No pending/waiting approvals 🎉 {% else %} No pending approvals 🎉 {% endif %} | |||||||