1 | ## $Id: interfaces.py 15645 2019-10-04 21:11:24Z henrik $ |
---|
2 | ## |
---|
3 | ## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann |
---|
4 | ## This program is free software; you can redistribute it and/or modify |
---|
5 | ## it under the terms of the GNU General Public License as published by |
---|
6 | ## the Free Software Foundation; either version 2 of the License, or |
---|
7 | ## (at your option) any later version. |
---|
8 | ## |
---|
9 | ## This program is distributed in the hope that it will be useful, |
---|
10 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | ## GNU General Public License for more details. |
---|
13 | ## |
---|
14 | ## You should have received a copy of the GNU General Public License |
---|
15 | ## along with this program; if not, write to the Free Software |
---|
16 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
17 | ## |
---|
18 | |
---|
19 | import zope.i18nmessageid |
---|
20 | from zope import schema |
---|
21 | from zc.sourcefactory.basic import BasicSourceFactory |
---|
22 | from waeup.kofa.interfaces import (SimpleKofaVocabulary, |
---|
23 | ISessionConfiguration, academic_sessions_vocab) |
---|
24 | |
---|
25 | _ = MessageFactory = zope.i18nmessageid.MessageFactory('kofacustom.iuokada') |
---|
26 | |
---|
27 | class ICustomSessionConfiguration(ISessionConfiguration): |
---|
28 | """A session configuration object. |
---|
29 | """ |
---|
30 | |
---|
31 | # Base fees, do not remove. |
---|
32 | |
---|
33 | clearance_fee = schema.Float( |
---|
34 | title = _(u'Acceptance Fee'), |
---|
35 | default = 0.0, |
---|
36 | required = False, |
---|
37 | ) |
---|
38 | |
---|
39 | booking_fee = schema.Float( |
---|
40 | title = _(u'Bed Booking Fee'), |
---|
41 | default = 0.0, |
---|
42 | required = False, |
---|
43 | ) |
---|
44 | |
---|
45 | maint_fee = schema.Float( |
---|
46 | title = _(u'Rent (fallback)'), |
---|
47 | default = 0.0, |
---|
48 | required = False, |
---|
49 | ) |
---|
50 | |
---|
51 | late_registration_fee = schema.Float( |
---|
52 | title = _(u'Late Course Reg. Fee'), |
---|
53 | default = 0.0, |
---|
54 | required = False, |
---|
55 | ) |
---|
56 | |
---|
57 | transcript_fee = schema.Float( |
---|
58 | title = _(u'Transcript Fee'), |
---|
59 | default = 0.0, |
---|
60 | required = False, |
---|
61 | ) |
---|
62 | |
---|
63 | transfer_fee = schema.Float( |
---|
64 | title = _(u'Transfer Fee'), |
---|
65 | default = 0.0, |
---|
66 | required = False, |
---|
67 | ) |
---|
68 | |
---|
69 | interswitch_enabled = schema.Bool( |
---|
70 | title = _(u'Interswitch integration enabled'), |
---|
71 | default = False, |
---|
72 | ) |
---|
73 | |
---|
74 | etranzact_enabled = schema.Bool( |
---|
75 | title = _(u'eTranzact integration enabled'), |
---|
76 | default = False, |
---|
77 | ) |
---|
78 | |
---|
79 | # Additional fees in custom package add here |
---|
80 | |
---|
81 | late_registration_fee = schema.Float( |
---|
82 | title = _(u'Late Registration Fee'), |
---|
83 | default = 0.0, |
---|
84 | required = False, |
---|
85 | ) |
---|
86 | |
---|
87 | science_fee = schema.Float( |
---|
88 | title = _(u'Science Bench Fee'), |
---|
89 | default = 0.0, |
---|
90 | required = False, |
---|
91 | ) |
---|
92 | |
---|
93 | clinical_fee = schema.Float( |
---|
94 | title = _(u'Clinical Fee (Medical Students)'), |
---|
95 | default = 0.0, |
---|
96 | required = False, |
---|
97 | ) |
---|
98 | |
---|
99 | develop_fee = schema.Float( |
---|
100 | title = _(u'Development Fee'), |
---|
101 | default = 0.0, |
---|
102 | required = False, |
---|
103 | ) |
---|
104 | |
---|
105 | municipal_fee = schema.Float( |
---|
106 | title = _(u'Municipal Fee'), |
---|
107 | default = 0.0, |
---|
108 | required = False, |
---|
109 | ) |
---|
110 | |
---|
111 | alumni_fee = schema.Float( |
---|
112 | title = _(u'Alumni Fee'), |
---|
113 | default = 0.0, |
---|
114 | required = False, |
---|
115 | ) |
---|
116 | |
---|
117 | conv_fee = schema.Float( |
---|
118 | title = _(u'Convocation Fee'), |
---|
119 | default = 0.0, |
---|
120 | required = False, |
---|
121 | ) |
---|
122 | |
---|
123 | matric_fee = schema.Float( |
---|
124 | title = _(u'Matriculation Fee'), |
---|
125 | default = 0.0, |
---|
126 | required = False, |
---|
127 | ) |
---|
128 | |
---|
129 | waecneco_fee = schema.Float( |
---|
130 | title = _(u'WAEC & NECO Verification Fee'), |
---|
131 | default = 0.0, |
---|
132 | required = False, |
---|
133 | ) |
---|
134 | |
---|
135 | jambver_fee = schema.Float( |
---|
136 | title = _(u'JAMB Verification Fee'), |
---|
137 | default = 0.0, |
---|
138 | required = False, |
---|
139 | ) |
---|
140 | |
---|
141 | book_fee = schema.Float( |
---|
142 | title = _(u'Book Deposit'), |
---|
143 | default = 0.0, |
---|
144 | required = False, |
---|
145 | ) |
---|
146 | |
---|
147 | parentsconsult_fee = schema.Float( |
---|
148 | title = _(u'Parents Consultative Forum (PCF) Fee'), |
---|
149 | default = 0.0, |
---|
150 | required = False, |
---|
151 | ) |
---|
152 | |
---|
153 | pharmlab_fee = schema.Float( |
---|
154 | title = _(u'Pharmacy Lab Support Fee'), |
---|
155 | default = 0.0, |
---|
156 | required = False, |
---|
157 | ) |
---|
158 | |
---|
159 | def getSessionString(): |
---|
160 | """Returns the session string from the vocabulary. |
---|
161 | """ |
---|
162 | |
---|
163 | |
---|
164 | class ICustomSessionConfigurationAdd(ICustomSessionConfiguration): |
---|
165 | """A session configuration object in add mode. |
---|
166 | """ |
---|
167 | |
---|
168 | academic_session = schema.Choice( |
---|
169 | title = _(u'Academic Session'), |
---|
170 | source = academic_sessions_vocab, |
---|
171 | default = None, |
---|
172 | required = True, |
---|
173 | readonly = False, |
---|
174 | ) |
---|
175 | |
---|
176 | ICustomSessionConfigurationAdd[ |
---|
177 | 'academic_session'].order = ICustomSessionConfiguration[ |
---|
178 | 'academic_session'].order |
---|