Line | |
---|
1 | ##
|
---|
2 | ## interfaces.py
|
---|
3 | from zope import schema
|
---|
4 | from waeup.sirp.interfaces import IWAeUPObject, academic_sessions_vocab
|
---|
5 |
|
---|
6 | class ISessionConfiguration(IWAeUPObject):
|
---|
7 | """A session configuration object.
|
---|
8 | """
|
---|
9 |
|
---|
10 | academic_session = schema.Choice(
|
---|
11 | title = u'Academic Session',
|
---|
12 | source = academic_sessions_vocab,
|
---|
13 | default = None,
|
---|
14 | required = True,
|
---|
15 | readonly = True
|
---|
16 | )
|
---|
17 |
|
---|
18 | fee_1 = schema.Int(
|
---|
19 | title = u'School Fee',
|
---|
20 | default = 0,
|
---|
21 | )
|
---|
22 |
|
---|
23 | surcharge_1 = schema.Int(
|
---|
24 | title = u'Surcharge BT',
|
---|
25 | default = 0,
|
---|
26 | )
|
---|
27 |
|
---|
28 | surcharge_2 = schema.Int(
|
---|
29 | title = u'Surcharge Interswitch',
|
---|
30 | default = 0,
|
---|
31 | )
|
---|
32 |
|
---|
33 | gown = schema.Int(
|
---|
34 | title = u'Gown Fee',
|
---|
35 | default = 0,
|
---|
36 | )
|
---|
37 |
|
---|
38 | transfer = schema.Int(
|
---|
39 | title = u'Transfer Fee',
|
---|
40 | default = 0,
|
---|
41 | )
|
---|
42 |
|
---|
43 | hostelmaintenance = schema.Int(
|
---|
44 | title = u'Hostel Maintenance Fee',
|
---|
45 | default = 0,
|
---|
46 | )
|
---|
47 |
|
---|
48 | def getSessionString():
|
---|
49 | """Returns the session string from the vocabulary.
|
---|
50 | """
|
---|
51 |
|
---|
52 |
|
---|
53 | class ISessionConfigurationAdd(ISessionConfiguration):
|
---|
54 | """A session configuration object in add mode.
|
---|
55 | """
|
---|
56 |
|
---|
57 | academic_session = schema.Choice(
|
---|
58 | title = u'Academic Session',
|
---|
59 | source = academic_sessions_vocab,
|
---|
60 | default = None,
|
---|
61 | required = True,
|
---|
62 | readonly = False,
|
---|
63 | )
|
---|
64 |
|
---|
65 | ISessionConfigurationAdd['academic_session'].order = ISessionConfiguration[
|
---|
66 | 'academic_session'].order |
---|
Note: See
TracBrowser for help on using the repository browser.