|
{% extends "facturation/base.html" %}
|
|
{% load url from future %}
|
|
|
|
{% block appbar %}
|
|
<h2>
|
|
|
|
{% if service_name == "CMPP" %}
|
|
Facturation {{ invoicing.seq_id }}
|
|
{% if invoicing.status == "open" %}
|
|
ouverte et ayant débuté le {{ invoicing.start_date }}
|
|
{% else %}
|
|
{% if invoicing.status == "closed" %}
|
|
fermée
|
|
{% else %}
|
|
validée
|
|
{% endif %}
|
|
couvrant la période du {{ invoicing.start_date }} au {{ invoicing.end_date }}
|
|
{% endif %}
|
|
{% else %}
|
|
Décompte {{ invoicing.seq_id }}
|
|
{% if invoicing.status == "validated" %}
|
|
validé
|
|
{% endif %}
|
|
pour le trimestre allant du {{ invoicing.start_date }} au {{ invoicing.end_date }}
|
|
{% endif %}</h2>
|
|
<a href="..">Retourner à la liste</a>
|
|
{% if service_name == "CMPP" %}
|
|
{% if invoicing.status == "open" %}<button id="close"">Clôre cette facturation</button>{% endif %}
|
|
{% if invoicing.status == "closed" %}<button id="validate"">Valider cette facturation</button>{% endif %}
|
|
{% if invoicing.status == "validated" %}
|
|
<button id="teletrans-btn" style="display: none;">Télétransmission à l'assurance maladie</button>
|
|
<button id="expcompt-btn" style="display: none;">Export comptabilité</button>
|
|
{% endif %}
|
|
{% else %}
|
|
{% if invoicing.status == "closed" %}<button id="validate" style="display: none;">Valider ce décompte</button>{% endif %}
|
|
{% if invoicing.status == "validated" %}<button id="print-btn" style="display: none;">Imprimer</button>{% endif %}
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<div id="facturation-contents">
|
|
{% if days_not_locked %}
|
|
<h3>Jours non vérouillés</h3>
|
|
<ul>
|
|
{% for day in days_not_locked %}
|
|
<li><a href="../../agenda/{{ day.year }}-{{ day.month }}-{{ day.day }}/validation-des-actes">{{ day.day }}/{{ day.month }}/{{ day.year }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
<h3>Résumé</h3>
|
|
{% if service_name == "CMPP" %}
|
|
{% if invoicing.status == "open" or invoicing.status == "closed" %}
|
|
<ul>
|
|
{% if len_acts_invoiced_hors_pause %}
|
|
<li>Actes facturables hors dossiers en pause: {{ len_acts_invoiced_hors_pause }}
|
|
<ul>
|
|
<li>Dossiers concernés : {{ len_patient_invoiced_hors_pause }}</li>
|
|
<li>Nombre de factures : {{ len_invoices_hors_pause }}</li>
|
|
</ul>
|
|
</li>
|
|
{% else %}
|
|
<li>Pas d'actes facturables pour les dossiers hors pause.</li>
|
|
{% endif %}
|
|
|
|
{% if len_acts_invoiced_pause %}
|
|
<li>Actes facturables des dossiers en pause: {{ len_acts_invoiced_pause }}
|
|
<ul>
|
|
<li>Dossiers concernés : {{ len_patient_invoiced_pause }}</li>
|
|
<li>Nombre de factures : {{ len_invoices_pause }}</li>
|
|
</ul>
|
|
</li>
|
|
{% else %}
|
|
<li>Pas d'actes facturables pour les dossiers en pause.</li>
|
|
{% endif %}
|
|
|
|
{% if len_acts_lost %}
|
|
<li>Actes facturables mais non pris en charge: {{ len_acts_lost }}
|
|
<ul>
|
|
<li>Dossiers concernés : {{ len_patient_with_lost_acts }}</li>
|
|
<!-- <li>Quota des actes pris en charge dépassé : 2</li>-->
|
|
<!-- <li>Prises en charge expirées : 2</li>-->
|
|
<!-- <li>Pas de prise en charge : 1</li>-->
|
|
</ul>
|
|
</li>
|
|
{% else %}
|
|
<li>Pas d'actes facturables mais non pris en charge.</li>
|
|
{% endif %}
|
|
</ul>
|
|
{% else %}
|
|
<ul>
|
|
{% if len_acts_invoiced %}
|
|
<li>Actes facturés: {{ len_acts_invoiced }}
|
|
<ul>
|
|
<li>Dossiers concernés : {{ len_patient_invoiced }}</li>
|
|
<li>Nombre de factures : {{ len_invoices }}</li>
|
|
</ul>
|
|
</li>
|
|
{% else %}
|
|
<li>Pas d'actes facturés pour cette facturation.</li>
|
|
{% endif %}
|
|
</ul>
|
|
{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block dialogs %}
|
|
<div id="close-dialog" title="Clôture">
|
|
<div id="close-dialog-content">
|
|
</div>
|
|
<form method="post" action="clore/">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="Close" value="1">
|
|
</form>
|
|
</div>
|
|
|
|
<div id="validate-dialog" title="Validation de la facturation">
|
|
<div id="validate-dialog-content">
|
|
</div>
|
|
<form method="post" action="validate/">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="Valider" value="1">
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block page-end %}
|
|
<script>
|
|
$('#close-dialog').dialog({
|
|
autoOpen: false,
|
|
modal: true,
|
|
buttons: {
|
|
"Valider": function () { $('#close-dialog form').submit(); },
|
|
"Annuler": function () { $(this).dialog("close"); },
|
|
},
|
|
});
|
|
$('#close').click(function () {
|
|
$('#close-dialog-content').load('clore/',
|
|
function () {
|
|
$('#close-dialog').dialog('open');
|
|
}
|
|
);
|
|
});
|
|
$('#validate-dialog').dialog({
|
|
autoOpen: false,
|
|
modal: true,
|
|
buttons: {
|
|
"Valider": function () { $('#validate-dialog form').submit(); },
|
|
"Annuler": function () { $(this).dialog("validate"); },
|
|
},
|
|
});
|
|
$('#validate').click(function () {
|
|
$('#close-dialog-content').load('validate/',
|
|
function () {
|
|
$('#validate-dialog').dialog('open');
|
|
}
|
|
);
|
|
});
|
|
</script>
|
|
{% endblock %}
|