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

Last change on this file since 17756 was 17672, checked in by Henrik Bettermann, 12 months ago

Further configure CDL payments.

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