source: main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/utils/utils.py @ 15655

Last change on this file since 15655 was 15655, checked in by Henrik Bettermann, 5 years ago

Add payment categories.

  • Property svn:keywords set to Id
File size: 5.8 KB
RevLine 
[10765]1## $Id: utils.py 15655 2019-10-09 19:35:40Z 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"""
[15011]20from copy import deepcopy
[10765]21from kofacustom.nigeria.utils.utils import NigeriaKofaUtils
22
23class CustomKofaUtils(NigeriaKofaUtils):
24    """A collection of methods subject to customization.
25    """
26
[15074]27    APP_CATS_DICT = {
28        'basic': 'Basic Application',
29        'no': 'no application',
[15082]30        'ft': 'Full Time Courses',
31        'pt': 'Part Time Courses',
[15093]32        'pre': 'Pre-Degree Studies',
[15103]33        'ct': 'Certificate Programmes',
[15109]34        'ndft': 'National Diploma Full-Time Programmes',
35        'ndpt': 'National Diploma Part-Time Programmes',
36        'ndwe': 'National Diploma Weekend Programmes',
[15410]37        'nde': 'National Diploma Part-Time Evening Programmes',
[15109]38        'hndft': 'Higher National Diploma Full-Time Programmes',
39        'hndpt': 'Higher National Diploma Part-Time Programmes',
40        'hndwe': 'Higher National Diploma Weekend Programmes',
[15410]41        'hnde': 'Higher National Diploma Part-Time Evening Programmes',
[15109]42
[15074]43        }
44
[15011]45    PAYMENT_CATEGORIES = {
[15105]46        'schoolfee': 'Tuition/Exams Fee',
[15011]47        'clearance': 'Acceptance Fee',
48        'bed_allocation': 'Accommodation Booking Fee',
49        'hostel_maintenance': 'Hostel Maintenance Fee',
50        'application': 'Application Fee',
[15041]51        'ict_entre': 'ICT and Entrepreneur Fee',
[15013]52        'logbook_combo': 'Logbook Combo Fee',
[15015]53        'siwess_combo': 'SIWESS Combo Fee',
54        'transcript': 'Transcript Fee',
55        'certificate': 'Certificate Fee',
[15071]56        'certificate_confirm': 'Certificate Confirmation Fee',
57        'late_registration': 'Late Course Registration Fee',
58        'final_clearance': 'Final Clearance Fee',
[15105]59        'union': 'Student Union Dues',
[15123]60        'admission_checking': 'Admission Checking Fee',
[15183]61        'medical': 'Medical Fee',
[15223]62        'conv_nd': 'ND Convocation Fee',
63        'conv_hnd': 'HND Convocation Fee',
[15525]64        'nhis': 'Student NHIS',
[15655]65        'coc': 'Change of Course Fee',
66        'damages': 'Damages Fee',
67        'project_bind': 'Project Binding Fee',
[15011]68        }
69
[15218]70    SELECTABLE_PAYMENT_CATEGORIES = {
71        'schoolfee': 'Tuition/Exams Fee',
72        'clearance': 'Acceptance Fee',
73        'bed_allocation': 'Accommodation Booking Fee',
74        'hostel_maintenance': 'Hostel Maintenance Fee',
75        'application': 'Application Fee',
76        'ict_entre': 'ICT and Entrepreneur Fee',
77        'logbook_combo': 'Logbook Combo Fee',
78        'siwess_combo': 'SIWESS Combo Fee',
79        'transcript': 'Transcript Fee',
80        'certificate': 'Certificate Fee',
81        'certificate_confirm': 'Certificate Confirmation Fee',
82        'late_registration': 'Late Course Registration Fee',
83        'final_clearance': 'Final Clearance Fee',
84        'union': 'Student Union Dues',
85        'admission_checking': 'Admission Checking Fee',
86        'medical': 'Medical Fee',
[15223]87        'conv_nd': 'ND Convocation Fee',
88        'conv_hnd': 'HND Convocation Fee',
[15525]89        'nhis': 'Student NHIS',
[15655]90        'coc': 'Change of Course Fee',
91        'damages': 'Damages Fee',
92        'project_bind': 'Project Binding Fee',
[15218]93        }
[15441]94
95    def selectable_payment_categories(self, student):
[15445]96        spc = deepcopy(self.SELECTABLE_PAYMENT_CATEGORIES)
[15442]97        if not student.is_fresh:
98            del spc['application']
99            del spc['admission_checking']
100            del spc['clearance']
101        return spc
[15441]102
[15193]103    PREVIOUS_PAYMENT_CATEGORIES = deepcopy(SELECTABLE_PAYMENT_CATEGORIES)
104
[15028]105    BALANCE_PAYMENT_CATEGORIES = {
[15105]106        'schoolfee': 'Tuition/Exams Fee',
[15041]107        'ict_entre': 'ICT and Entrepreneur Fee',
[15071]108        'certificate_confirm': 'Certificate Confirmation Fee',
109        'final_clearance': 'Final Clearance Fee',
[15034]110        }
111
112    REPORTABLE_PAYMENT_CATEGORIES = {
[15082]113        'schoolfee': 'Tuition Exams Fee',
114        'clearance': 'Accept. Fee',
115        'hostel_maintenance': 'Hostel Maint. Fee',
116        'ict_entre': 'ICT Entrepr. Fee',
[15034]117        'logbook_combo': 'Logbook Combo Fee',
118        'siwess_combo': 'SIWESS Combo Fee',
[15082]119        'certificate': 'Cert. Fee',
120        'certificate_confirm': 'Cert. Confirm. Fee',
121        'late_registration': 'Late Course Registr. Fee',
[15071]122        'final_clearance': 'Final Clearance Fee',
[15105]123        'union': 'Student Union Dues',
[15183]124        'medical': 'Medical Fee',
[15069]125        }
126
[15218]127    SPECIAL_APP_DICT = {
128        'conv_nd': 'Convocation ND',
129        'conv_hnd': 'Convocation HND',
130        }
131
[15069]132    STUDY_MODES_DICT = {
[15073]133        'ug_ft': 'Undergraduate Full Time (not used in EdoPoly)',
[15109]134        'nd_ft': 'National Diploma Full-Time',
135        'nd_pt': 'National Diploma Part-Time',
136        'nd_we': 'National Diploma Weekend',
137        'hnd_ft': 'Higher National Diploma Full-Time',
138        'hnd_pt': 'Higher National Diploma Part-Time',
139        'hnd_we': 'Higher National Diploma Weekend',
[15103]140        'ct': 'Certificate',
[15093]141        'pre': 'Pre-Degree',
[15069]142        'transfer': 'Transfer',
143        'no': 'no application',
144        }
145
146    MODE_GROUPS = {
147        'All': ('all',),
[15073]148        'Undergraduate Full-Time': ('hnd_ft', 'nd_ft'),
149        'Undergraduate Part-Time': ('hnd_pt', 'nd_pt'),
150        #'Postgraduate Full-Time': ('pg_ft',),
151        #'Postgraduate Part-Time': ('pg_pt',),
[15069]152        }
Note: See TracBrowser for help on using the repository browser.