Project

General

Profile

« Previous | Next » 

Revision 0fc05fe3

Added by Mikaël Ates over 11 years ago

dossiers: Add field used for temporary setting appart patients form invoicing.

View differences:

calebasse/dossiers/models.py
212 212
            null=True, blank=True, default=None)
213 213
    comment = models.TextField(verbose_name=u"Commentaire",
214 214
            null=True, blank=True, default=None)
215
    pause = models.BooleanField(verbose_name=u"Pause facturation",
216
        default=False)
215 217

  
216 218
    # Physiology
217 219
    size = models.IntegerField(verbose_name=u"Taille (cm)",
......
334 336

  
335 337
        """
336 338
        acts = self.act_set.order_by('date')
337
        hcs = self.healthcare_set.order_by('-start_date')
339
        hcs = CmppHealthCareDiagnostic.objects.filter(patient=self).\
340
            order_by('-start_date')
338 341
        if not hcs:
339 342
            # Pas de prise en charge, on recherche l'acte facturable le plus
340 343
            # ancien, on crée une pc diag à la même date.
......
371 374
                services.values_list('name', flat=True)
372 375
        cmpp = Service.objects.get(name='CMPP')
373 376
        for act in acts:
374
            if are_all_acts_of_the_day_locked(act.date) and \
375
                    act.is_state('VALIDE') and act.is_billable():
377
            if act.is_state('VALIDE') and act.is_billable() and \
378
                    are_all_acts_of_the_day_locked(act.date):
376 379
                cared, hc = act.is_act_covered_by_diagnostic_healthcare()
377 380
                if hc:
378 381
                    if (self.last_state.status.type == "ACCUEIL" \

Also available in: Unified diff