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

Last change on this file since 17958 was 17900, checked in by Henrik Bettermann, 3 months ago

Add registration payment categories.

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