{% extends "shared/frontend/base.html" %} {% block title %}Fastpris Rapporter - BMC Hub{% endblock %} {% block content %}

📊 Fastpris Rapporter

Profitabilitet og performance analyse

{% if error %}
Fejl: {{ error }}
{% endif %}
Aktive Aftaler

{{ stats.active_agreements or 0 }}

af {{ stats.total_agreements or 0 }} total
Total Omsætning

{{ "{:,.0f}".format(stats.total_revenue or 0) }} kr

Månedlig værdi
Estimeret Profit

{{ "{:,.0f}".format(stats.estimated_profit or 0) }} kr

Ved 300 kr/t kostpris
Profit Margin
{% set profit_margin = ((stats.estimated_profit|float / stats.total_revenue|float * 100)|round(1)) if stats.total_revenue and stats.total_revenue > 0 else 0 %}

{{ profit_margin }}%

Gennemsnitlig margin
Aftale Performance
Sorteret efter profit margin
{% if performance %}
{% for agr in performance %} {% endfor %}
Aftale Kunde Total Timer Månedlig Værdi Profit Margin Udnyttelse
{{ agr.agreement_number }} {{ agr.customer_name }} {{ '%.1f'|format(agr.total_used_hours or 0) }}t {{ "{:,.0f}".format(agr.total_base_revenue or 0) }} kr {% if agr.estimated_profit and agr.estimated_profit > 0 %} {{ "{:,.0f}".format(agr.estimated_profit) }} kr {% else %} {{ "{:,.0f}".format(agr.estimated_profit or 0) }} kr {% endif %} {% if agr.profit_margin and agr.profit_margin >= 30 %} {{ '%.1f'|format(agr.profit_margin) }}% {% elif agr.profit_margin and agr.profit_margin >= 15 %} {{ '%.1f'|format(agr.profit_margin) }}% {% else %} {{ '%.1f'|format(agr.profit_margin or 0) }}% {% endif %} {% set utilization = ((agr.total_used_hours or 0) / (agr.total_allocated_hours or 1) * 100) if agr.total_allocated_hours else 0 %} {% if utilization >= 80 %} {{ '%.0f'|format(utilization) }}% {% elif utilization >= 50 %} {{ '%.0f'|format(utilization) }}% {% else %} {{ '%.0f'|format(utilization) }}% {% endif %}
{% else %}

Ingen performance data tilgængelig

{% endif %}
Top Kunder
Sorteret efter total forbrug
{% if customers %}
{% for customer in customers %} {% endfor %}
Kunde Aftaler Total Timer Overtid Total Værdi Avg Margin
{{ customer.customer_name }} {{ customer.agreement_count }} {{ '%.1f'|format(customer.total_used_hours or 0) }}t {% if customer.total_overtime_hours and customer.total_overtime_hours > 0 %} {{ '%.1f'|format(customer.total_overtime_hours) }}t {% else %} - {% endif %} {{ "{:,.0f}".format(customer.total_revenue or 0) }} kr {% if customer.avg_profit_margin and customer.avg_profit_margin >= 30 %} {{ '%.1f'|format(customer.avg_profit_margin) }}% {% elif customer.avg_profit_margin and customer.avg_profit_margin >= 15 %} {{ '%.1f'|format(customer.avg_profit_margin) }}% {% else %} {{ '%.1f'|format(customer.avg_profit_margin or 0) }}% {% endif %}
{% else %}

Ingen kunde data tilgængelig

{% endif %}
{% endblock %}