Rev | Line | |
---|
[3780] | 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 | |
---|
| 16 | d = {} |
---|
| 17 | |
---|
| 18 | if brain.mode.endswith('_ft'): |
---|
| 19 | # fresh remedial |
---|
| 20 | if str(brain.level) == '000' and brain.review_state == 'cleared_and_validated': |
---|
[3846] | 21 | if brain.entry_mode in ('rm_ft'): |
---|
[3825] | 22 | d['all'] = 74200 |
---|
| 23 | else: |
---|
| 24 | d['all'] = 80200 |
---|
[3780] | 25 | # fresh |
---|
[3800] | 26 | elif brain.review_state == 'cleared_and_validated': |
---|
[3780] | 27 | if brain.lga == 'foreigner': |
---|
[3836] | 28 | d['all'] = 131500 + 5000 |
---|
[3780] | 29 | else: |
---|
[3836] | 30 | d['all'] = 41500 + 5000 |
---|
[3780] | 31 | # returning |
---|
| 32 | elif brain.review_state == 'returning': |
---|
| 33 | if brain.lga == 'foreigner': |
---|
| 34 | d['all'] = 109500 |
---|
| 35 | else: |
---|
[3836] | 36 | d['all'] = 19500 + 5000 |
---|
[3780] | 37 | else: |
---|
| 38 | d['all'] = 0 |
---|
| 39 | else: |
---|
| 40 | d['all'] = 0 |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | next_info = context.getNextInfo(brain) |
---|
| 44 | next_session_str = next_info['next_session_str'] |
---|
| 45 | d['next_session_id'] = next_info['next_session_id'] |
---|
| 46 | d['description'] = "School Fee for Session %s" % next_session_str |
---|
| 47 | |
---|
| 48 | return d |
---|
| 49 | |
---|
Note: See
TracBrowser for help on using the repository browser.