1 | ## Script (Python) "getSchoolFee" |
---|
2 | ##bind container=container |
---|
3 | ##bind context=context |
---|
4 | ##bind namespace= |
---|
5 | ##bind script=script |
---|
6 | ##bind subpath=traverse_subpath |
---|
7 | ##parameters=brain=None |
---|
8 | ##title= |
---|
9 | ## |
---|
10 | # $Id: getSchoolFee.py 2534 2007-11-05 06:37:12Z henrik $ |
---|
11 | """ |
---|
12 | return SchoolFee |
---|
13 | """ |
---|
14 | |
---|
15 | late_registration_fee = 0 |
---|
16 | |
---|
17 | d = {} |
---|
18 | d['lrf'] = late_registration_fee |
---|
19 | |
---|
20 | if brain.mode.endswith('_ft'): |
---|
21 | # fresh remedial |
---|
22 | if str(brain.level) == '000' and brain.review_state == 'cleared_and_validated': |
---|
23 | if brain.entry_mode == 'rmd_ft': |
---|
24 | d['lrf'] = late_registration_fee |
---|
25 | d['all'] = 80200 |
---|
26 | else: |
---|
27 | d['lrf'] = late_registration_fee |
---|
28 | d['all'] = 74200 |
---|
29 | |
---|
30 | # fresh |
---|
31 | elif brain.review_state == 'cleared_and_validated': |
---|
32 | if brain.mode == 'jm_ft': |
---|
33 | d['lrf'] = late_registration_fee |
---|
34 | d['all'] = 72700 |
---|
35 | elif brain.lga == 'foreigner': |
---|
36 | d['lrf'] = late_registration_fee |
---|
37 | d['all'] = 131500 |
---|
38 | else: |
---|
39 | d['lrf'] = late_registration_fee |
---|
40 | d['all'] = 37000 # School Fee reduced by 8000 |
---|
41 | # returning |
---|
42 | elif brain.review_state == 'returning': |
---|
43 | if brain.mode == 'jm_ft': |
---|
44 | d['lrf'] = late_registration_fee |
---|
45 | d['all'] = 37000 |
---|
46 | elif brain.lga == 'foreigner': |
---|
47 | d['lrf'] = late_registration_fee |
---|
48 | d['all'] = 109500 |
---|
49 | else: |
---|
50 | d['lrf'] = late_registration_fee |
---|
51 | d['all'] = 20000 |
---|
52 | else: |
---|
53 | d['all'] = 0 |
---|
54 | else: |
---|
55 | d['all'] = 0 |
---|
56 | |
---|
57 | |
---|
58 | next_info = context.getNextInfo(brain) |
---|
59 | next_session_str = next_info['next_session_str'] |
---|
60 | d['next_session_id'] = next_info['next_session_id'] |
---|
61 | d['description'] = "School Fee for Session %s" % next_session_str |
---|
62 | |
---|
63 | return d |
---|
64 | |
---|