source: main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py @ 14259

Last change on this file since 14259 was 14258, checked in by Henrik Bettermann, 8 years ago

Configure GST , ENT and Fac. Dep. Fees.

  • Property svn:keywords set to Id
File size: 8.4 KB
RevLine 
[7569]1## $Id: utils.py 14258 2016-11-05 04:33:57Z 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##
[7822]18"""Customize general helper utilities for Kofa.
[7569]19"""
[13963]20
21import string
[8823]22from kofacustom.nigeria.utils.utils import NigeriaKofaUtils
[7569]23
[8823]24class CustomKofaUtils(NigeriaKofaUtils):
[7569]25    """A collection of methods subject to customization.
26    """
[7845]27
28    PREFERRED_LANGUAGES_DICT = {
[9755]29        }
30
31    PAYMENT_CATEGORIES = {
32        'schoolfee': 'School Fee',
[13512]33        'schoolfee_1': 'School Fee Plus (1st instalment)',
34        'schoolfee_2': 'School Fee (2nd instalment)',
[13410]35        'schoolfee_incl': 'School Fee Plus',
[9755]36        'clearance': 'Acceptance Fee',
[13410]37        'clearance_incl': 'Acceptance Fee Plus',
[13424]38        'hostel_maintenance': 'Hostel Accommodation Fee',
[9755]39        'application': 'Application Fee',
40        'bed_allocation': 'Bed Allocation Fee',
41        'transfer': 'Transfer Fee',
[10467]42        'transcript': 'Transcript Fee',
[13035]43        'late_registration': 'Late Course Registration Fee',
[13402]44        'welfare': 'Student Welfare Assurance Fee',
[13463]45        'union': 'Student Union Dues',
[13402]46        'lapel': 'Lapel/File Fee',
[13374]47        'matric_gown': 'Matriculation Gown Fee',
48        'concessional': 'Concessional Fee',
[14234]49        'id_card': 'Student ID Card',
[14258]50        'gst_text_book_1': 'Text Book Fee GST101 GST102',
51        'gst_text_book_2': 'Text Book Fee GST111 GST112',
52        'gst_text_book_3': 'Text Book Fee GST222',
53        'ent_text_book_4': 'Text Book Fee ENT201',
54        'gst_registration_1': 'Registration Fee GST101 GST102 GST111 GST112',
55        'gst_registration_2': 'Registration Fee GST222',
56        'ent_registration_3': 'Registration Fee ENT201',
[14248]57        'fac_dep': 'Faculty and Departmental Dues',
[9755]58        }
59
60    SELECTABLE_PAYMENT_CATEGORIES = {
[13435]61        'schoolfee': 'School Fee without additional fees',
[13512]62        'schoolfee_1': 'School Fee (1st instalment) + Student Union Dues + Welfare Assurance Fee',
63        'schoolfee_2': 'School Fee (2nd instalment)',
[13463]64        'schoolfee_incl': 'School Fee + Student Union Dues + Welfare Assurance Fee',
[13435]65        'clearance': 'Acceptance Fee without additional fees',
[14239]66        'clearance_incl': 'Acceptance Fee + Matric Gown Fee + Lapel/File Fee',
[13454]67        'hostel_maintenance': 'Hostel Accommodation Fee',
[14243]68        #'application': 'Application Fee',
[11621]69        #'bed_allocation': 'Bed Allocation Fee',
70        #'transfer': 'Transfer Fee',
[10468]71        'transcript': 'Transcript Fee',
[13035]72        'late_registration': 'Late Course Registration Fee',
[14243]73        #'welfare': 'Student Welfare Assurance Fee',
74        #'union': 'Student Union Dues',
75        #'lapel': 'Lapel/File Fee',
76        #'matric_gown': 'Matriculation Gown Fee',
[13374]77        'concessional': 'Concessional Fee',
[14243]78        #'id_card': 'Student ID Card',
[14258]79        'gst_text_book_1': 'Text Book Fee GST101 GST102',
80        'gst_text_book_2': 'Text Book Fee GST111 GST112',
81        'gst_text_book_3': 'Text Book Fee GST222',
82        'ent_text_book_4': 'Text Book Fee ENT201',
83        'gst_registration_1': 'Registration Fee GST101 GST102 GST111 GST112',
84        'gst_registration_2': 'Registration Fee GST222',
85        'ent_registration_3': 'Registration Fee ENT201',
[14248]86        'fac_dep': 'Faculty and Departmental Dues',
[9755]87        }
88
[13451]89    REPORTABLE_PAYMENT_CATEGORIES = {
90        'schoolfee': 'School Fee',
[13452]91        'schoolfee_incl': 'School Fee Plus',
[13635]92        'schoolfee_1': 'School Fee 1 Plus',
93        'schoolfee_2': 'School Fee 2',
[13451]94        'clearance': 'Acceptance Fee',
[13452]95        'clearance_incl': 'Acceptance Fee Plus',
[13451]96        'hostel_maintenance': 'Hostel Maintenance Fee',
97        }
98
[13638]99    BALANCE_PAYMENT_CATEGORIES = {
100        'schoolfee': 'School Fee',
101        'clearance': 'Acceptance Fee',
102        'hostel_maintenance': 'Hostel Maintenance Fee',
[13750]103        'late_registration': 'Late Course Registration Fee',
104        'welfare': 'Student Welfare Assurance Fee',
105        'union': 'Student Union Dues',
106        'lapel': 'Lapel/File Fee',
107        'matric_gown': 'Matriculation Gown Fee',
[14234]108        'id_card': 'Student ID Card',
[14258]109        'gst_text_book_1': 'Text Book Fee GST101 GST102',
110        'gst_text_book_2': 'Text Book Fee GST111 GST112',
111        'gst_text_book_3': 'Text Book Fee GST222',
112        'ent_text_book_4': 'Text Book Fee ENT201',
113        'gst_registration_1': 'Registration Fee GST101 GST102 GST111 GST112',
114        'gst_registration_2': 'Registration Fee GST222',
115        'ent_registration_3': 'Registration Fee ENT201',
[14248]116        'fac_dep': 'Faculty and Departmental Dues',
[13638]117        }
118
[10304]119    APP_CATS_DICT = {
120        'basic': 'PUTME, PUDE, PCE, PRENCE',
121        'no': 'No Application',
122        'pg_ft': 'Postgraduate Full-Time',
123        'pg_pt': 'Postgraduate Part-Time',
124        'cest': 'Part-Time, Diploma, Certificate',
125        'found': 'Foundation',
[10893]126        'ptee': 'Part-Time Entrance Examination',
[13568]127        'ioe_dp': 'Institute of Education Diploma',
[10304]128        }
129
[11591]130    STUDY_MODES_DICT = {
131        'ug_ft': 'Undergraduate Full Time',
132        'ug_pt': 'Undergraduate Part Time',
[11593]133        'de_ft': 'Direct Entry Full Time',
134        'de_pt': 'Direct Entry Part Time',
[11591]135        'dp_pt': 'Diploma Part Time',
136        'dp_ft': 'Diploma Full Time',
[13524]137        'special_pg_ft': 'Postgraduate Full Time',
138        'special_pg_pt': 'Postgraduate Part Time',
[11591]139        'found': 'Foundation',
[13498]140        'transfer': 'Transfer',
[13749]141        'mug_ft': 'Undergraduate Full Time Merit List',
142        'mde_ft': 'Direct Entry Full Time Merit List',
[11591]143        }
144
[13127]145    VERDICTS_DICT = {
146        '0': 'not yet',
147        'A': 'Successful student',
148        'B': 'Student with carryover courses',
149        'C': 'Student on probation',
150        #'D': 'Withdrawn from the faculty',
151        #'E': 'Student who were previously on probation',
152        #'F': 'Medical case',
153        #'G': 'Absent from examination',
154        #'H': 'Withheld results',
155        #'I': 'Expelled/rusticated/suspended student',
156        #'J': 'Temporary withdrawn from the university',
157        #'K': 'Unregistered student',
158        #'L': 'Referred student',
159        #'M': 'Reinstatement',
160        #'N': 'Student on transfer',
161        #'O': 'NCE-III repeater',
162        #'Y': 'No previous verdict',
163        #'X': 'New 300 level student',
164        'Z': 'Successful student (provisional)',
165        #'A1': 'First Class',
166        #'A2': 'Second Class Upper',
167        #'A3': 'Second Class Lower',
168        #'A4': 'Third Class',
169        #'A5': 'Pass',
170        #'A6': 'Distinction',
171        #'A7': 'Credit',
172        #'A8': 'Merit',
173        'NEOR': 'No evidence of registration',
174        'NEOV': 'No evidence of verification',
175        'FRNS': 'Faculty requirements not satisfied',
176        }
[13454]177
178    DISABLE_PAYMENT_GROUP_DICT = {
179        'sf_all': 'School Fee - All Students',
[14246]180        'sf_pg': 'School Fee - Postgraduate Students',
181        'sf_pt': 'School Fee - Part-Time Students',
182        'sf_found': 'School Fee - Foundation Students',
[13454]183        'maint_all': 'Accommodation Fee - All Students',
[13794]184        'cl_regular': 'Acceptance Fee - Regular Students',
[13454]185        }
[13870]186
187    MODE_GROUPS = {
188        'All': ('all',),
189        'Undergraduate Full-Time': ('ug_ft', 'mde_ft', 'mug_ft', 'de_ft'),
190        'Undergraduate Part-Time': ('ug_pt', 'de_pt'),
191        'Postgraduate': ('pg_ft','special_pg_ft', 'special_pg_pt'),
192        'Foundation Programme': ('found',),
193        'Institute of Education': ('dp_ft'),
194        }
[13963]195
196    def fullname(self, firstname, lastname, middlename=None):
197        """Construct fullname.
198        """
199        try:
200            lastname = lastname.upper()
201        except AttributeError:
202            pass
203        # We do not necessarily have the middlename attribute
204        if middlename:
205            givennames = '%s %s' % (firstname, middlename)
206        else:
207            givennames = '%s' % firstname
208        givennames = string.capwords(
209            givennames.replace('-', ' - ')).replace(' - ', '-')
210        fullname = '%s, %s' % (lastname, givennames)
211        if '<' in fullname:
212            return 'XXX'
213        return fullname
Note: See TracBrowser for help on using the repository browser.