{% extends "base.html" %} {% block title %}{{ t('CRM Analysis') }}{% endblock %} {% block content %}

{{ t('CRM Analysis') }}

{% include "crm/_nav.html" %}
{{ t('Open pipeline') }}
{{ open_total|money }}
{{ t('Weighted pipeline') }}
{{ weighted|money }}
{{ t('expected revenue × probability') }}
{{ t('Won') }}
{{ by_stage.won.amount|money }}
{{ by_stage.won.n }} {{ t('opportunities') }}
{{ t('Win rate') }}
{{ ('%.0f%%' % win_rate) if win_rate is not none else '—' }}
{{ t('won / (won + lost)') }}

{{ t('Pipeline by stage') }}

{% for k, l, p in stages %}{% endfor %}
{{ t('Stage') }}{{ t('Opportunities') }}{{ t('Expected revenue') }}{{ t('Weighted') }}
{{ t(l) }}{{ by_stage[k].n }}{{ by_stage[k].amount|money }}{{ by_stage[k].weighted|money }}

{{ t('By source') }}

{% for s, v in by_source.items() %} {% else %}{% endfor %}
{{ t('Source') }}{{ t('Opportunities') }}{{ t('Won') }}{{ t('Lost') }}{{ t('Win rate') }}{{ t('Won revenue') }}
{{ t(s) }}{{ v.n }}{{ v.won }}{{ v.lost }} {{ ('%.0f%%' % (100 * v.won / (v.won + v.lost))) if v.won + v.lost else '—' }}{{ v.amount_won|money }}
{{ t('Nothing yet.') }}

{{ t('Lost reasons') }}

{% for r in lost %}{% else %}{% endfor %}
{{ r.lost_reason }}{{ r.n }}
{{ t('Nothing yet.') }}

{{ t('By salesperson') }}

{% for s, v in by_owner.items() %} {% else %}{% endfor %}
{{ t('Salesperson') }}{{ t('Opportunities') }}{{ t('Open') }}{{ t('Won') }}{{ t('Lost') }}{{ t('Win rate') }}{{ t('Won revenue') }}
{{ s }}{{ v.n }}{{ v.open }}{{ v.won }}{{ v.lost }} {{ ('%.0f%%' % (100 * v.won / (v.won + v.lost))) if v.won + v.lost else '—' }}{{ v.amount_won|money }}
{{ t('Nothing yet.') }}
{{ t('Amounts are shown as entered on each opportunity.') }}
{% endblock %}