[10765] | 1 | ## $Id: utils.py 16233 2020-09-10 09:33:13Z 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 | |
---|
| 21 | from copy import deepcopy |
---|
[10765] | 22 | from kofacustom.nigeria.utils.utils import NigeriaKofaUtils |
---|
| 23 | |
---|
| 24 | class CustomKofaUtils(NigeriaKofaUtils): |
---|
| 25 | """A collection of methods subject to customization. |
---|
| 26 | """ |
---|
| 27 | |
---|
[15645] | 28 | PAYMENT_CATEGORIES = { |
---|
[15663] | 29 | 'schoolfee': 'Tuition Plus (total amount)', |
---|
| 30 | 'schoolfee40': 'Tuition Plus (40% - 1st instalment)', |
---|
[15773] | 31 | 'secondinstal': 'Tuition Plus (60% - 2nd instalment)', |
---|
[15645] | 32 | 'clearance': 'Acceptance Fee', |
---|
[16212] | 33 | 'grad_clearance': 'Clearance Fee', |
---|
[15728] | 34 | 'registration': 'Registration Fee', |
---|
[15661] | 35 | #'bed_allocation': 'Bed Allocation Fee', |
---|
| 36 | #'hostel_maintenance': 'Accommodation', |
---|
[15645] | 37 | #'transfer': 'Transfer Fee', |
---|
| 38 | #'gown': 'Gown Hire Fee', |
---|
| 39 | 'application': 'Application Fee', |
---|
| 40 | 'app_balance': 'Application Fee Balance', |
---|
[16142] | 41 | 'transcript': 'Transcript Fee', |
---|
[15789] | 42 | 'transcript_local': 'Transcript Fee Local', |
---|
| 43 | 'transcript_overseas': 'Transcript Fee Oversea', |
---|
[15645] | 44 | 'late_registration': 'Late Registration Fee', |
---|
| 45 | 'science': 'Science Bench Fee', |
---|
| 46 | 'clinical': 'Clinical Fee (Medical Students)', |
---|
| 47 | 'develop': 'Development Fee', |
---|
[16223] | 48 | 'municipal_fresh': 'Municipal Fee (Fresh Students)', |
---|
| 49 | 'municipal_returning': 'Municipal Fee (Returning Students)', |
---|
[15645] | 50 | 'alumni': 'Alumni Fee', |
---|
| 51 | 'conv': 'Convocation Fee', |
---|
| 52 | 'matric': 'Matriculation Fee', |
---|
[16168] | 53 | 'waecneco': 'WAEC and NECO Verification', |
---|
[15645] | 54 | 'jambver': 'JAMB Verification', |
---|
| 55 | 'book': 'Book Deposit', |
---|
| 56 | 'parentsconsult': 'Parents Consultative Forum (PCF) Fee', |
---|
| 57 | 'pharmlab': 'Pharmacy Lab Support Fee', |
---|
[15736] | 58 | 'lo_ident': 'Letter of Identification Fee', |
---|
| 59 | 'change_course': 'Change of Course Fee', |
---|
| 60 | 'make_up': 'Make-up Fee', |
---|
| 61 | 'iuits': 'IUITS Fee', |
---|
| 62 | 'fine': 'Fine', |
---|
[15686] | 63 | 'combi': 'Combi Payment', |
---|
[15937] | 64 | 'resit1': '1 Make-Up Examination Course', |
---|
| 65 | 'resit2': '2 Make-Up Examination Courses', |
---|
| 66 | 'resit3': '3 Make-Up Examination Courses', |
---|
| 67 | 'resit4': '4 Make-Up Examination Courses', |
---|
| 68 | 'resit5': '5 Make-Up Examination Courses', |
---|
| 69 | 'resit6': '6 Make-Up Examination Course', |
---|
| 70 | 'resit7': '7 Make-Up Examination Courses', |
---|
| 71 | 'resit8': '8 Make-Up Examination Courses', |
---|
| 72 | 'resit9': '9 Make-Up Examination Courses', |
---|
[16111] | 73 | 'id_card': 'Student ID Card', |
---|
[16222] | 74 | 'required_combi': 'Required Combi Payment', |
---|
[16233] | 75 | 'pg_other': 'PG Other Charges', |
---|
[15645] | 76 | } |
---|
| 77 | |
---|
| 78 | SELECTABLE_PAYMENT_CATEGORIES = { |
---|
[16233] | 79 | 'schoolfee': 'Tuition Plus (total amount)', |
---|
| 80 | 'schoolfee40': 'Tuition Plus (40% - 1st instalment)', |
---|
| 81 | 'secondinstal': 'Tuition Plus (60% - 2nd instalment)', |
---|
[15728] | 82 | 'registration': 'Registration Fee', |
---|
[16208] | 83 | 'clearance': 'Acceptance Fee', |
---|
[16212] | 84 | 'grad_clearance': 'Clearance Fee', |
---|
[15645] | 85 | #'bed_allocation': 'Bed Allocation Fee', |
---|
[15661] | 86 | #'hostel_maintenance': 'Accommodation', |
---|
[15645] | 87 | #'transfer': 'Transfer Fee', |
---|
| 88 | #'gown': 'Gown Hire Fee', |
---|
[15783] | 89 | #'application': 'Application Fee', |
---|
[15645] | 90 | #'app_balance': 'Application Fee Balance', |
---|
[15789] | 91 | 'transcript_local': 'Transcript Fee (Local Students)', |
---|
| 92 | 'transcript_overseas': 'Transcript Fee (Oversea Students)', |
---|
[15645] | 93 | 'late_registration': 'Late Registration Fee', |
---|
| 94 | 'science': 'Science Bench Fee', |
---|
| 95 | 'clinical': 'Clinical Fee (Medical Students)', |
---|
| 96 | 'develop': 'Development Fee', |
---|
[15789] | 97 | 'municipal_fresh': 'Municipal Fee (Fresh Students)', |
---|
| 98 | 'municipal_returning': 'Municipal Fee (Returning Students)', |
---|
[15645] | 99 | 'alumni': 'Alumni Fee', |
---|
| 100 | 'conv': 'Convocation Fee', |
---|
| 101 | 'matric': 'Matriculation Fee', |
---|
[16168] | 102 | 'waecneco': 'WAEC and NECO Verification', |
---|
[15645] | 103 | 'jambver': 'JAMB Verification', |
---|
| 104 | 'book': 'Book Deposit', |
---|
| 105 | 'parentsconsult': 'Parents Consultative Forum (PCF) Fee', |
---|
| 106 | 'pharmlab': 'Pharmacy Lab Support Fee', |
---|
[15736] | 107 | 'lo_ident': 'Letter of Identification Fee', |
---|
| 108 | 'change_course': 'Change of Course Fee', |
---|
[15937] | 109 | #'make_up': 'Make-up Fee', |
---|
[15736] | 110 | 'iuits': 'IUITS Fee', |
---|
| 111 | 'fine': 'Fine', |
---|
[15781] | 112 | 'combi': 'Combi Payment', |
---|
[15937] | 113 | 'resit1': '1 Make-Up Examination Course', |
---|
| 114 | 'resit2': '2 Make-Up Examination Courses', |
---|
| 115 | 'resit3': '3 Make-Up Examination Courses', |
---|
| 116 | 'resit4': '4 Make-Up Examination Courses', |
---|
| 117 | 'resit5': '5 Make-Up Examination Courses', |
---|
| 118 | 'resit6': '6 Make-Up Examination Course', |
---|
| 119 | 'resit7': '7 Make-Up Examination Courses', |
---|
| 120 | 'resit8': '8 Make-Up Examination Courses', |
---|
| 121 | 'resit9': '9 Make-Up Examination Courses', |
---|
[16111] | 122 | 'id_card': 'Student ID Card', |
---|
[16222] | 123 | 'required_combi': 'Required Combi Payment', |
---|
[16233] | 124 | 'pg_other': 'PG Other Charges', |
---|
[15645] | 125 | } |
---|
| 126 | |
---|
[15661] | 127 | PREVIOUS_PAYMENT_CATEGORIES = { |
---|
[16233] | 128 | 'schoolfee': 'Tuition, Accommodation, Adm. Charges', |
---|
[15728] | 129 | 'registration': 'Registration Fee', |
---|
[16208] | 130 | 'clearance': 'Acceptance Fee', |
---|
[16212] | 131 | 'grad_clearance': 'Clearance Fee', |
---|
[15661] | 132 | 'application': 'Application Fee', |
---|
| 133 | 'late_registration': 'Late Registration Fee', |
---|
| 134 | 'science': 'Science Bench Fee', |
---|
| 135 | 'clinical': 'Clinical Fee (Medical Students)', |
---|
| 136 | 'develop': 'Development Fee', |
---|
[15789] | 137 | 'municipal_fresh': 'Municipal Fee (Fresh Students)', |
---|
| 138 | 'municipal_returning': 'Municipal Fee (Returning Students)', |
---|
[15661] | 139 | 'alumni': 'Alumni Fee', |
---|
| 140 | 'conv': 'Convocation Fee', |
---|
| 141 | 'matric': 'Matriculation Fee', |
---|
[16168] | 142 | 'waecneco': 'WAEC and NECO Verification', |
---|
[15661] | 143 | 'jambver': 'JAMB Verification', |
---|
| 144 | 'book': 'Book Deposit', |
---|
| 145 | 'parentsconsult': 'Parents Consultative Forum (PCF) Fee', |
---|
| 146 | 'pharmlab': 'Pharmacy Lab Support Fee', |
---|
[15736] | 147 | 'lo_ident': 'Letter of Identification Fee', |
---|
| 148 | 'change_course': 'Change of Course Fee', |
---|
| 149 | 'make_up': 'Make-up Fee', |
---|
| 150 | 'iuits': 'IUITS Fee', |
---|
| 151 | 'fine': 'Fine', |
---|
[16111] | 152 | 'id_card': 'Student ID Card', |
---|
[16233] | 153 | 'pg_other': 'PG Other Charges', |
---|
[15675] | 154 | } |
---|
| 155 | |
---|
| 156 | COMBI_PAYMENT_CATEGORIES = { |
---|
[16222] | 157 | #'registration': 'Registration Fee', |
---|
[16212] | 158 | 'grad_clearance': 'Clearance Fee', |
---|
[15675] | 159 | 'late_registration': 'Late Registration Fee', |
---|
| 160 | 'science': 'Science Bench Fee', |
---|
| 161 | 'clinical': 'Clinical Fee (Medical Students)', |
---|
[16222] | 162 | #'develop': 'Development Fee', |
---|
| 163 | #'municipal_fresh': 'Municipal Fee (Fresh Students)', |
---|
| 164 | #'municipal_returning': 'Municipal Fee (Returning Students)', |
---|
[15675] | 165 | 'alumni': 'Alumni Fee', |
---|
| 166 | 'conv': 'Convocation Fee', |
---|
| 167 | 'matric': 'Matriculation Fee', |
---|
[16168] | 168 | 'waecneco': 'WAEC and NECO Verification', |
---|
[15675] | 169 | 'jambver': 'JAMB Verification', |
---|
[16222] | 170 | #'book': 'Book Deposit', |
---|
| 171 | #'parentsconsult': 'Parents Consultative Forum (PCF) Fee', |
---|
[15675] | 172 | 'pharmlab': 'Pharmacy Lab Support Fee', |
---|
[15736] | 173 | 'lo_ident': 'Letter of Identification Fee', |
---|
| 174 | 'change_course': 'Change of Course Fee', |
---|
| 175 | 'make_up': 'Make-up Fee', |
---|
| 176 | 'iuits': 'IUITS Fee', |
---|
| 177 | 'fine': 'Fine', |
---|
[16111] | 178 | 'id_card': 'Student ID Card', |
---|
[16233] | 179 | 'pg_other': 'PG Other Charges', |
---|
[15738] | 180 | } |
---|
| 181 | |
---|
[16015] | 182 | BALANCE_PAYMENT_CATEGORIES = { |
---|
[16233] | 183 | 'schoolfee': 'Tuition, Accommodation, Adm. Charges', |
---|
[16015] | 184 | } |
---|
| 185 | |
---|
[15738] | 186 | APP_CATS_DICT = { |
---|
| 187 | 'basic': 'UAS, PUTME, PUDE, PCE, PRENCE', |
---|
| 188 | 'no': 'No Application', |
---|
[15858] | 189 | 'pg': 'Postgraduate Programmes', |
---|
[16092] | 190 | 'pg2': 'Postgraduate Programmes 2', |
---|
[15738] | 191 | 'pre': 'Pre-Degree Studies', |
---|
[15809] | 192 | 'pt': 'Part-Time Degree Programmes', |
---|
[15858] | 193 | 'ut': 'Undergraduate Programmes', |
---|
[15738] | 194 | } |
---|
[15877] | 195 | |
---|
| 196 | #: Maximum size in Bytes of passport images in the applicants and |
---|
| 197 | #: students section |
---|
[16048] | 198 | MAX_PASSPORT_SIZE = 250 * 1024 |
---|