source: main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/utils/utils.py @ 18159

Last change on this file since 18159 was 18159, checked in by Henrik Bettermann, 15 months ago

Add new fees.

  • Property svn:keywords set to Id
File size: 15.6 KB
RevLine 
[10765]1## $Id: utils.py 18159 2025-08-25 12:45:53Z henrik $
2##
3## Copyright (C) 2012 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"""Customize general helper utilities for Kofa.
19"""
[15645]20
[17661]21import grok
[15645]22from copy import deepcopy
[10765]23from kofacustom.nigeria.utils.utils import NigeriaKofaUtils
24
25class CustomKofaUtils(NigeriaKofaUtils):
26    """A collection of methods subject to customization.
27    """
28
[15645]29    PAYMENT_CATEGORIES = {
[15663]30        'schoolfee': 'Tuition Plus (total amount)',
31        'schoolfee40': 'Tuition Plus (40% - 1st instalment)',
[15773]32        'secondinstal': 'Tuition Plus (60% - 2nd instalment)',
[15645]33        'clearance': 'Acceptance Fee',
[16212]34        'grad_clearance': 'Clearance Fee',
[15728]35        'registration': 'Registration Fee',
[17900]36        'registration_fresh': 'Registration Fee (Fresh)',
37        'registration_return': 'Registration Fee (Returning)',
[15661]38        #'bed_allocation': 'Bed Allocation Fee',
39        #'hostel_maintenance': 'Accommodation',
[15645]40        #'transfer': 'Transfer Fee',
41        #'gown': 'Gown Hire Fee',
42        'application': 'Application Fee',
[16747]43        'pg_application': 'PG Application Fee',
[15645]44        'app_balance': 'Application Fee Balance',
[16142]45        'transcript': 'Transcript Fee',
[15789]46        'transcript_local': 'Transcript Fee Local',
47        'transcript_overseas': 'Transcript Fee Oversea',
[15645]48        'late_registration': 'Late Registration Fee',
49        'science': 'Science Bench Fee',
50        'clinical': 'Clinical Fee (Medical Students)',
51        'develop': 'Development Fee',
[16223]52        'municipal_fresh': 'Municipal Fee (Fresh Students)',
53        'municipal_returning': 'Municipal Fee (Returning Students)',
[15645]54        'alumni': 'Alumni Fee',
55        'conv': 'Convocation Fee',
56        'matric': 'Matriculation Fee',
[16305]57        'waecneco': 'WAEC/NECO Verification',
[15645]58        'jambver': 'JAMB Verification',
59        'book': 'Book Deposit',
60        'parentsconsult': 'Parents Consultative Forum (PCF) Fee',
61        'pharmlab': 'Pharmacy Lab Support Fee',
[15736]62        'lo_ident': 'Letter of Identification Fee',
63        'change_course': 'Change of Course Fee',
64        'make_up': 'Make-up Fee',
65        'iuits': 'IUITS Fee',
66        'fine': 'Fine',
[15686]67        'combi': 'Combi Payment',
[15937]68        'resit1': '1 Make-Up Examination Course',
69        'resit2': '2 Make-Up Examination Courses',
70        'resit3': '3 Make-Up Examination Courses',
71        'resit4': '4 Make-Up Examination Courses',
72        'resit5': '5 Make-Up Examination Courses',
[17661]73        'resit6': '6 Make-Up Examination Courses',
[15937]74        'resit7': '7 Make-Up Examination Courses',
75        'resit8': '8 Make-Up Examination Courses',
76        'resit9': '9 Make-Up Examination Courses',
[16575]77        'makeup_admin': 'Make-Up Registration Fee',
[16111]78        'id_card': 'Student ID Card',
[18140]79        'required_combi': 'Total Sundry Charges',
[16233]80        'pg_other': 'PG Other Charges',
[16395]81        'jupeb_form':'JUPEB Form Fee',
82        'jupeb_acc':'JUPEB Acceptance Fee',
[16585]83        'jupeb_reg':'JUPEB Administrative Fee',
[16687]84        'jupeb_sci':'JUPEB Tuition (Science)',
85        'jupeb_arts':'JUPEB Tuition (Arts)',
86        'jupeb_hostel':'JUPEB Accommodation (optional)',
[18159]87        'jupeb_idcard': 'JUPEB ID Card',
88        'jupeb_transp': 'JUPEB Transportation',
89        'jupeb_exam': 'JUPEB Examination Fee',
90        'jupeb_municipal': 'JUPEB Municipal',
[16630]91        'brought_fwd': 'Balance Brought Forward',
[17436]92        'health_insurance': 'Student Health Insurance',
[17661]93        # CDL Portal Fees only
94        'medical':'Medical Services',
95        'library':'Library',
96        'ict':'ICT Fees',
97        'orientation':'Orientation Fee',
98        'examination':'Examination Fee',
[17838]99        'medical_screening':'Medical Screening Fees',
[17661]100        'cdlcourse1': ' 1 Course',
101        'cdlcourse2': ' 2 Courses',
102        'cdlcourse3': ' 3 Courses',
103        'cdlcourse4': ' 4 Courses',
104        'cdlcourse5': ' 5 Courses',
105        'cdlcourse6': ' 6 Courses',
106        'cdlcourse7': ' 7 Courses',
107        'cdlcourse8': ' 8 Courses',
108        'cdlcourse9': ' 9 Courses',
109        'cdlcourse10': '10 Courses',
110        'cdlcourse11': '11 Courses',
111        'cdlcourse12': '12 Courses',
112        'cdlcourse13': '13 Courses',
113        'cdlcourse14': '14 Courses',
114        'cdlcourse15': '15 Courses',
[15645]115        }
116
117    SELECTABLE_PAYMENT_CATEGORIES = {
[16233]118        'schoolfee': 'Tuition Plus (total amount)',
119        'schoolfee40': 'Tuition Plus (40% - 1st instalment)',
120        'secondinstal': 'Tuition Plus (60% - 2nd instalment)',
[18133]121        'clearance': 'Acceptance Fee',
[17900]122        #'registration': 'Registration Fee',
[15645]123        #'bed_allocation': 'Bed Allocation Fee',
[15661]124        #'hostel_maintenance': 'Accommodation',
[15645]125        #'transfer': 'Transfer Fee',
126        #'gown': 'Gown Hire Fee',
[18133]127        #'app_balance': 'Application Fee Balance',
128        #'make_up': 'Make-up Fee',
[16394]129        'application': 'Application Fee',
[16747]130        'pg_application': 'PG Application Fee',
[15789]131        'transcript_local': 'Transcript Fee (Local Students)',
132        'transcript_overseas': 'Transcript Fee (Oversea Students)',
[15645]133        'late_registration': 'Late Registration Fee',
134        'clinical': 'Clinical Fee (Medical Students)',
[15736]135        'lo_ident': 'Letter of Identification Fee',
136        'change_course': 'Change of Course Fee',
137        'iuits': 'IUITS Fee',
138        'fine': 'Fine',
[18133]139        #'combi': 'Combi Payment',
[17502]140        #'resit1': '1 Make-Up Examination Course',
141        #'resit2': '2 Make-Up Examination Courses',
142        #'resit3': '3 Make-Up Examination Courses',
143        #'resit4': '4 Make-Up Examination Courses',
144        #'resit5': '5 Make-Up Examination Courses',
[17661]145        #'resit6': '6 Make-Up Examination Courses',
[17502]146        #'resit7': '7 Make-Up Examination Courses',
147        #'resit8': '8 Make-Up Examination Courses',
148        #'resit9': '9 Make-Up Examination Courses',
[16575]149        'makeup_admin': 'Make-Up Registration Fee',
[18140]150        'required_combi': 'Total Sundry Charges',
[16233]151        'pg_other': 'PG Other Charges',
[16687]152        #'jupeb_form':'JUPEB Form Fee',
153        #'jupeb_acc':'JUPEB Acceptance Fee',
154        #'jupeb_reg':'JUPEB Administrative Fee',
155        'jupeb_sci':'JUPEB Tuition (Science)',
156        'jupeb_arts':'JUPEB Tuition (Arts)',
157        'jupeb_hostel':'JUPEB Accommodation (optional)',
[18159]158        'jupeb_idcard': 'JUPEB ID Card',
159        'jupeb_transp': 'JUPEB Transportation',
160        'jupeb_exam': 'JUPEB Examination Fee',
161        'jupeb_municipal': 'JUPEB Municipal',
[18133]162
163        ## sundry: 'registration_fresh': 'Registration Fee (Fresh)',
164        ## sundry: 'registration_return': 'Registration Fee (Returning)',
165        ## sundry: 'grad_clearance': 'Clearance Fee',
166        ## sundry: 'science': 'Science Bench Fee',
167        ## sundry: 'medical_screening':'Medical Screening Fees',
168        ## sundry: 'municipal_fresh': 'Municipal Fee (Fresh Students)',
169        ## sundry: 'municipal_returning': 'Municipal Fee (Returning Students)',
170        ## sundry: 'alumni': 'Alumni Fee',
171        ## sundry: 'conv': 'Convocation Fee',
172        ## sundry: 'matric': 'Matriculation Fee',
173        ## sundry: 'waecneco': 'WAEC/NECO Verification',
174        ## sundry: 'jambver': 'JAMB Verification',
175        ## sundry: 'book': 'Book Deposit',
176        ## sundry: 'parentsconsult': 'Parents Consultative Forum (PCF) Fee',
177        ## sundry: 'id_card': 'Student ID Card',
178        ## sundry: 'develop': 'Development Fee',
179        ## sundry: 'health_insurance': 'Student Health Insurance',
[18135]180        ## sundry: 'pharmlab': 'Pharmacy Lab Support Fee',
[15645]181        }
182
[17661]183    CDLPORTAL_PAYMENT_CATEGORIES = {
[17672]184        'schoolfee': 'School Fees',
[17661]185        'clearance': 'Acceptance Fee',
186        'id_card': 'Student ID Card',
187        'waecneco': 'WAEC/NECO Verification',
188        # CDL Portal fees only
189        'medical':'Medical Services',
190        'library':'Library',
191        'ict':'ICT Fees',
192        'orientation':'Orientation Fee',
193        'examination':'Examination Fee',
194        'cdlcourse1': ' 1 Course',
195        'cdlcourse2': ' 2 Courses',
196        'cdlcourse3': ' 3 Courses',
197        'cdlcourse4': ' 4 Courses',
198        'cdlcourse5': ' 5 Courses',
199        'cdlcourse6': ' 6 Courses',
200        'cdlcourse7': ' 7 Courses',
201        'cdlcourse8': ' 8 Courses',
202        'cdlcourse9': ' 9 Courses',
203        'cdlcourse10': '10 Courses',
204        'cdlcourse11': '11 Courses',
205        'cdlcourse12': '12 Courses',
206        'cdlcourse13': '13 Courses',
207        'cdlcourse14': '14 Courses',
208        'cdlcourse15': '15 Courses',
[17800]209        'combi': 'Combi Payment',
[17661]210        }
211
[16576]212    def selectable_payment_categories(self, student):
[17661]213        if grok.getSite().__name__ == 'iuokada-cdl':
214            spc = deepcopy(self.CDLPORTAL_PAYMENT_CATEGORIES)
215            return spc
[17126]216        spc = deepcopy(self.SELECTABLE_PAYMENT_CATEGORIES)
217        if student.depcode == 'BMS':
218            del spc['schoolfee40']
219            del spc['secondinstal']
220        return spc
[16576]221
[15661]222    PREVIOUS_PAYMENT_CATEGORIES = {
[16233]223        'schoolfee': 'Tuition, Accommodation, Adm. Charges',
[17900]224        #'registration': 'Registration Fee',
225        'registration_fresh': 'Registration Fee (Fresh)',
226        'registration_return': 'Registration Fee (Returning)',
[16208]227        'clearance': 'Acceptance Fee',
[16212]228        'grad_clearance': 'Clearance Fee',
[15661]229        'application': 'Application Fee',
230        'late_registration': 'Late Registration Fee',
231        'science': 'Science Bench Fee',
232        'clinical': 'Clinical Fee (Medical Students)',
[17838]233        'medical_screening':'Medical Screening Fees',
[15661]234        'develop': 'Development Fee',
[15789]235        'municipal_fresh': 'Municipal Fee (Fresh Students)',
236        'municipal_returning': 'Municipal Fee (Returning Students)',
[15661]237        'alumni': 'Alumni Fee',
238        'conv': 'Convocation Fee',
239        'matric': 'Matriculation Fee',
[16305]240        'waecneco': 'WAEC/NECO Verification',
[15661]241        'jambver': 'JAMB Verification',
242        'book': 'Book Deposit',
243        'parentsconsult': 'Parents Consultative Forum (PCF) Fee',
244        'pharmlab': 'Pharmacy Lab Support Fee',
[15736]245        'lo_ident': 'Letter of Identification Fee',
246        'change_course': 'Change of Course Fee',
247        'make_up': 'Make-up Fee',
248        'iuits': 'IUITS Fee',
249        'fine': 'Fine',
[16111]250        'id_card': 'Student ID Card',
[18140]251        #'required_combi': 'Total  Sundry Charges',
[16233]252        'pg_other': 'PG Other Charges',
[16687]253        #'jupeb_form':'JUPEB Form Fee',
254        #'jupeb_acc':'JUPEB Acceptance Fee',
255        #'jupeb_reg':'JUPEB Administrative Fee',
256        'jupeb_sci':'JUPEB Tuition (Science)',
257        'jupeb_arts':'JUPEB Tuition (Arts)',
258        'jupeb_hostel':'JUPEB Accommodation (optional)',
[17482]259        'health_insurance': 'Student Health Insurance',
[18159]260        'jupeb_idcard': 'JUPEB ID Card',
261        'jupeb_transp': 'JUPEB Transportation',
262        'jupeb_exam': 'JUPEB Examination Fee',
263        'jupeb_municipal': 'JUPEB Municipal',
[15675]264        }
265
[17664]266    @property
267    def COMBI_PAYMENT_CATEGORIES(self):
268        if grok.getSite().__name__ == 'iuokada-cdl':
[17665]269            return self.CDLPORTAL_COMBI_PAYMENT_CATEGORIES
270        return self._COMBI_PAYMENT_CATEGORIES
[17664]271
272    CDLPORTAL_COMBI_PAYMENT_CATEGORIES = {
273        'clearance': 'Acceptance Fee',
274        'id_card': 'Student ID Card',
275        'waecneco': 'WAEC/NECO Verification',
276        # CDL Portal fees only
277        'medical':'Medical Services',
278        'library':'Library',
279        'ict':'ICT Fees',
280        'orientation':'Orientation Fee',
281        'examination':'Examination Fee',
282        'cdlcourse1': ' 1 Course',
283        'cdlcourse2': ' 2 Courses',
284        'cdlcourse3': ' 3 Courses',
285        'cdlcourse4': ' 4 Courses',
286        'cdlcourse5': ' 5 Courses',
287        'cdlcourse6': ' 6 Courses',
288        'cdlcourse7': ' 7 Courses',
289        'cdlcourse8': ' 8 Courses',
290        'cdlcourse9': ' 9 Courses',
291        'cdlcourse10': '10 Courses',
292        'cdlcourse11': '11 Courses',
293        'cdlcourse12': '12 Courses',
294        'cdlcourse13': '13 Courses',
295        'cdlcourse14': '14 Courses',
296        'cdlcourse15': '15 Courses',
297        }
298
299    _COMBI_PAYMENT_CATEGORIES = {
[17900]300        #'registration': 'Registration Fee',
[18131]301        ## sundry: 'registration_fresh': 'Registration Fee (Fresh)',
302        ## sundry: 'registration_return': 'Registration Fee (Returning)',
303        ## sundry: 'grad_clearance': 'Clearance Fee',
304        ## sundry: 'science': 'Science Bench Fee',
305        ## sundry: 'medical_screening':'Medical Screening Fees',
306        ## sundry: 'municipal_fresh': 'Municipal Fee (Fresh Students)',
307        ## sundry: 'municipal_returning': 'Municipal Fee (Returning Students)',
308        ## sundry: 'alumni': 'Alumni Fee',
309        ## sundry: 'conv': 'Convocation Fee',
310        ## sundry: 'matric': 'Matriculation Fee',
311        ## sundry: 'waecneco': 'WAEC/NECO Verification',
312        ## sundry: 'jambver': 'JAMB Verification',
313        ## sundry: 'book': 'Book Deposit',
314        ## sundry: 'parentsconsult': 'Parents Consultative Forum (PCF) Fee',
315        ## sundry: 'id_card': 'Student ID Card',
316        ## sundry: 'develop': 'Development Fee',
317        ## sundry: 'health_insurance': 'Student Health Insurance',
[18135]318        ## sundry: 'pharmlab': 'Pharmacy Lab Support Fee',
[18131]319        'clinical': 'Clinical Fee (Medical Students)',
[15675]320        'late_registration': 'Late Registration Fee',
[15736]321        'lo_ident': 'Letter of Identification Fee',
322        'change_course': 'Change of Course Fee',
323        'make_up': 'Make-up Fee',
324        'iuits': 'IUITS Fee',
325        'fine': 'Fine',
[16233]326        'pg_other': 'PG Other Charges',
[17767]327        'jupeb_form':'JUPEB Form Fee',
328        'jupeb_acc':'JUPEB Acceptance Fee',
329        'jupeb_reg':'JUPEB Administrative Fee',
[16687]330        'jupeb_sci':'JUPEB Tuition (Science)',
331        'jupeb_arts':'JUPEB Tuition (Arts)',
332        'jupeb_hostel':'JUPEB Accommodation (optional)',
[18159]333        'jupeb_idcard': 'JUPEB ID Card',
334        'jupeb_transp': 'JUPEB Transportation',
335        'jupeb_exam': 'JUPEB Examination Fee',
336        'jupeb_municipal': 'JUPEB Municipal',
[15738]337        }
338
[16015]339    BALANCE_PAYMENT_CATEGORIES = {
[16233]340        'schoolfee': 'Tuition, Accommodation, Adm. Charges',
[16015]341        }
342
[17665]343    @property
344    def PAYMENT_OPTIONS(self):
345        if grok.getSite().__name__ == 'iuokada-cdl':
346            return dict()
347        return self._PAYMENT_OPTIONS
348
349    _PAYMENT_OPTIONS = {
[16434]350        'first': 'First Bank Debit Card',
351        'access': 'Access Bank Debit Card',
352        'zenith': 'Zenith Bank Debit Card',
353        'other': 'Other Bank Debit Card',
354        }
355
[15738]356    APP_CATS_DICT = {
357        'basic': 'UAS, PUTME, PUDE, PCE, PRENCE',
358        'no': 'No Application',
[15858]359        'pg': 'Postgraduate Programmes',
[16092]360        'pg2': 'Postgraduate Programmes 2',
[16497]361        'pgphd': 'Postgraduate PhD/MPhil',
[15738]362        'pre': 'Pre-Degree Studies',
[15809]363        'pt': 'Part-Time Degree Programmes',
[15858]364        'ut': 'Undergraduate Programmes',
[16619]365        'conv': 'HND to BSc Conversion',
[17651]366        'odl': 'Open & Distant Learning',
[15738]367        }
[15877]368
[17651]369    STUDY_MODES_DICT = {
370        'ug_ft': 'Undergraduate Full Time',
371        'ug_pt': 'Undergraduate Part Time',
372        'pg_ft': 'Postgraduate Full Time',
373        'pg_pt': 'Postgraduate Part Time',
374        'pgphd': 'Postgraduate PhD/MPhil',
375        'odl': 'Open & Distant Learning',
376        'found': 'Foundation',
377        'no': 'no application',
[17767]378        'transfer': 'Transfer',
[17770]379        'transferred': 'Transferred',
[17767]380        'de': 'Direct Entry',
381        'jupeb': 'JUPEB',
[17651]382        }
383
[15877]384    #: Maximum size in Bytes of passport images in the applicants and
385    #: students section
[16048]386    MAX_PASSPORT_SIZE = 250 * 1024
Note: See TracBrowser for help on using the repository browser.