{% extends "base.html" %} {% from "_macros.html" import state_badge, pay_badge, icon with context %} {% block title %}{{ t('Dashboard') }}{% endblock %} {% macro delta(cur, prev, up_is_good=True) -%} {%- if prev -%} {%- set pct = (cur - prev) / (prev if prev > 0 else -prev) * 100 -%} {%- set good = (pct >= 0) == up_is_good -%} {{ '▲' if pct >= 0 else '▼' }} {{ '%.1f'|format(pct|abs) }}%{{ t('vs last year') }} {%- else -%}{{ t('Year to date') }}{%- endif -%} {%- endmacro %} {% block content %} {% if empty %}
| {{ t('Branch') }} | {{ t('Revenue (YTD)') }} | {{ t('Net Profit (YTD)') }} | {{ t('Share of revenue') }} | {{ t('Receivables') }} |
|---|---|---|---|---|
{{ b.code }} {{ nm(b) }}{{ b.currency }}{% if b.currency != currency %} → {{ currency }}{% endif %} |
{{ s.revenue|money(currency) }} | {{ s.profit|money(currency) }} | {{ s.receivable|money(currency) }} | |
| {{ t('Total') }} | {{ totals.revenue|money(currency) }} | {{ totals.profit|money(currency) }} | {{ totals.receivable|money(currency) }} |
| {{ t('Bank and Cash') }} | {{ totals.cash|money(currency) }} |
| {{ t('Receivables') }} | {{ totals.receivable|money(currency) }} |
| {{ t('Payables') }} | {{ totals.payable|money(currency) }} |
| {{ t('Net Profit (YTD)') }} | {{ totals.profit|money(currency) }} |
{{ (pname[:2] if lang == 'en' else pname[:1])|upper }} {{ i.number or t('Draft') }}{{ pname }} |
{% if i.overdue %}{{ t('Overdue') }}{% elif i.pay %}{{ pay_badge(i.pay) }}{% else %}{{ state_badge(i.state) }}{% endif %} | {{ i.amount_total|money }} |
| {{ t('Nothing yet.') }} |