{% macro company_summary(view_model) %}

{{ gettext("Company overview") }}


{{ gettext("ID") }} {{ view_model.id }}
{{ gettext("Name") }} {{ view_model.name }}
{{ gettext("Email") }} {{ view_model.email }}
{{ gettext("Registered since") }} {{ view_model.registered_on }}

{{ gettext("Metrics") }}


{% for exp in view_model.expectations %} {% endfor %} {% for bal in view_model.account_balances %} {% endfor %} {% for dev_rel in view_model.deviations_relative %} {% endfor %}
{{ "industry"|icon }}
{{ gettext("Account p") }}
{{ "oil-can"|icon }}
{{ gettext("Account r") }}
{{ "users"|icon }}
{{ gettext("Account a") }}
{{ "exchange-alt"|icon }}
{{ gettext("Account prd") }}
{{ gettext("Expectations") }}{{ exp }}
{{ gettext("Balances") }}{{ bal }}
{{ gettext("Deviation (%)") }}{{ dev_rel.percentage }}

{{ gettext("Suppliers") }}


{% if view_model.show_suppliers %} {% for supplier in view_model.suppliers_ordered_by_volume %}

{{ supplier.company_name }} - {{ supplier.volume_of_sales }}

{% endfor %} {% else %}

{{ gettext("This company has no suppliers.") }}

{% endif %}

{{ gettext("Plans") }}


{% for plan in view_model.plan_details %} {% endfor %}
{{ gettext("Status") }} {{ gettext("Planned sales") }} {{ gettext("Sales deviation") }} {{ gettext("Sales deviation (%)") }}
{{ plan.name }} {{ plan.status }} {{ plan.sales_volume }} {{ plan.sales_balance }} {{ plan.deviation_relative.percentage }}
{% endmacro %}