Project

General

Profile

« Previous | Next » 

Revision 2e8e4ab0

Added by Mikaël Ates over 12 years ago

agenda: Look for days with acts not locked only if there are acts not billed.

View differences:

calebasse/agenda/views.py
358 358
        acts = Act.objects.filter(is_billed=False,
359 359
            patient__service=self.service).order_by('date')
360 360
        days = set(acts.values_list('date', flat=True))
361
        max_day, min_day = max(days), min(days)
362
        days &= set(get_days_with_acts_not_locked(min_day, max_day, self.service))
361
        if days:
362
            max_day, min_day = max(days), min(days)
363
            days &= set(get_days_with_acts_not_locked(min_day, max_day, self.service))
363 364
        context['days_not_locked'] = days
364 365
        return context
365 366

  

Also available in: Unified diff