source: WAeUP_SRP/trunk/skins/waeup_futminna/getSchoolFee.py @ 16589

Last change on this file since 16589 was 7132, checked in by Henrik Bettermann, 13 years ago

minor

File size: 1.7 KB
Line 
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"""
12return SchoolFee
13"""
14
15late_registration_fee = 0
16
17d = {}
18d['lrf'] = late_registration_fee
19
20if 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
54else:
55    d['all'] = 0
56
57
58next_info = context.getNextInfo(brain)
59next_session_str = next_info['next_session_str']
60d['next_session_id'] = next_info['next_session_id']
61d['description'] = "School Fee for Session %s" % next_session_str
62
63return d
64
Note: See TracBrowser for help on using the repository browser.