{% extends "base.html" %} {% block title %}{{ contract.name }} - Contrat GMAO{% endblock %} {% block content %}

{{ contract.name }}

{% if contract.contract_number %}N° {{ contract.contract_number }}{% endif %}
Modifier
Statut : {{ contract.status }} {% if contract.is_active %} — Contrat actif{% endif %} {% if contract.is_expiring_soon %} — Expire dans {{ contract.days_until_expiry }} jours{% endif %} {% if contract.must_send_notice_now %} — Preavis a envoyer avant le {{ contract.notice_deadline_calculated.strftime('%d/%m/%Y') }} {% endif %}
Entreprise
{% if contract.company %} {{ contract.company.name }} {% else %}—{% endif %}
Lot / Equipement
{% if contract.lot %}Lot: {{ contract.lot.name }}{% endif %} {% if contract.equipment %}{{ contract.equipment.name }}{% endif %} {% if not contract.lot and not contract.equipment %}—{% endif %}
Visites du prestataire
{% for visit in contract.visits %} {% else %}{% endfor %}
DateStatutCompte rendu
{{ visit.scheduled_date.strftime('%d/%m/%Y') }}{{ visit.status }}{{ visit.report or '—' }}{% if visit.status != 'realisee' %}
{% endif %}
Aucune visite générée
Dates
Signe le{{ contract.signed_date.strftime('%d/%m/%Y') if contract.signed_date else '—' }}
Date de debut{{ contract.start_date.strftime('%d/%m/%Y') if contract.start_date else '—' }}
Date de fin {% if contract.end_date %} {{ contract.end_date.strftime('%d/%m/%Y') }} {% if contract.days_until_expiry is not none %} {% if contract.days_until_expiry < 0 %}Expire {% elif contract.days_until_expiry <= 90 %}{{ contract.days_until_expiry }}j restants {% else %}({{ contract.days_until_expiry }}j){% endif %} {% endif %} {% else %}Duree indeterminee{% endif %}
Visites extérieures{% if contract.visit_interval_days %}Tous les {{ contract.visit_interval_days }} jours · prochaine visite {{ contract.next_visit_date.strftime('%d/%m/%Y') if contract.next_visit_date else 'à planifier' }}{% else %}—{% endif %}
Reconduction et preavis
Tacite reconduction {% if contract.tacit_renewal %}Oui (tous les {{ contract.renewal_period_days }} jours) {% else %}Non{% endif %}
Delai de preavis{{ contract.notice_period_days }} jours avant la fin{% if not contract.notice_period_days %}—{% endif %}
Date limite preavis {% if contract.notice_deadline_calculated %} {{ contract.notice_deadline_calculated.strftime('%d/%m/%Y') }} {% if contract.must_send_notice_now %}URGENT{% endif %} {% else %}—{% endif %}
{% if contract.annual_amount or contract.notes %}
{% if contract.annual_amount %}
Montant annuel
{{ "%.2f"|format(contract.annual_amount) }} EUR {% endif %} {% if contract.notes %}
Notes

{{ contract.notes }}

{% endif %}
{% endif %}
{% endblock %}