source: WAeUP_SRP/trunk/skins/waeup_uniben/getSchoolFee.py @ 16250

Last change on this file since 16250 was 8768, checked in by Henrik Bettermann, 12 years ago

Add 3000 Nairas in final year for gown.

  • Property svn:keywords set to Id
File size: 1.0 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 8768 2012-06-20 13:17:52Z henrik $
11"""
12return SchoolFee
13"""
14
15#all_fees = context.uniben_school_fees()
16
17#import csv
18#from Globals import INSTANCE_HOME
19#fees_path = "%s/import/school_fees.csv" % (INSTANCE_HOME)
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
24wtool = context.waeup_tool
25try:
26    all_fees = wtool.getSchoolFees()
27except:
28    return None
29next_info = context.getNextInfo(brain)
30next_session_str = next_info['next_session_str']
31description = "School Fee for Session %s" % next_session_str
32
33d = {}
34
35if all_fees.has_key(brain.course):
36    d = all_fees[brain.course]
37    d['description'] = "%s (%s)" % (description,brain.course)
38else:
39    return None
40
41d['next_session_id'] = next_info['next_session_id']
42d['next_level_id'] = next_info['next_level_id']
43                                                   
44return d
45
46
47
Note: See TracBrowser for help on using the repository browser.