Project

General

Profile

« Previous | Next » 

Revision 523c5aaf

Added by Mikaël Ates almost 11 years ago

facturation: rename CMPP billing functions.

View differences:

calebasse/dossiers/views.py
30 30
from calebasse.dossiers.states import STATES_MAPPING, STATE_CHOICES_TYPE, STATES_BTN_MAPPER
31 31
from calebasse.ressources.models import (Service,
32 32
    SocialisationDuration, MDPHRequest, MDPHResponse)
33
from calebasse.facturation.list_acts import list_acts_for_billing_CMPP_2_per_patient
33
from calebasse.facturation.list_acts import list_acts_for_billing_CMPP_per_patient
34 34

  
35 35
from calebasse.decorators import validator_only
36 36

  
......
387 387
                        STATES_BTN_MAPPER['ACCUEIL']]
388 388
            (acts_not_locked, days_not_locked, acts_not_valide,
389 389
            acts_not_billable, acts_pause, acts_per_hc, acts_losts) = \
390
                list_acts_for_billing_CMPP_2_per_patient(self.object,
390
                list_acts_for_billing_CMPP_per_patient(self.object,
391 391
                    datetime.today(), self.service)
392 392
            ctx['acts_losts'] = acts_losts
393 393
            ctx['acts_pause'] = acts_pause
calebasse/facturation/list_acts.py
206 206
        patients_missing_policy)
207 207

  
208 208

  
209
def list_acts_for_billing_CMPP_2(end_day, service, acts=None):
209
def list_acts_for_billing_CMPP(end_day, service, acts=None):
210 210
    """Used to sort acts billable by specific service requirements.
211 211

  
212 212
    For the CMPP, acts are billable if
......
319 319
        acts_treatment, acts_losts, acts_losts_missing_policy,
320 320
        acts_losts_missing_birthdate)
321 321

  
322
def list_acts_for_billing_CMPP_2_per_patient(patient, end_day, service, acts=None):
322
def list_acts_for_billing_CMPP_per_patient(patient, end_day, service, acts=None):
323 323

  
324 324
    acts_not_locked, days_not_locked, acts_not_valide, \
325 325
        acts_not_billable, acts_pause, acts_billable = \
calebasse/facturation/models.py
210 210
            if not end_date:
211 211
                today = date.today()
212 212
                end_date = date(day=today.day, month=today.month, year=today.year)
213
            return list_acts.list_acts_for_billing_CMPP_2(end_date,
213
            return list_acts.list_acts_for_billing_CMPP(end_date,
214 214
                    service=self.service)
215 215
        elif self.service.name == 'CAMSP':
216 216
            return list_acts.list_acts_for_billing_CAMSP(self.start_date,
calebasse/facturation/tests.py
20 20

  
21 21
from list_acts import (list_acts_for_billing_CAMSP,
22 22
    list_acts_for_billing_SESSAD, list_acts_for_billing_CMPP,
23
    list_acts_for_billing_CMPP_2)
23
    list_acts_for_billing_CMPP)
24 24

  
25 25
from models import PricePerAct, Invoicing
26 26

  
......
254 254
        hct.save()
255 255
        hct.add_prolongation()
256 256

  
257
        billing_cmpp = list_acts_for_billing_CMPP_2(datetime(2020, 11, 30), service_cmpp)
257
        billing_cmpp = list_acts_for_billing_CMPP(datetime(2020, 11, 30), service_cmpp)
258 258

  
259 259
        self.assertEqual(len(billing_cmpp[5][patient_a]), 6)
260 260
        self.assertEqual(len(billing_cmpp[6][patient_a]), 40)

Also available in: Unified diff