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

Last change on this file since 17932 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
RevLine 
[10765]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"""
[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',
[16222]79        'required_combi': 'Required Combi Payment',
[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)',
[16630]87        'brought_fwd': 'Balance Brought Forward',
[17436]88        'health_insurance': 'Student Health Insurance',
[17661]89        # CDL Portal Fees only
90        'medical':'Medical Services',
91        'library':'Library',
92        'ict':'ICT Fees',
93        'orientation':'Orientation Fee',
94        'examination':'Examination Fee',
[17838]95        'medical_screening':'Medical Screening Fees',
[17661]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',
[15645]111        }
112
113    SELECTABLE_PAYMENT_CATEGORIES = {
[16233]114        'schoolfee': 'Tuition Plus (total amount)',
115        'schoolfee40': 'Tuition Plus (40% - 1st instalment)',
116        'secondinstal': 'Tuition Plus (60% - 2nd instalment)',
[17900]117        #'registration': 'Registration Fee',
118        'registration_fresh': 'Registration Fee (Fresh)',
119        'registration_return': 'Registration Fee (Returning)',
[16208]120        'clearance': 'Acceptance Fee',
[16212]121        'grad_clearance': 'Clearance Fee',
[15645]122        #'bed_allocation': 'Bed Allocation Fee',
[15661]123        #'hostel_maintenance': 'Accommodation',
[15645]124        #'transfer': 'Transfer Fee',
125        #'gown': 'Gown Hire Fee',
[16394]126        'application': 'Application Fee',
[16747]127        'pg_application': 'PG Application Fee',
[15645]128        #'app_balance': 'Application Fee Balance',
[15789]129        'transcript_local': 'Transcript Fee (Local Students)',
130        'transcript_overseas': 'Transcript Fee (Oversea Students)',
[15645]131        'late_registration': 'Late Registration Fee',
132        'science': 'Science Bench Fee',
133        'clinical': 'Clinical Fee (Medical Students)',
[17838]134        'medical_screening':'Medical Screening Fees',
[15645]135        'develop': 'Development Fee',
[15789]136        'municipal_fresh': 'Municipal Fee (Fresh Students)',
137        'municipal_returning': 'Municipal Fee (Returning Students)',
[15645]138        'alumni': 'Alumni Fee',
139        'conv': 'Convocation Fee',
140        'matric': 'Matriculation Fee',
[16305]141        'waecneco': 'WAEC/NECO Verification',
[15645]142        'jambver': 'JAMB Verification',
143        'book': 'Book Deposit',
144        'parentsconsult': 'Parents Consultative Forum (PCF) Fee',
145        'pharmlab': 'Pharmacy Lab Support Fee',
[15736]146        'lo_ident': 'Letter of Identification Fee',
147        'change_course': 'Change of Course Fee',
[15937]148        #'make_up': 'Make-up Fee',
[15736]149        'iuits': 'IUITS Fee',
150        'fine': 'Fine',
[17800]151        'combi': 'Combi Payment',
[17502]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',
[17661]157        #'resit6': '6 Make-Up Examination Courses',
[17502]158        #'resit7': '7 Make-Up Examination Courses',
159        #'resit8': '8 Make-Up Examination Courses',
160        #'resit9': '9 Make-Up Examination Courses',
[16575]161        'makeup_admin': 'Make-Up Registration Fee',
[16111]162        'id_card': 'Student ID Card',
[17899]163        #'required_combi': 'Required Combi Payment',
[16233]164        'pg_other': 'PG Other Charges',
[16687]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)',
[17436]171        'health_insurance': 'Student Health Insurance',
[15645]172        }
173
[17661]174    CDLPORTAL_PAYMENT_CATEGORIES = {
[17672]175        'schoolfee': 'School Fees',
[17661]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',
[17800]200        'combi': 'Combi Payment',
[17661]201        }
202
[16576]203    def selectable_payment_categories(self, student):
[17661]204        if grok.getSite().__name__ == 'iuokada-cdl':
205            spc = deepcopy(self.CDLPORTAL_PAYMENT_CATEGORIES)
206            return spc
[17126]207        spc = deepcopy(self.SELECTABLE_PAYMENT_CATEGORIES)
208        if student.depcode == 'BMS':
209            del spc['schoolfee40']
210            del spc['secondinstal']
211        return spc
[16576]212
[15661]213    PREVIOUS_PAYMENT_CATEGORIES = {
[16233]214        'schoolfee': 'Tuition, Accommodation, Adm. Charges',
[17900]215        #'registration': 'Registration Fee',
216        'registration_fresh': 'Registration Fee (Fresh)',
217        'registration_return': 'Registration Fee (Returning)',
[16208]218        'clearance': 'Acceptance Fee',
[16212]219        'grad_clearance': 'Clearance Fee',
[15661]220        'application': 'Application Fee',
221        'late_registration': 'Late Registration Fee',
222        'science': 'Science Bench Fee',
223        'clinical': 'Clinical Fee (Medical Students)',
[17838]224        'medical_screening':'Medical Screening Fees',
[15661]225        'develop': 'Development Fee',
[15789]226        'municipal_fresh': 'Municipal Fee (Fresh Students)',
227        'municipal_returning': 'Municipal Fee (Returning Students)',
[15661]228        'alumni': 'Alumni Fee',
229        'conv': 'Convocation Fee',
230        'matric': 'Matriculation Fee',
[16305]231        'waecneco': 'WAEC/NECO Verification',
[15661]232        'jambver': 'JAMB Verification',
233        'book': 'Book Deposit',
234        'parentsconsult': 'Parents Consultative Forum (PCF) Fee',
235        'pharmlab': 'Pharmacy Lab Support Fee',
[15736]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',
[16111]241        'id_card': 'Student ID Card',
[17899]242        #'required_combi': 'Required Combi Payment',
[16233]243        'pg_other': 'PG Other Charges',
[16687]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)',
[17482]250        'health_insurance': 'Student Health Insurance',
[15675]251        }
252
[17664]253    @property
254    def COMBI_PAYMENT_CATEGORIES(self):
255        if grok.getSite().__name__ == 'iuokada-cdl':
[17665]256            return self.CDLPORTAL_COMBI_PAYMENT_CATEGORIES
257        return self._COMBI_PAYMENT_CATEGORIES
[17664]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 = {
[17900]287        #'registration': 'Registration Fee',
288        'registration_fresh': 'Registration Fee (Fresh)',
289        'registration_return': 'Registration Fee (Returning)',
[16212]290        'grad_clearance': 'Clearance Fee',
[15675]291        'late_registration': 'Late Registration Fee',
292        'science': 'Science Bench Fee',
293        'clinical': 'Clinical Fee (Medical Students)',
[17838]294        'medical_screening':'Medical Screening Fees',
[16284]295        'develop': 'Development Fee',
296        'municipal_fresh': 'Municipal Fee (Fresh Students)',
297        'municipal_returning': 'Municipal Fee (Returning Students)',
[15675]298        'alumni': 'Alumni Fee',
299        'conv': 'Convocation Fee',
300        'matric': 'Matriculation Fee',
[16305]301        'waecneco': 'WAEC/NECO Verification',
[15675]302        'jambver': 'JAMB Verification',
[16284]303        'book': 'Book Deposit',
304        'parentsconsult': 'Parents Consultative Forum (PCF) Fee',
[15675]305        'pharmlab': 'Pharmacy Lab Support Fee',
[15736]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',
[16111]311        'id_card': 'Student ID Card',
[16233]312        'pg_other': 'PG Other Charges',
[17767]313        'jupeb_form':'JUPEB Form Fee',
314        'jupeb_acc':'JUPEB Acceptance Fee',
315        'jupeb_reg':'JUPEB Administrative Fee',
[16687]316        'jupeb_sci':'JUPEB Tuition (Science)',
317        'jupeb_arts':'JUPEB Tuition (Arts)',
318        'jupeb_hostel':'JUPEB Accommodation (optional)',
[17482]319        'health_insurance': 'Student Health Insurance',
[15738]320        }
321
[16015]322    BALANCE_PAYMENT_CATEGORIES = {
[16233]323        'schoolfee': 'Tuition, Accommodation, Adm. Charges',
[16015]324        }
325
[17665]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 = {
[16434]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
[15738]339    APP_CATS_DICT = {
340        'basic': 'UAS, PUTME, PUDE, PCE, PRENCE',
341        'no': 'No Application',
[15858]342        'pg': 'Postgraduate Programmes',
[16092]343        'pg2': 'Postgraduate Programmes 2',
[16497]344        'pgphd': 'Postgraduate PhD/MPhil',
[15738]345        'pre': 'Pre-Degree Studies',
[15809]346        'pt': 'Part-Time Degree Programmes',
[15858]347        'ut': 'Undergraduate Programmes',
[16619]348        'conv': 'HND to BSc Conversion',
[17651]349        'odl': 'Open & Distant Learning',
[15738]350        }
[15877]351
[17651]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',
[17767]361        'transfer': 'Transfer',
[17770]362        'transferred': 'Transferred',
[17767]363        'de': 'Direct Entry',
364        'jupeb': 'JUPEB',
[17651]365        }
366
[15877]367    #: Maximum size in Bytes of passport images in the applicants and
368    #: students section
[16048]369    MAX_PASSPORT_SIZE = 250 * 1024
Note: See TracBrowser for help on using the repository browser.