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

Last change on this file since 17899 was 17899, checked in by Henrik Bettermann, 4 weeks ago

Disable required_combi payments.

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