1 | ## $Id: interfaces.py 17900 2024-08-21 08:09:35Z 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 | registration_fresh_fee = schema.Float( |
---|
115 | title = _(u'Registration Fee (Fresh)'), |
---|
116 | default = 0.0, |
---|
117 | required = False, |
---|
118 | ) |
---|
119 | |
---|
120 | registration_return_fee = schema.Float( |
---|
121 | title = _(u'Registration Fee (Returning)'), |
---|
122 | default = 0.0, |
---|
123 | required = False, |
---|
124 | ) |
---|
125 | |
---|
126 | late_registration_fee = schema.Float( |
---|
127 | title = _(u'Late Registration Fee'), |
---|
128 | default = 0.0, |
---|
129 | required = False, |
---|
130 | ) |
---|
131 | |
---|
132 | science_fee = schema.Float( |
---|
133 | title = _(u'Science Bench Fee'), |
---|
134 | default = 0.0, |
---|
135 | required = False, |
---|
136 | ) |
---|
137 | |
---|
138 | clinical_fee = schema.Float( |
---|
139 | title = _(u'Clinical Fee (Medical Students)'), |
---|
140 | default = 0.0, |
---|
141 | required = False, |
---|
142 | ) |
---|
143 | |
---|
144 | develop_fee = schema.Float( |
---|
145 | title = _(u'Development Fee'), |
---|
146 | default = 0.0, |
---|
147 | required = False, |
---|
148 | ) |
---|
149 | |
---|
150 | municipal_fresh_fee = schema.Float( |
---|
151 | title = _(u'Municipal Fee Fresh Students'), |
---|
152 | default = 0.0, |
---|
153 | required = False, |
---|
154 | ) |
---|
155 | |
---|
156 | municipal_returning_fee = schema.Float( |
---|
157 | title = _(u'Municipal Fee Returning Students'), |
---|
158 | default = 0.0, |
---|
159 | required = False, |
---|
160 | ) |
---|
161 | |
---|
162 | alumni_fee = schema.Float( |
---|
163 | title = _(u'Alumni Fee'), |
---|
164 | default = 0.0, |
---|
165 | required = False, |
---|
166 | ) |
---|
167 | |
---|
168 | conv_fee = schema.Float( |
---|
169 | title = _(u'Convocation Fee'), |
---|
170 | default = 0.0, |
---|
171 | required = False, |
---|
172 | ) |
---|
173 | |
---|
174 | matric_fee = schema.Float( |
---|
175 | title = _(u'Matriculation Fee'), |
---|
176 | default = 0.0, |
---|
177 | required = False, |
---|
178 | ) |
---|
179 | |
---|
180 | waecneco_fee = schema.Float( |
---|
181 | title = _(u'WAEC & NECO Verification Fee'), |
---|
182 | default = 0.0, |
---|
183 | required = False, |
---|
184 | ) |
---|
185 | |
---|
186 | jambver_fee = schema.Float( |
---|
187 | title = _(u'JAMB Verification Fee'), |
---|
188 | default = 0.0, |
---|
189 | required = False, |
---|
190 | ) |
---|
191 | |
---|
192 | book_fee = schema.Float( |
---|
193 | title = _(u'Book Deposit'), |
---|
194 | default = 0.0, |
---|
195 | required = False, |
---|
196 | ) |
---|
197 | |
---|
198 | parentsconsult_fee = schema.Float( |
---|
199 | title = _(u'Parents Consultative Forum (PCF) Fee'), |
---|
200 | default = 0.0, |
---|
201 | required = False, |
---|
202 | ) |
---|
203 | |
---|
204 | pharmlab_fee = schema.Float( |
---|
205 | title = _(u'Pharmacy Lab Support Fee'), |
---|
206 | default = 0.0, |
---|
207 | required = False, |
---|
208 | ) |
---|
209 | |
---|
210 | lo_ident_fee = schema.Float( |
---|
211 | title = _(u'Letter of Identification Fee'), |
---|
212 | default = 0.0, |
---|
213 | required = False, |
---|
214 | ) |
---|
215 | |
---|
216 | change_course_fee = schema.Float( |
---|
217 | title = _(u'Change of Course Fee'), |
---|
218 | default = 0.0, |
---|
219 | required = False, |
---|
220 | ) |
---|
221 | |
---|
222 | #make_up_fee = schema.Float( |
---|
223 | # title = _(u'Make-up Fee'), |
---|
224 | # default = 0.0, |
---|
225 | # required = False, |
---|
226 | # ) |
---|
227 | |
---|
228 | iuits_fee = schema.Float( |
---|
229 | title = _(u'IUITS Fee'), |
---|
230 | default = 0.0, |
---|
231 | required = False, |
---|
232 | ) |
---|
233 | |
---|
234 | fine_fee = schema.Float( |
---|
235 | title = _(u'Fine'), |
---|
236 | default = 0.0, |
---|
237 | required = False, |
---|
238 | ) |
---|
239 | |
---|
240 | resit_fee = schema.Float( |
---|
241 | title = _(u'Make-Up Examination Course Fee'), |
---|
242 | default = 0.0, |
---|
243 | required = False, |
---|
244 | ) |
---|
245 | |
---|
246 | makeup_admin_fee = schema.Float( |
---|
247 | title = _(u'Make-Up Registration Fee'), |
---|
248 | default = 0.0, |
---|
249 | required = False, |
---|
250 | ) |
---|
251 | |
---|
252 | id_card_fee = schema.Float( |
---|
253 | title = _(u'Student ID Card Fee'), |
---|
254 | default = 0.0, |
---|
255 | required = True, |
---|
256 | ) |
---|
257 | pg_other_fee = schema.Float( |
---|
258 | title = _(u'PG Other Charges'), |
---|
259 | default = 0.0, |
---|
260 | required = True, |
---|
261 | ) |
---|
262 | |
---|
263 | application_fee = schema.Float( |
---|
264 | title = _(u'Application Fee'), |
---|
265 | default = 0.0, |
---|
266 | required = False, |
---|
267 | ) |
---|
268 | jupeb_form_fee = schema.Float( |
---|
269 | title = _(u'JUPEB Form Fee'), |
---|
270 | default = 0.0, |
---|
271 | required = False, |
---|
272 | ) |
---|
273 | |
---|
274 | jupeb_acc_fee = schema.Float( |
---|
275 | title = _(u'JUPEB Acceptance Fee'), |
---|
276 | default = 0.0, |
---|
277 | required = False, |
---|
278 | ) |
---|
279 | |
---|
280 | jupeb_sci_fee = schema.Float( |
---|
281 | title = _(u'JUPEB Science Fee'), |
---|
282 | default = 0.0, |
---|
283 | required = False, |
---|
284 | ) |
---|
285 | |
---|
286 | jupeb_arts_fee = schema.Float( |
---|
287 | title = _(u'JUPEB Arts Fee'), |
---|
288 | default = 0.0, |
---|
289 | required = False, |
---|
290 | ) |
---|
291 | |
---|
292 | jupeb_hostel_fee = schema.Float( |
---|
293 | title = _(u'JUPEB Hostel Fee'), |
---|
294 | default = 0.0, |
---|
295 | required = False, |
---|
296 | ) |
---|
297 | |
---|
298 | jupeb_reg_fee = schema.Float( |
---|
299 | title = _(u'JUPEB Administrative Fee'), |
---|
300 | default = 0.0, |
---|
301 | required = False, |
---|
302 | ) |
---|
303 | |
---|
304 | pg_application_fee = schema.Float( |
---|
305 | title = _(u'PG Application Fee'), |
---|
306 | default = 0.0, |
---|
307 | required = False, |
---|
308 | ) |
---|
309 | |
---|
310 | health_insurance_fee = schema.Float( |
---|
311 | title = _(u'Student Health Insurance Fee'), |
---|
312 | default = 0.0, |
---|
313 | required = False, |
---|
314 | ) |
---|
315 | |
---|
316 | medical_screening_fee = schema.Float( |
---|
317 | title = _(u'Medical Screening Fees'), |
---|
318 | default = 0.0, |
---|
319 | required = False, |
---|
320 | ) |
---|
321 | |
---|
322 | # CDL Portal Fess only |
---|
323 | |
---|
324 | medical_fee = schema.Float( |
---|
325 | title = _(u'Medical Services Fee (CDL only)'), |
---|
326 | default = 0.0, |
---|
327 | required = False, |
---|
328 | ) |
---|
329 | |
---|
330 | |
---|
331 | library_fee = schema.Float( |
---|
332 | title = _(u'Library Fee (CDL only)'), |
---|
333 | default = 0.0, |
---|
334 | required = False, |
---|
335 | ) |
---|
336 | |
---|
337 | ict_fee = schema.Float( |
---|
338 | title = _(u'ICT Fee (CDL only)'), |
---|
339 | default = 0.0, |
---|
340 | required = False, |
---|
341 | ) |
---|
342 | |
---|
343 | orientation_fee = schema.Float( |
---|
344 | title = _(u'Orientation Fee (CDL only'), |
---|
345 | default = 0.0, |
---|
346 | required = False, |
---|
347 | ) |
---|
348 | |
---|
349 | examination_fee = schema.Float( |
---|
350 | title = _(u'Examination Fee (CDL only)'), |
---|
351 | default = 0.0, |
---|
352 | required = False, |
---|
353 | ) |
---|
354 | |
---|
355 | course_fee = schema.Float( |
---|
356 | title = _(u'Course Fee (CDL only)'), |
---|
357 | default = 0.0, |
---|
358 | required = False, |
---|
359 | ) |
---|
360 | |
---|
361 | |
---|
362 | def getSessionString(): |
---|
363 | """Returns the session string from the vocabulary. |
---|
364 | """ |
---|
365 | |
---|
366 | |
---|
367 | class ICustomSessionConfigurationAdd(ICustomSessionConfiguration): |
---|
368 | """A session configuration object in add mode. |
---|
369 | """ |
---|
370 | |
---|
371 | academic_session = schema.Choice( |
---|
372 | title = _(u'Academic Session'), |
---|
373 | source = academic_sessions_vocab, |
---|
374 | default = None, |
---|
375 | required = True, |
---|
376 | readonly = False, |
---|
377 | ) |
---|
378 | |
---|
379 | ICustomSessionConfigurationAdd[ |
---|
380 | 'academic_session'].order = ICustomSessionConfiguration[ |
---|
381 | 'academic_session'].order |
---|