Changeset 9388


Ignore:
Timestamp:
22 Oct 2012, 14:43:41 (12 years ago)
Author:
Henrik Bettermann
Message:

Belongs to last revision.

Location:
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py

    r9347 r9388  
    198198        self.assertEqual(payment.p_level, 100)
    199199        self.assertEqual(payment.p_session, 2004)
    200         self.assertEqual(payment.amount_auth, 12495.0)
     200        self.assertEqual(payment.amount_auth, 60980.0)
    201201        self.assertEqual(payment.p_item, u'CERT1')
    202202        self.assertEqual(error, None)
     
    206206        self.assertEqual(payment.p_level, 200)
    207207        self.assertEqual(payment.p_session, 2005)
    208         self.assertEqual(payment.amount_auth, 11545.0)
     208        self.assertEqual(payment.amount_auth, 60980.0)
    209209        self.assertEqual(payment.p_item, u'CERT1')
    210210        self.assertEqual(error, None)
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/utils.py

    r9370 r9388  
    9797                return _('Study course data are incomplete.'), None
    9898
    99             # Very special school fee configuration, should be moved to
    100             # a seperate file.
    10199
    102             ARTS = ('CRS','ISS','HIS','MUS','ECO','GEO','POL','SOS','CCA','ECU',
    103                     'THA','GED','GSE','PES','SPC','ENG','FRE','ARB','HAU','IGB',
    104                     'YOR','NCRS','NISS','NHIS','NMUS','NECO','NGEO','NPOL',
    105                     'NCCA','NECU','NTHA','NGED','NGSE','NPES','NSPC','NENG',
    106                     'NFRE','NARB','NHAU','NIGB','NYOR','NSOS')
    107 
    108             #PDE Students
    109             if student.current_mode == 'pd_ft':
    110                 amount = 35000
    111             elif not student.current_mode.endswith('_sw'):
    112                 # PRENCE
    113                 if student.current_level == 10 and student.state == CLEARED:
    114                     if student.depcode in ARTS:
    115                         amount = 14900
    116                     else:
    117                         amount = 15400
    118                 # NCE I fresh
    119                 elif student.current_level == 100 and student.state == CLEARED:
    120                     if student.depcode in ARTS:
    121                         amount = 12020
    122                     else:
    123                         amount = 12495
    124                 # NCE II
    125                 elif student.current_level in (100, 110, 120) and \
    126                     student.state == RETURNING:
    127                     if student.depcode in ARTS:
    128                         amount = 11070
    129                     else:
    130                         amount = 11545
    131                 # NCE III
    132                 elif student.current_level in (200, 210, 220):
    133                     if student.depcode in ARTS:
    134                         amount = 11070
    135                     else:
    136                         amount = 11545
    137                 # NCE III repeater
    138                 elif student.current_level in (300, 310, 320) and \
    139                     student.current_verdict == 'O':
    140                     if student.depcode in ARTS:
    141                         amount = 6535
    142                     else:
    143                         amount = 6773
    144                 # NCE III spillover
    145                 elif student.current_level in (300, 310, 320) and \
    146                     student.current_verdict == 'B':
    147                     if student.depcode in ARTS:
    148                         amount = 9170
    149                     else:
    150                         amount = 9645
    151                 # NCE III second spillover
    152                 elif student.current_level in (400, 410, 420) and \
    153                     student.current_verdict == 'B':
    154                     if student.depcode in ARTS:
    155                         amount = 9170
    156                     else:
    157                         amount = 9645
    158             else:
    159                 if student.current_level == 100 and student.state == CLEARED:
    160                     if student.depcode in ARTS:
    161                         amount = 21900
    162                     else:
    163                         amount = 22400
    164                 # NCE II
    165                 elif student.current_level in (100, 110, 120) and \
    166                     student.state == RETURNING:
    167                     if student.depcode in ARTS:
    168                         amount = 18400
    169                     else:
    170                         amount = 18900
    171                 # NCE III
    172                 elif student.current_level in (200, 210, 220):
    173                     if student.depcode in ARTS:
    174                         amount = 20400
    175                     else:
    176                         amount = 20900
    177                 # NCE IV
    178                 elif student.current_level in (300, 310, 320):
    179                     if student.depcode in ARTS:
    180                         amount = 18400
    181                     else:
    182                         amount = 18900
    183                 # NCE V
    184                 elif student.current_level in (400, 410, 420):
    185                     if student.depcode in ARTS:
    186                         amount = 18400
    187                     else:
    188                         amount = 18900
    189                 # NCE V spillover
    190                 elif student.current_level in (500, 510, 520) and \
    191                     student.current_verdict == 'B':
    192                     if student.depcode in ARTS:
    193                         amount = 16900
    194                     else:
    195                         amount = 17400
    196                 # NCE V second spillover
    197                 elif student.current_level in (600, 610, 620) and \
    198                     student.current_verdict == 'B':
    199                     if student.depcode in ARTS:
    200                         amount = 16900
    201                     else:
    202                         amount = 17400
    203100            if student.state == RETURNING:
    204101                p_session, p_level = self.getReturningData(student)
    205102
    206103
    207             amount = 0.0
     104            if student.state in (RETURNING, CLEARED):
     105                amount = 60980.00
    208106
    209107        if amount in (0.0, None):
Note: See TracChangeset for help on using the changeset viewer.