[7279] | 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,instalment='0' |
---|
| 8 | ##title= |
---|
| 9 | ## |
---|
| 10 | # $Id: getSchoolFee.py 2534 2007-11-05 06:37:12Z henrik $ |
---|
| 11 | """ |
---|
| 12 | return SchoolFee |
---|
| 13 | """ |
---|
| 14 | |
---|
| 15 | d = {} |
---|
| 16 | d['all'] = 0 |
---|
| 17 | |
---|
[7885] | 18 | MPA = ('MPAPT','MEMPT','MMPPT') |
---|
[7279] | 19 | i2_states = ('school_fee_paid','courses_registered','courses_validated',) |
---|
| 20 | |
---|
| 21 | if brain.mode == 'ug_sw': # ug_sw students payment does not depend on the current session |
---|
[7885] | 22 | if str(brain.level) in ('100','200',) and brain.review_state == 'cleared_and_validated': |
---|
[7279] | 23 | d['all'] = 45000 |
---|
| 24 | elif str(brain.level) in ('100',): #200 returning students |
---|
| 25 | d['all'] = 35000 |
---|
| 26 | else: |
---|
| 27 | d['all'] = 35000 |
---|
| 28 | elif brain.mode == 'pg_sw': |
---|
[7885] | 29 | if str(brain.level) == '600' and brain.review_state == 'cleared_and_validated': # only 600 fresh |
---|
[7279] | 30 | d['all'] = 65000 |
---|
[7885] | 31 | else: |
---|
[7279] | 32 | d['all'] = 80000 |
---|
[7885] | 33 | elif brain.session in ('06','07',) and brain.review_state == 'cleared_and_validated': |
---|
[7279] | 34 | if brain.mode == 'dp_pt' and str(brain.level) in ('100',): |
---|
| 35 | d['all'] = 40000 |
---|
| 36 | elif brain.mode == 'ug_pt' and str(brain.level) in ('100','200',): |
---|
| 37 | d['all'] = 50000 |
---|
| 38 | elif brain.mode == 'pg_pt': |
---|
[7885] | 39 | if str(brain.level) == '600': # only 600 fresh |
---|
[7279] | 40 | d['all'] = 60000 |
---|
[7885] | 41 | if str(brain.level) == '700': # only 700 fresh |
---|
[7279] | 42 | d['all'] = 75000 |
---|
[7885] | 43 | elif brain.session in ('06',) and brain.review_state == 'returning': |
---|
[7279] | 44 | if brain.mode == 'dp_pt': |
---|
| 45 | d['all'] = 35000 |
---|
| 46 | elif brain.mode == 'ug_pt': |
---|
| 47 | d['all'] = 45000 |
---|
| 48 | elif brain.mode == 'pg_pt': |
---|
| 49 | if str(brain.level) == '600' and brain.verdict == 'C': # 600 repeaters |
---|
| 50 | d['all'] = 55000 |
---|
| 51 | elif str(brain.level) == '600': # going to register for 700 |
---|
| 52 | d['all'] = 75000 |
---|
| 53 | else: |
---|
| 54 | d['all'] = 65000 |
---|
[7885] | 55 | |
---|
[7279] | 56 | elif brain.session in ('07','08','09','10'): |
---|
| 57 | if brain.mode == 'dp_pt': |
---|
| 58 | if brain.review_state == 'cleared_and_validated' and str(brain.level) in ('100',) and instalment == '1': |
---|
| 59 | d['all'] = 35000 |
---|
| 60 | elif brain.review_state in i2_states and str(brain.level) in ('100',) and instalment == '2': |
---|
| 61 | d['all'] = 20000 |
---|
| 62 | elif brain.review_state == 'returning' and instalment == '1': |
---|
[7885] | 63 | d['all'] = 30000 |
---|
[7279] | 64 | elif brain.review_state in i2_states and instalment == '2': |
---|
[7885] | 65 | d['all'] = 20000 |
---|
[7279] | 66 | if brain.mode == 'ug_pt': |
---|
| 67 | if brain.review_state == 'cleared_and_validated' and str(brain.level) in ('100','200') and instalment == '1': |
---|
| 68 | d['all'] = 45000 |
---|
| 69 | elif brain.review_state in i2_states and instalment == '2': # 2nd instalment applies to both 200 de fresh and 200 returning |
---|
| 70 | d['all'] = 25000 |
---|
| 71 | elif brain.review_state == 'returning' and instalment == '1' and brain.entry_session in ('05','06','07',): |
---|
| 72 | d['all'] = 20000 |
---|
| 73 | elif brain.review_state == 'returning' and instalment == '1': |
---|
| 74 | d['all'] = 40000 |
---|
| 75 | if brain.mode == 'pg_pt': |
---|
| 76 | # 600 level students (no returning studentsor repeaters) |
---|
| 77 | if brain.review_state == 'cleared_and_validated' and str(brain.level) in ('600',) and instalment == '1': |
---|
| 78 | d['all'] = 65000 |
---|
| 79 | elif brain.review_state in i2_states and str(brain.level) in ('600',) and instalment == '2': |
---|
| 80 | d['all'] = 50000 |
---|
| 81 | # 700 level students, two different certificate groups, 700 level repeaters and 700 level returning students exist |
---|
| 82 | # MPA students |
---|
[7885] | 83 | elif brain.review_state == 'cleared_and_validated' and str(brain.level) in ('700',) and instalment == '1' and brain.course in MPA: |
---|
[7279] | 84 | d['all'] = 85000 |
---|
[7885] | 85 | elif brain.review_state in i2_states and str(brain.level) in ('700',) and instalment == '2' and brain.course in MPA: |
---|
[7279] | 86 | d['all'] = 80000 |
---|
| 87 | # non-MPA students |
---|
[7885] | 88 | elif brain.review_state == 'cleared_and_validated' and str(brain.level) in ('700',) and instalment == '1': |
---|
[7279] | 89 | d['all'] = 100000 |
---|
| 90 | elif brain.review_state in i2_states and str(brain.level) in ('700',) and instalment == '2': |
---|
| 91 | d['all'] = 80000 |
---|
| 92 | # 700 level returning students MPA and non-MPA with entry session 05 or 06 |
---|
| 93 | elif brain.review_state == 'returning' and instalment == '1' and brain.entry_session in ('05','06','07',): # returning 700 to 800 level |
---|
| 94 | d['all'] = 35000 |
---|
| 95 | elif brain.review_state in i2_states and instalment == '2' and brain.entry_session in ('05','06','07',): |
---|
| 96 | d['all'] = 30000 |
---|
| 97 | # 700 level returning students MPA |
---|
| 98 | elif brain.review_state == 'returning' and instalment == '1' and brain.course in MPA: |
---|
| 99 | d['all'] = 80000 |
---|
| 100 | elif brain.review_state in i2_states and instalment == '2' and brain.course in MPA: |
---|
| 101 | d['all'] = 75000 |
---|
| 102 | # 700 level returning students non-MPA |
---|
| 103 | elif brain.review_state == 'returning' and instalment == '1': |
---|
| 104 | d['all'] = 95000 |
---|
| 105 | elif brain.review_state in i2_states and instalment == '2': |
---|
| 106 | d['all'] = 75000 |
---|
[7885] | 107 | |
---|
[7279] | 108 | |
---|
| 109 | next_info = context.getNextInfo(brain) |
---|
| 110 | next_session_str = next_info['next_session_str'] |
---|
| 111 | d['next_session_id'] = next_info['next_session_id'] |
---|
| 112 | d['description'] = "School Fee for Session %s" % next_session_str |
---|
| 113 | |
---|
| 114 | return d |
---|
[7885] | 115 | |
---|