[13355] | 1 | ## $Id: interfaces.py 16585 2021-08-29 08:28:28Z 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 | |
---|
[15563] | 25 | _ = MessageFactory = zope.i18nmessageid.MessageFactory('kofacustom.iuokada') |
---|
[13355] | 26 | |
---|
| 27 | class ICustomSessionConfiguration(ISessionConfiguration): |
---|
| 28 | """A session configuration object. |
---|
| 29 | """ |
---|
| 30 | |
---|
| 31 | # Base fees, do not remove. |
---|
| 32 | |
---|
[14457] | 33 | clearance_fee = schema.Float( |
---|
| 34 | title = _(u'Acceptance Fee'), |
---|
[13355] | 35 | default = 0.0, |
---|
| 36 | required = False, |
---|
| 37 | ) |
---|
| 38 | |
---|
[14457] | 39 | booking_fee = schema.Float( |
---|
| 40 | title = _(u'Bed Booking Fee'), |
---|
[13355] | 41 | default = 0.0, |
---|
| 42 | required = False, |
---|
| 43 | ) |
---|
| 44 | |
---|
[14457] | 45 | maint_fee = schema.Float( |
---|
| 46 | title = _(u'Rent (fallback)'), |
---|
[13355] | 47 | default = 0.0, |
---|
| 48 | required = False, |
---|
| 49 | ) |
---|
| 50 | |
---|
[14457] | 51 | late_registration_fee = schema.Float( |
---|
| 52 | title = _(u'Late Course Reg. Fee'), |
---|
[13355] | 53 | default = 0.0, |
---|
| 54 | required = False, |
---|
| 55 | ) |
---|
| 56 | |
---|
[15789] | 57 | transcript_local_fee = schema.Float( |
---|
| 58 | title = _(u'Transcript Fee Local Students'), |
---|
[13355] | 59 | default = 0.0, |
---|
| 60 | required = False, |
---|
| 61 | ) |
---|
| 62 | |
---|
[15789] | 63 | transcript_overseas_fee = schema.Float( |
---|
| 64 | title = _(u'Transcript Fee Oversea Students'), |
---|
| 65 | default = 0.0, |
---|
| 66 | required = False, |
---|
| 67 | ) |
---|
| 68 | |
---|
[14457] | 69 | transfer_fee = schema.Float( |
---|
| 70 | title = _(u'Transfer Fee'), |
---|
| 71 | default = 0.0, |
---|
| 72 | required = False, |
---|
| 73 | ) |
---|
| 74 | |
---|
[15590] | 75 | interswitch_enabled = schema.Bool( |
---|
[16485] | 76 | title = _(u'Interswitch Collegepay integration enabled'), |
---|
| 77 | default = True, |
---|
[15590] | 78 | ) |
---|
[14457] | 79 | |
---|
[16485] | 80 | interswitch_paydirect_enabled = schema.Bool( |
---|
| 81 | title = _(u'Interswitch Paydirect integration enabled'), |
---|
| 82 | default = True, |
---|
| 83 | ) |
---|
| 84 | |
---|
[15703] | 85 | etranzact_webconnect_enabled = schema.Bool( |
---|
| 86 | title = _(u'Etranzact Webconnect integration enabled'), |
---|
[15590] | 87 | default = False, |
---|
| 88 | ) |
---|
| 89 | |
---|
[15703] | 90 | etranzact_payoutlet_enabled = schema.Bool( |
---|
| 91 | title = _(u'Etranzact Payoutlet integration enabled'), |
---|
| 92 | default = False, |
---|
| 93 | ) |
---|
| 94 | |
---|
[13355] | 95 | # Additional fees in custom package add here |
---|
| 96 | |
---|
[16212] | 97 | grad_clearance_fee = schema.Float( |
---|
| 98 | title = _(u'Clearance Fee'), |
---|
| 99 | default = 0.0, |
---|
| 100 | required = False, |
---|
| 101 | ) |
---|
| 102 | |
---|
[15773] | 103 | registration_fee = schema.Float( |
---|
| 104 | title = _(u'Registration Fee'), |
---|
| 105 | default = 0.0, |
---|
| 106 | required = False, |
---|
| 107 | ) |
---|
| 108 | |
---|
[15645] | 109 | late_registration_fee = schema.Float( |
---|
| 110 | title = _(u'Late Registration Fee'), |
---|
| 111 | default = 0.0, |
---|
| 112 | required = False, |
---|
| 113 | ) |
---|
[13355] | 114 | |
---|
[15645] | 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 | develop_fee = schema.Float( |
---|
| 128 | title = _(u'Development Fee'), |
---|
| 129 | default = 0.0, |
---|
| 130 | required = False, |
---|
| 131 | ) |
---|
| 132 | |
---|
[15789] | 133 | municipal_fresh_fee = schema.Float( |
---|
| 134 | title = _(u'Municipal Fee Fresh Students'), |
---|
[15645] | 135 | default = 0.0, |
---|
| 136 | required = False, |
---|
| 137 | ) |
---|
| 138 | |
---|
[15789] | 139 | municipal_returning_fee = schema.Float( |
---|
| 140 | title = _(u'Municipal Fee Returning Students'), |
---|
| 141 | default = 0.0, |
---|
| 142 | required = False, |
---|
| 143 | ) |
---|
| 144 | |
---|
[15645] | 145 | alumni_fee = schema.Float( |
---|
| 146 | title = _(u'Alumni Fee'), |
---|
| 147 | default = 0.0, |
---|
| 148 | required = False, |
---|
| 149 | ) |
---|
| 150 | |
---|
| 151 | conv_fee = schema.Float( |
---|
| 152 | title = _(u'Convocation Fee'), |
---|
| 153 | default = 0.0, |
---|
| 154 | required = False, |
---|
| 155 | ) |
---|
| 156 | |
---|
| 157 | matric_fee = schema.Float( |
---|
| 158 | title = _(u'Matriculation Fee'), |
---|
| 159 | default = 0.0, |
---|
| 160 | required = False, |
---|
| 161 | ) |
---|
| 162 | |
---|
| 163 | waecneco_fee = schema.Float( |
---|
| 164 | title = _(u'WAEC & NECO Verification Fee'), |
---|
| 165 | default = 0.0, |
---|
| 166 | required = False, |
---|
| 167 | ) |
---|
| 168 | |
---|
| 169 | jambver_fee = schema.Float( |
---|
| 170 | title = _(u'JAMB Verification Fee'), |
---|
| 171 | default = 0.0, |
---|
| 172 | required = False, |
---|
| 173 | ) |
---|
| 174 | |
---|
| 175 | book_fee = schema.Float( |
---|
| 176 | title = _(u'Book Deposit'), |
---|
| 177 | default = 0.0, |
---|
| 178 | required = False, |
---|
| 179 | ) |
---|
| 180 | |
---|
| 181 | parentsconsult_fee = schema.Float( |
---|
| 182 | title = _(u'Parents Consultative Forum (PCF) Fee'), |
---|
| 183 | default = 0.0, |
---|
| 184 | required = False, |
---|
| 185 | ) |
---|
| 186 | |
---|
| 187 | pharmlab_fee = schema.Float( |
---|
| 188 | title = _(u'Pharmacy Lab Support Fee'), |
---|
| 189 | default = 0.0, |
---|
| 190 | required = False, |
---|
| 191 | ) |
---|
| 192 | |
---|
[15737] | 193 | lo_ident_fee = schema.Float( |
---|
| 194 | title = _(u'Letter of Identification Fee'), |
---|
| 195 | default = 0.0, |
---|
| 196 | required = False, |
---|
| 197 | ) |
---|
| 198 | |
---|
| 199 | change_course_fee = schema.Float( |
---|
| 200 | title = _(u'Change of Course Fee'), |
---|
| 201 | default = 0.0, |
---|
| 202 | required = False, |
---|
| 203 | ) |
---|
| 204 | |
---|
[15942] | 205 | #make_up_fee = schema.Float( |
---|
| 206 | # title = _(u'Make-up Fee'), |
---|
| 207 | # default = 0.0, |
---|
| 208 | # required = False, |
---|
| 209 | # ) |
---|
[15737] | 210 | |
---|
| 211 | iuits_fee = schema.Float( |
---|
| 212 | title = _(u'IUITS Fee'), |
---|
| 213 | default = 0.0, |
---|
| 214 | required = False, |
---|
| 215 | ) |
---|
| 216 | |
---|
| 217 | fine_fee = schema.Float( |
---|
| 218 | title = _(u'Fine'), |
---|
| 219 | default = 0.0, |
---|
| 220 | required = False, |
---|
| 221 | ) |
---|
| 222 | |
---|
[15937] | 223 | resit_fee = schema.Float( |
---|
| 224 | title = _(u'Make-Up Examination Course Fee'), |
---|
| 225 | default = 0.0, |
---|
| 226 | required = False, |
---|
| 227 | ) |
---|
| 228 | |
---|
[16573] | 229 | makeup_admin_fee = schema.Float( |
---|
[16575] | 230 | title = _(u'Make-Up Registration Fee'), |
---|
[16573] | 231 | default = 0.0, |
---|
| 232 | required = False, |
---|
| 233 | ) |
---|
| 234 | |
---|
[16111] | 235 | id_card_fee = schema.Float( |
---|
| 236 | title = _(u'Student ID Card Fee'), |
---|
| 237 | default = 0.0, |
---|
| 238 | required = True, |
---|
| 239 | ) |
---|
[16233] | 240 | pg_other_fee = schema.Float( |
---|
| 241 | title = _(u'PG Other Charges'), |
---|
| 242 | default = 0.0, |
---|
| 243 | required = True, |
---|
| 244 | ) |
---|
[16111] | 245 | |
---|
[16394] | 246 | application_fee = schema.Float( |
---|
| 247 | title = _(u'Application Fee'), |
---|
| 248 | default = 0.0, |
---|
| 249 | required = False, |
---|
| 250 | ) |
---|
[16395] | 251 | jupeb_form_fee = schema.Float( |
---|
| 252 | title = _(u'JUPEB Form Fee'), |
---|
| 253 | default = 0.0, |
---|
| 254 | required = False, |
---|
| 255 | ) |
---|
[16394] | 256 | |
---|
[16395] | 257 | jupeb_acc_fee = schema.Float( |
---|
| 258 | title = _(u'JUPEB Acceptance Fee'), |
---|
| 259 | default = 0.0, |
---|
| 260 | required = False, |
---|
| 261 | ) |
---|
| 262 | |
---|
| 263 | jupeb_sci_fee = schema.Float( |
---|
| 264 | title = _(u'JUPEB Science Fee'), |
---|
| 265 | default = 0.0, |
---|
| 266 | required = False, |
---|
| 267 | ) |
---|
| 268 | |
---|
| 269 | jupeb_arts_fee = schema.Float( |
---|
| 270 | title = _(u'JUPEB Arts Fee'), |
---|
| 271 | default = 0.0, |
---|
| 272 | required = False, |
---|
| 273 | ) |
---|
| 274 | |
---|
| 275 | jupeb_hostel_fee = schema.Float( |
---|
| 276 | title = _(u'JUPEB Hostel Fee'), |
---|
| 277 | default = 0.0, |
---|
| 278 | required = False, |
---|
| 279 | ) |
---|
| 280 | |
---|
| 281 | jupeb_reg_fee = schema.Float( |
---|
[16585] | 282 | title = _(u'JUPEB Administrative Fee'), |
---|
[16395] | 283 | default = 0.0, |
---|
| 284 | required = False, |
---|
| 285 | ) |
---|
| 286 | |
---|
[13355] | 287 | def getSessionString(): |
---|
| 288 | """Returns the session string from the vocabulary. |
---|
| 289 | """ |
---|
| 290 | |
---|
| 291 | |
---|
| 292 | class ICustomSessionConfigurationAdd(ICustomSessionConfiguration): |
---|
| 293 | """A session configuration object in add mode. |
---|
| 294 | """ |
---|
| 295 | |
---|
| 296 | academic_session = schema.Choice( |
---|
| 297 | title = _(u'Academic Session'), |
---|
| 298 | source = academic_sessions_vocab, |
---|
| 299 | default = None, |
---|
| 300 | required = True, |
---|
| 301 | readonly = False, |
---|
| 302 | ) |
---|
| 303 | |
---|
| 304 | ICustomSessionConfigurationAdd[ |
---|
| 305 | 'academic_session'].order = ICustomSessionConfiguration[ |
---|
[10765] | 306 | 'academic_session'].order |
---|