Project

General

Profile

Download (5.59 KB) Statistics
| Branch: | Tag: | Revision:

calebasse / calebasse / facturation / templates / facturation / detail.html @ 627acbe5

1
{% extends "facturation/base.html" %}
2
{% load url from future %}
3

    
4
{% block appbar %}
5
    <h2>
6

    
7
    {% if service_name == "CMPP" %}
8
        Facturation {{ invoicing.seq_id }}
9
        {% if invoicing.status == "open" %}
10
            ouverte et ayant débuté le {{ invoicing.start_date }}
11
        {% else %}
12
            {% if invoicing.status == "closed" %}
13
            fermée
14
            {% else %}
15
            validée
16
            {% endif %}
17
            couvrant la période du {{ invoicing.start_date }} au {{ invoicing.end_date }}
18
        {% endif %}
19
    {% else %}
20
        Décompte {{ invoicing.seq_id }}
21
        {% if invoicing.status == "validated" %}
22
        validé
23
        {% endif %}
24
        pour le trimestre allant du {{ invoicing.start_date }} au {{ invoicing.end_date }}
25
    {% endif %}</h2>
26
    <a href="..">Retourner à la liste</a>
27
    {% if service_name == "CMPP" %}
28
        {% if invoicing.status == "open" %}<button id="close"">Clôre cette facturation</button>{% endif %}
29
        {% if invoicing.status == "closed" %}<button id="validate"">Valider cette facturation</button>{% endif %}
30
        {% if invoicing.status == "validated" %}
31
            <button id="teletrans-btn" style="display: none;">Télétransmission à l'assurance maladie</button>
32
            <button id="expcompt-btn" style="display: none;">Export comptabilité</button>
33
        {% endif %}
34
    {% else %}
35
        {% if invoicing.status == "closed" %}<button id="validate" style="display: none;">Valider ce décompte</button>{% endif %}
36
        {% if invoicing.status == "validated" %}<button id="print-btn" style="display: none;">Imprimer</button>{% endif %}
37
    {% endif %}
38
{% endblock %}
39

    
40
{% block content %}
41

    
42
    <div id="facturation-contents">
43
    {% if days_not_locked %}
44
    <h3>Jours non vérouillés</h3>
45
        <ul>
46
        {% for day in days_not_locked %}
47
            <li><a href="../../agenda/{{ day.year }}-{{ day.month }}-{{ day.day }}/validation-des-actes">{{ day.day }}/{{ day.month }}/{{ day.year }}</a></li>
48
        {% endfor %}
49
        </ul>
50
    {% endif %}
51
    <h3>Résumé</h3>
52
    {% if service_name == "CMPP" %}
53
        {% if invoicing.status == "open" or invoicing.status == "closed" %}
54
        <ul>
55
            {% if len_acts_invoiced_hors_pause %}
56
              <li>Actes facturables hors dossiers en pause: {{ len_acts_invoiced_hors_pause }}
57
                <ul>
58
                  <li>Dossiers concernés : {{ len_patient_invoiced_hors_pause }}</li>
59
                  <li>Nombre de factures : {{ len_invoices_hors_pause }}</li>
60
                </ul>
61
              </li>
62
            {% else %}
63
              <li>Pas d'actes facturables pour les dossiers hors pause.</li>
64
            {% endif %}
65

    
66
            {% if len_acts_invoiced_pause %}
67
              <li>Actes facturables des dossiers en pause: {{ len_acts_invoiced_pause }}
68
                <ul>
69
                  <li>Dossiers concernés : {{ len_patient_invoiced_pause }}</li>
70
                  <li>Nombre de factures : {{ len_invoices_pause }}</li>
71
                </ul>
72
              </li>
73
            {% else %}
74
              <li>Pas d'actes facturables pour les dossiers en pause.</li>
75
            {% endif %}
76

    
77
            {% if len_acts_lost %}
78
              <li>Actes facturables mais non pris en charge: {{ len_acts_lost }}
79
                <ul>
80
                  <li>Dossiers concernés : {{ len_patient_with_lost_acts }}</li>
81
        <!--          <li>Quota des actes pris en charge dépassé : 2</li>-->
82
        <!--          <li>Prises en charge expirées : 2</li>-->
83
        <!--          <li>Pas de prise en charge : 1</li>-->
84
                </ul>
85
              </li>
86
            {% else %}
87
              <li>Pas d'actes facturables mais non pris en charge.</li>
88
            {% endif %}
89
        </ul>
90
        {% else %}
91
        <ul>
92
            {% if len_acts_invoiced %}
93
              <li>Actes facturés: {{ len_acts_invoiced }}
94
                <ul>
95
                  <li>Dossiers concernés : {{ len_patients }}</li>
96
                  <li>Nombre de factures : {{ len_invoices }}</li>
97
                </ul>
98
              </li>
99
            {% else %}
100
              <li>Pas d'actes facturés pour cette facturation.</li>
101
            {% endif %}
102
        </ul>
103
      {% endif %}
104
    {% endif %}
105
    </div>
106
{% endblock %}
107

    
108
{% block dialogs %}
109
<div id="close-dialog" title="Clôture">
110
  <div id="close-dialog-content">
111
  </div>
112
  <form method="post" action="clore/">
113
    {% csrf_token %}
114
    <input type="hidden" name="Close" value="1">
115
  </form>
116
</div>
117

    
118
<div id="validate-dialog" title="Validation de la facturation">
119
  <div id="validate-dialog-content">
120
  </div>
121
  <form method="post" action="validate/">
122
    {% csrf_token %}
123
    <input type="hidden" name="Valider" value="1">
124
  </form>
125
</div>
126
{% endblock %}
127

    
128
{% block page-end %}
129
<script>
130
  $('#close-dialog').dialog({
131
    autoOpen: false,
132
    modal: true,
133
    buttons: {
134
      "Valider": function () { $('#close-dialog form').submit(); },
135
      "Annuler": function () { $(this).dialog("close"); },
136
    },
137
  });
138
    $('#close').click(function () {
139
        $('#close-dialog-content').load('clore/',
140
              function () {
141
                $('#close-dialog').dialog('open');
142
              }
143
            );
144
      });
145
  $('#validate-dialog').dialog({
146
    autoOpen: false,
147
    modal: true,
148
    buttons: {
149
      "Valider": function () { $('#validate-dialog form').submit(); },
150
      "Annuler": function () { $(this).dialog("validate"); },
151
    },
152
  });
153
    $('#validate').click(function () {
154
        $('#close-dialog-content').load('validate/',
155
              function () {
156
                $('#validate-dialog').dialog('open');
157
              }
158
            );
159
      });
160
</script>
161
{% endblock %}
(3-3/8)