Project

General

Profile

« Previous | Next » 

Revision 52829527

Added by Mikaël Ates over 11 years ago

actes: Allow to rebill a single act if it was billed with the old system.

View differences:

calebasse/actes/templates/actes/act_listing.html
8 8
  $(function() {
9 9
    $('table#actes tr').click(function() {
10 10
        if ($(this).data('isbilled') == "False") {
11
        generic_ajaxform_dialog($(this).data('id') + '/update', "Modifier l'acte",
11
            generic_ajaxform_dialog($(this).data('id') + '/update', "Modifier l'acte",
12 12
            '#acte-dlg', '700px', 'Enregistrer', '..');
13
        } else if ($(this).data('oldbilled') == "True") {
14
            generic_ajaxform_dialog($(this).data('id') + '/rebill', "Refacturer cet acte de l'ancienne facturation) ?",
15
            '#acte-dlg', '700px', 'Refacturer', '..');
13 16
        } else {
14
            alert('Vous ne pouvez pas éditer un acte déjà facturé')
17
            alert('Vous ne pouvez pas éditer un acte déjà facturé.');
15 18
        }
16 19
    });
17 20
    $('.date').datepicker();
......
92 95
    <tbody>
93 96
      {% for act in object_list %}
94 97
      <tr data-id="{{ act.id }}" data-isbilled="{{ act.is_billed }}"
95
      {% if not act.is_billed %}class="non-factu"{% endif %}>
98
      {% if not act.is_billed %}class="non-factu"{% else %}{% if not act.invoice_set.all.0.number %}data-oldbilled="True"{% endif %}{% endif %}>
96 99
        <td>1
97 100
            {{ act.patient.id }}
98 101
            {{ act.patient.first_name }}
......
100 103
        </td>
101 104
        <td>{{ act.get_state }}</td>
102 105
        <td>({{ act.act_type.id }}) {{ act.act_type }}</td>
103
        <td>{% if act.invoice_set.all %}{{ act.invoice_set.all.0.number }}{% endif %}</td>
106
        <td>{% if act.is_billed %}{% if act.invoice_set.all %}{{ act.invoice_set.all.0.number }}{% else %}Ancienne facturation{% endif %}{% endif %}</td>
104 107
        <td>{{ act.is_billable|yesno:"Oui,Non," }}{% if act.switch_billable %} (I){% endif %}</td>
105 108
        <td>{{ act.is_lost|yesno:"Oui,Non," }}</td>
106 109
        <td>{{ act.pause|yesno:"Oui,Non," }}</td>

Also available in: Unified diff