diff --git a/calebasse/dossiers/templates/dossiers/quotations.html b/calebasse/dossiers/templates/dossiers/quotations.html
index 23554c86..8a18acfb 100644
--- a/calebasse/dossiers/templates/dossiers/quotations.html
+++ b/calebasse/dossiers/templates/dossiers/quotations.html
@@ -48,46 +48,7 @@
-
-
- N° dossier
- | Nom |
- Prénom |
- Date de naissance |
- État du dossier |
- Date du prochain rendez-vou |
- Date du dernier rendez-vous |
- Mises |
- ANAP |
-
-
- papier |
- inform. |
-
-
-
-
- {% for patient_record in patient_records %}
-
- {{ patient_record.object.paper_id|default_if_none:"" }} |
- {{ patient_record.object.id }} |
- {{ patient_record.object.last_name }} |
- {{ patient_record.object.first_name }} |
- {{ patient_record.object.birthdate|date:"d-m-Y" }} |
- {{ patient_record.state }} |
- {% if patient_record.next_rdv_date %}
- {{ patient_record.next_rdv_date|date:"d-m-Y, H:i" }}
- {% endif %}
- |
- {% if patient_record.last_rdv_date %}
- {{ patient_record.last_rdv_date|date:"d-m-Y, H:i" }}
- {% endif %} |
- {% if patient_record.mises %}{% endif %} |
- {% if patient_record.anap %}{% endif %} |
-
- {% endfor %}
-
-
+ {% include "dossiers/quotations_patients_table_content.html" %}
{% if request.GET %}
diff --git a/calebasse/dossiers/templates/dossiers/quotations_patients_table_content.html b/calebasse/dossiers/templates/dossiers/quotations_patients_table_content.html
new file mode 100644
index 00000000..88efcf72
--- /dev/null
+++ b/calebasse/dossiers/templates/dossiers/quotations_patients_table_content.html
@@ -0,0 +1,38 @@
+
+
+ N° dossier
+ | Nom |
+ Prénom |
+ Date de naissance |
+ État du dossier |
+ Date du prochain rendez-vou |
+ Date du dernier rendez-vous |
+ Mises |
+ ANAP |
+
+
+ papier |
+ inform. |
+
+
+
+ {% for patient_record in patient_records %}
+
+ {{ patient_record.object.paper_id|default_if_none:"" }} |
+ {{ patient_record.object.id }} |
+ {{ patient_record.object.last_name }} |
+ {{ patient_record.object.first_name }} |
+ {{ patient_record.object.birthdate|date:"d-m-Y" }} |
+ {{ patient_record.state.status.name }} le {{ patient_record.state.date_selected|date:"d-m-Y" }} |
+ {% if patient_record.next_rdv_date %}
+ {{ patient_record.next_rdv_date|date:"d-m-Y, H:i" }}
+ {% endif %}
+ |
+ {% if patient_record.last_rdv_date %}
+ {{ patient_record.last_rdv_date|date:"d-m-Y, H:i" }}
+ {% endif %} |
+ {% if patient_record.mises %}{% endif %} |
+ {% if patient_record.anap %}{% endif %} |
+
+ {% endfor %}
+
diff --git a/calebasse/dossiers/templates/dossiers/quotations_print.html b/calebasse/dossiers/templates/dossiers/quotations_print.html
index 0c87dbf4..0df5ecc1 100644
--- a/calebasse/dossiers/templates/dossiers/quotations_print.html
+++ b/calebasse/dossiers/templates/dossiers/quotations_print.html
@@ -1,40 +1,3 @@
-
-
- N° dossier
- | Nom |
- Prénom |
- Date de naissance |
- État du dossier |
- Date du prochain rendez-vou |
- Date du dernier rendez-vous |
- Mises |
- ANAP |
-
-
- papier |
- inform. |
-
-
-
- {% for patient_record in patient_records %}
-
- {{ patient_record.object.paper_id|default_if_none:"" }} |
- {{ patient_record.object.id }} |
- {{ patient_record.object.last_name }} |
- {{ patient_record.object.first_name }} |
- {{ patient_record.object.birthdate|date:"d-m-Y" }} |
- {{ patient_record.state }} |
- {% if patient_record.next_rdv_date %}
- {{ patient_record.next_rdv_date|date:"d-m-Y, H:i" }}
- {% endif %}
- |
- {% if patient_record.last_rdv_date %}
- {{ patient_record.last_rdv_date|date:"d-m-Y, H:i" }}
- {% endif %} |
- {% if patient_record.mises %}{% endif %} |
- {% if patient_record.anap %}{% endif %} |
-
- {% endfor %}
-
+ {% include "dossiers/quotations_patients_table_content.html" %}
diff --git a/calebasse/dossiers/views.py b/calebasse/dossiers/views.py
index 8f792d21..91f04690 100644
--- a/calebasse/dossiers/views.py
+++ b/calebasse/dossiers/views.py
@@ -863,8 +863,6 @@ class PatientRecordsQuotationsView(cbv.ListView):
patient_records = []
for patient_record in paginate_patient_records:
current_state = patient_record.get_current_state() or patient_record.get_state()
- state = current_state.status.name
- state_class = current_state.status.type.lower()
deficiencies = [getattr(patient_record, field) \
for field in self.model.DEFICIENCY_FIELDS]
anap = any(deficiencies)
@@ -883,8 +881,7 @@ class PatientRecordsQuotationsView(cbv.ListView):
patient_records.append(
{
'object': patient_record,
- 'state': state,
- 'state_class': state_class,
+ 'state': current_state,
'anap': anap,
'mises': mises,
'next_rdv_date': next_rdv_datetime,