{% extends "shared/frontend/base.html" %} {% block title %}{{ agreement.agreement_number }} - Fastpris Aftale{% endblock %} {% block content %}

📋 {{ agreement.agreement_number }}

{{ agreement.customer_name }}

{% if agreement.status == 'active' %} Aktiv {% elif agreement.status == 'suspended' %} Suspenderet {% elif agreement.status == 'expired' %} UdlĂžbet {% elif agreement.status == 'cancelled' %} Annulleret {% endif %}
MÄnedlige Timer

{{ '%.0f'|format(agreement.monthly_hours or 0) }} t

Timepris

{{ '%.0f'|format(agreement.hourly_rate or 0) }} kr

Denne MÄned

{{ '%.1f'|format(agreement.current_used_hours or 0) }} / {{ '%.0f'|format(agreement.monthly_hours or 0) }} t

{{ '%.1f'|format(agreement.current_remaining_hours or 0) }}t tilbage
Binding

{{ agreement.binding_months }} mdr

{% if agreement.binding_end_date %} Til {{ agreement.binding_end_date }} {% endif %}
Aftale Information
{% if agreement.end_date %} {% endif %}
Kunde ID: {{ agreement.customer_id }}
Kunde: {{ agreement.customer_name }}
Start Dato: {{ agreement.start_date }}
Slut Dato: {{ agreement.end_date }}
Oprettet: {{ agreement.created_at }}
Priser & VilkÄr
MÄnedlige Timer: {{ '%.0f'|format(agreement.monthly_hours or 0) }} timer
Normal Timepris: {{ '%.0f'|format(agreement.hourly_rate or 0) }} kr
Overtid Timepris: {{ '%.0f'|format(agreement.overtime_rate or 0) }} kr {% if agreement.overtime_rate and agreement.hourly_rate %}({{ '%.0f'|format((agreement.overtime_rate / agreement.hourly_rate - 1) * 100) }}%){% endif %}
Afrunding: {% if agreement.rounding_minutes == 0 %}Ingen{% else %}{{ agreement.rounding_minutes }} min{% endif %}
Bindingsperiode: {{ agreement.binding_months }} mÄneder
Opsigelsesfrist: {{ agreement.notice_period_days }} dage
{% for period in periods %} {% endfor %}
Periode Status Brugte Timer Resterende Timer Overtid MÄnedlig VÊrdi
{{ period.period_start }} til {{ period.period_end }} {% if period.status == 'active' %} Aktiv {% elif period.status == 'pending_approval' %} ⚠ Overtid {% elif period.status == 'ready_to_bill' %} Klar til faktura {% elif period.status == 'billed' %} Faktureret {% endif %} {{ '%.1f'|format(period.used_hours or 0) }}t {{ '%.1f'|format(period.remaining_hours or 0) }}t {% if period.overtime_hours and period.overtime_hours > 0 %} +{{ '%.1f'|format(period.overtime_hours) }}t {% else %} - {% endif %} {{ '%.0f'|format(period.base_amount or 0) }} kr
{% if sager %}
{% for sag in sager %} {% endfor %}
Sag ID Titel Status Oprettet Handlinger
#{{ sag.id }} {{ sag.titel }} {% if sag.status == 'open' %} Åben {% elif sag.status == 'in_progress' %} I gang {% elif sag.status == 'closed' %} Lukket {% endif %} {{ sag.created_at.strftime('%Y-%m-%d') if sag.created_at else '-' }} Vis
{% else %}

Ingen sager endnu

{% endif %}
{% if time_entries %}
{% for entry in time_entries %} {% endfor %}
Dato Sag Beskrivelse Timer Afrundet
{{ entry.created_at.strftime('%Y-%m-%d') if entry.created_at else '-' }} {% if entry.sag_id %} #{{ entry.sag_id }} {% if entry.sag_titel %}
{{ entry.sag_titel[:30] }} {% endif %} {% else %} - {% endif %}
{{ entry.note[:50] if entry.note else '-' }} {{ '%.2f'|format(entry.approved_hours or entry.original_hours or 0) }}t {% if entry.rounded_to %} {{ entry.rounded_to }} min {% else %} - {% endif %}
{% else %}

Ingen tidsregistreringer endnu

{% endif %}
{% endblock %}