1 | ## $Id: interfaces.py 17838 2024-07-10 11:42:40Z 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_local_fee = schema.Float( |
---|
58 | title = _(u'Transcript Fee Local Students'), |
---|
59 | default = 0.0, |
---|
60 | required = False, |
---|
61 | ) |
---|
62 | |
---|
63 | transcript_overseas_fee = schema.Float( |
---|
64 | title = _(u'Transcript Fee Oversea Students'), |
---|
65 | default = 0.0, |
---|
66 | required = False, |
---|
67 | ) |
---|
68 | |
---|
69 | transfer_fee = schema.Float( |
---|
70 | title = _(u'Transfer Fee'), |
---|
71 | default = 0.0, |
---|
72 | required = False, |
---|
73 | ) |
---|
74 | |
---|
75 | interswitch_enabled = schema.Bool( |
---|
76 | title = _(u'Interswitch Collegepay integration enabled'), |
---|
77 | default = True, |
---|
78 | ) |
---|
79 | |
---|
80 | interswitch_paydirect_enabled = schema.Bool( |
---|
81 | title = _(u'Interswitch Paydirect integration enabled'), |
---|
82 | default = True, |
---|
83 | ) |
---|
84 | |
---|
85 | etranzact_webconnect_enabled = schema.Bool( |
---|
86 | title = _(u'Etranzact Webconnect integration enabled'), |
---|
87 | default = False, |
---|
88 | ) |
---|
89 | |
---|
90 | etranzact_payoutlet_enabled = schema.Bool( |
---|
91 | title = _(u'Etranzact Payoutlet integration enabled'), |
---|
92 | default = False, |
---|
93 | ) |
---|
94 | |
---|
95 | etranzact_credo_enabled = schema.Bool( |
---|
96 | title = _(u'Etranzact Credo integration enabled'), |
---|
97 | default = False, |
---|
98 | ) |
---|
99 | |
---|
100 | # Additional fees in custom package add here |
---|
101 | |
---|
102 | grad_clearance_fee = schema.Float( |
---|
103 | title = _(u'Clearance Fee'), |
---|
104 | default = 0.0, |
---|
105 | required = False, |
---|
106 | ) |
---|
107 | |
---|
108 | registration_fee = schema.Float( |
---|
109 | title = _(u'Registration Fee'), |
---|
110 | default = 0.0, |
---|
111 | required = False, |
---|
112 | ) |
---|
113 | |
---|
114 | late_registration_fee = schema.Float( |
---|
115 | title = _(u'Late Registration Fee'), |
---|
116 | default = 0.0, |
---|
117 | required = False, |
---|
118 | ) |
---|
119 | |
---|
120 | science_fee = schema.Float( |
---|
121 | title = _(u'Science Bench Fee'), |
---|
122 | default = 0.0, |
---|
123 | required = False, |
---|
124 | ) |
---|
125 | |
---|
126 | clinical_fee = schema.Float( |
---|
127 | title = _(u'Clinical Fee (Medical Students)'), |
---|
128 | default = 0.0, |
---|
129 | required = False, |
---|
130 | ) |
---|
131 | |
---|
132 | develop_fee = schema.Float( |
---|
133 | title = _(u'Development Fee'), |
---|
134 | default = 0.0, |
---|
135 | required = False, |
---|
136 | ) |
---|
137 | |
---|
138 | municipal_fresh_fee = schema.Float( |
---|
139 | title = _(u'Municipal Fee Fresh Students'), |
---|
140 | default = 0.0, |
---|
141 | required = False, |
---|
142 | ) |
---|
143 | |
---|
144 | municipal_returning_fee = schema.Float( |
---|
145 | title = _(u'Municipal Fee Returning Students'), |
---|
146 | default = 0.0, |
---|
147 | required = False, |
---|
148 | ) |
---|
149 | |
---|
150 | alumni_fee = schema.Float( |
---|
151 | title = _(u'Alumni Fee'), |
---|
152 | default = 0.0, |
---|
153 | required = False, |
---|
154 | ) |
---|
155 | |
---|
156 | conv_fee = schema.Float( |
---|
157 | title = _(u'Convocation Fee'), |
---|
158 | default = 0.0, |
---|
159 | required = False, |
---|
160 | ) |
---|
161 | |
---|
162 | matric_fee = schema.Float( |
---|
163 | title = _(u'Matriculation Fee'), |
---|
164 | default = 0.0, |
---|
165 | required = False, |
---|
166 | ) |
---|
167 | |
---|
168 | waecneco_fee = schema.Float( |
---|
169 | title = _(u'WAEC & NECO Verification Fee'), |
---|
170 | default = 0.0, |
---|
171 | required = False, |
---|
172 | ) |
---|
173 | |
---|
174 | jambver_fee = schema.Float( |
---|
175 | title = _(u'JAMB Verification Fee'), |
---|
176 | default = 0.0, |
---|
177 | required = False, |
---|
178 | ) |
---|
179 | |
---|
180 | book_fee = schema.Float( |
---|
181 | title = _(u'Book Deposit'), |
---|
182 | default = 0.0, |
---|
183 | required = False, |
---|
184 | ) |
---|
185 | |
---|
186 | parentsconsult_fee = schema.Float( |
---|
187 | title = _(u'Parents Consultative Forum (PCF) Fee'), |
---|
188 | default = 0.0, |
---|
189 | required = False, |
---|
190 | ) |
---|
191 | |
---|
192 | pharmlab_fee = schema.Float( |
---|
193 | title = _(u'Pharmacy Lab Support Fee'), |
---|
194 | default = 0.0, |
---|
195 | required = False, |
---|
196 | ) |
---|
197 | |
---|
198 | lo_ident_fee = schema.Float( |
---|
199 | title = _(u'Letter of Identification Fee'), |
---|
200 | default = 0.0, |
---|
201 | required = False, |
---|
202 | ) |
---|
203 | |
---|
204 | change_course_fee = schema.Float( |
---|
205 | title = _(u'Change of Course Fee'), |
---|
206 | default = 0.0, |
---|
207 | required = False, |
---|
208 | ) |
---|
209 | |
---|
210 | #make_up_fee = schema.Float( |
---|
211 | # title = _(u'Make-up Fee'), |
---|
212 | # default = 0.0, |
---|
213 | # required = False, |
---|
214 | # ) |
---|
215 | |
---|
216 | iuits_fee = schema.Float( |
---|
217 | title = _(u'IUITS Fee'), |
---|
218 | default = 0.0, |
---|
219 | required = False, |
---|
220 | ) |
---|
221 | |
---|
222 | fine_fee = schema.Float( |
---|
223 | title = _(u'Fine'), |
---|
224 | default = 0.0, |
---|
225 | required = False, |
---|
226 | ) |
---|
227 | |
---|
228 | resit_fee = schema.Float( |
---|
229 | title = _(u'Make-Up Examination Course Fee'), |
---|
230 | default = 0.0, |
---|
231 | required = False, |
---|
232 | ) |
---|
233 | |
---|
234 | makeup_admin_fee = schema.Float( |
---|
235 | title = _(u'Make-Up Registration Fee'), |
---|
236 | default = 0.0, |
---|
237 | required = False, |
---|
238 | ) |
---|
239 | |
---|
240 | id_card_fee = schema.Float( |
---|
241 | title = _(u'Student ID Card Fee'), |
---|
242 | default = 0.0, |
---|
243 | required = True, |
---|
244 | ) |
---|
245 | pg_other_fee = schema.Float( |
---|
246 | title = _(u'PG Other Charges'), |
---|
247 | default = 0.0, |
---|
248 | required = True, |
---|
249 | ) |
---|
250 | |
---|
251 | application_fee = schema.Float( |
---|
252 | title = _(u'Application Fee'), |
---|
253 | default = 0.0, |
---|
254 | required = False, |
---|
255 | ) |
---|
256 | jupeb_form_fee = schema.Float( |
---|
257 | title = _(u'JUPEB Form Fee'), |
---|
258 | default = 0.0, |
---|
259 | required = False, |
---|
260 | ) |
---|
261 | |
---|
262 | jupeb_acc_fee = schema.Float( |
---|
263 | title = _(u'JUPEB Acceptance Fee'), |
---|
264 | default = 0.0, |
---|
265 | required = False, |
---|
266 | ) |
---|
267 | |
---|
268 | jupeb_sci_fee = schema.Float( |
---|
269 | title = _(u'JUPEB Science Fee'), |
---|
270 | default = 0.0, |
---|
271 | required = False, |
---|
272 | ) |
---|
273 | |
---|
274 | jupeb_arts_fee = schema.Float( |
---|
275 | title = _(u'JUPEB Arts Fee'), |
---|
276 | default = 0.0, |
---|
277 | required = False, |
---|
278 | ) |
---|
279 | |
---|
280 | jupeb_hostel_fee = schema.Float( |
---|
281 | title = _(u'JUPEB Hostel Fee'), |
---|
282 | default = 0.0, |
---|
283 | required = False, |
---|
284 | ) |
---|
285 | |
---|
286 | jupeb_reg_fee = schema.Float( |
---|
287 | title = _(u'JUPEB Administrative Fee'), |
---|
288 | default = 0.0, |
---|
289 | required = False, |
---|
290 | ) |
---|
291 | |
---|
292 | pg_application_fee = schema.Float( |
---|
293 | title = _(u'PG Application Fee'), |
---|
294 | default = 0.0, |
---|
295 | required = False, |
---|
296 | ) |
---|
297 | |
---|
298 | health_insurance_fee = schema.Float( |
---|
299 | title = _(u'Student Health Insurance Fee'), |
---|
300 | default = 0.0, |
---|
301 | required = False, |
---|
302 | ) |
---|
303 | |
---|
304 | medical_screening_fee = schema.Float( |
---|
305 | title = _(u'Medical Screening Fees'), |
---|
306 | default = 0.0, |
---|
307 | required = False, |
---|
308 | ) |
---|
309 | |
---|
310 | # CDL Portal Fess only |
---|
311 | |
---|
312 | medical_fee = schema.Float( |
---|
313 | title = _(u'Medical Services Fee (CDL only)'), |
---|
314 | default = 0.0, |
---|
315 | required = False, |
---|
316 | ) |
---|
317 | |
---|
318 | |
---|
319 | library_fee = schema.Float( |
---|
320 | title = _(u'Library Fee (CDL only)'), |
---|
321 | default = 0.0, |
---|
322 | required = False, |
---|
323 | ) |
---|
324 | |
---|
325 | ict_fee = schema.Float( |
---|
326 | title = _(u'ICT Fee (CDL only)'), |
---|
327 | default = 0.0, |
---|
328 | required = False, |
---|
329 | ) |
---|
330 | |
---|
331 | orientation_fee = schema.Float( |
---|
332 | title = _(u'Orientation Fee (CDL only'), |
---|
333 | default = 0.0, |
---|
334 | required = False, |
---|
335 | ) |
---|
336 | |
---|
337 | examination_fee = schema.Float( |
---|
338 | title = _(u'Examination Fee (CDL only)'), |
---|
339 | default = 0.0, |
---|
340 | required = False, |
---|
341 | ) |
---|
342 | |
---|
343 | course_fee = schema.Float( |
---|
344 | title = _(u'Course Fee (CDL only)'), |
---|
345 | default = 0.0, |
---|
346 | required = False, |
---|
347 | ) |
---|
348 | |
---|
349 | |
---|
350 | def getSessionString(): |
---|
351 | """Returns the session string from the vocabulary. |
---|
352 | """ |
---|
353 | |
---|
354 | |
---|
355 | class ICustomSessionConfigurationAdd(ICustomSessionConfiguration): |
---|
356 | """A session configuration object in add mode. |
---|
357 | """ |
---|
358 | |
---|
359 | academic_session = schema.Choice( |
---|
360 | title = _(u'Academic Session'), |
---|
361 | source = academic_sessions_vocab, |
---|
362 | default = None, |
---|
363 | required = True, |
---|
364 | readonly = False, |
---|
365 | ) |
---|
366 | |
---|
367 | ICustomSessionConfigurationAdd[ |
---|
368 | 'academic_session'].order = ICustomSessionConfiguration[ |
---|
369 | 'academic_session'].order |
---|