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