Last change
on this file since 17328 was
8768,
checked in by Henrik Bettermann, 13 years ago
|
Add 3000 Nairas in final year for gown.
|
-
Property svn:keywords set to
Id
|
File size:
1.0 KB
|
Rev | Line | |
---|
[7901] | 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 8768 2012-06-20 13:17:52Z henrik $ |
---|
| 11 | """ |
---|
| 12 | return SchoolFee |
---|
| 13 | """ |
---|
| 14 | |
---|
[8297] | 15 | #all_fees = context.uniben_school_fees() |
---|
[7901] | 16 | |
---|
| 17 | #import csv |
---|
| 18 | #from Globals import INSTANCE_HOME |
---|
[8297] | 19 | #fees_path = "%s/import/school_fees.csv" % (INSTANCE_HOME) |
---|
[7901] | 20 | #reader = csv.DictReader(open(fees_path, 'r')) |
---|
| 21 | #lst = [i for i in reader] |
---|
| 22 | #all_fees = dict([(i['payment_item'],i) for i in lst]) |
---|
| 23 | |
---|
[8297] | 24 | wtool = context.waeup_tool |
---|
| 25 | try: |
---|
| 26 | all_fees = wtool.getSchoolFees() |
---|
| 27 | except: |
---|
| 28 | return None |
---|
[7901] | 29 | next_info = context.getNextInfo(brain) |
---|
| 30 | next_session_str = next_info['next_session_str'] |
---|
[8279] | 31 | description = "School Fee for Session %s" % next_session_str |
---|
[7901] | 32 | |
---|
[8279] | 33 | d = {} |
---|
[7901] | 34 | |
---|
| 35 | if all_fees.has_key(brain.course): |
---|
| 36 | d = all_fees[brain.course] |
---|
| 37 | d['description'] = "%s (%s)" % (description,brain.course) |
---|
[8028] | 38 | else: |
---|
| 39 | return None |
---|
[8768] | 40 | |
---|
[7901] | 41 | d['next_session_id'] = next_info['next_session_id'] |
---|
[8768] | 42 | d['next_level_id'] = next_info['next_level_id'] |
---|
[8279] | 43 | |
---|
[7901] | 44 | return d |
---|
| 45 | |
---|
[8279] | 46 | |
---|
| 47 | |
---|
Note: See
TracBrowser for help on using the repository browser.