[10765] | 1 | ## $Id: utils.py 17436 2023-06-18 20:11:00Z 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', |
---|
[16747] | 40 | 'pg_application': 'PG Application Fee', |
---|
[15645] | 41 | 'app_balance': 'Application Fee Balance', |
---|
[16142] | 42 | 'transcript': 'Transcript Fee', |
---|
[15789] | 43 | 'transcript_local': 'Transcript Fee Local', |
---|
| 44 | 'transcript_overseas': 'Transcript Fee Oversea', |
---|
[15645] | 45 | 'late_registration': 'Late Registration Fee', |
---|
| 46 | 'science': 'Science Bench Fee', |
---|
| 47 | 'clinical': 'Clinical Fee (Medical Students)', |
---|
| 48 | 'develop': 'Development Fee', |
---|
[16223] | 49 | 'municipal_fresh': 'Municipal Fee (Fresh Students)', |
---|
| 50 | 'municipal_returning': 'Municipal Fee (Returning Students)', |
---|
[15645] | 51 | 'alumni': 'Alumni Fee', |
---|
| 52 | 'conv': 'Convocation Fee', |
---|
| 53 | 'matric': 'Matriculation Fee', |
---|
[16305] | 54 | 'waecneco': 'WAEC/NECO Verification', |
---|
[15645] | 55 | 'jambver': 'JAMB Verification', |
---|
| 56 | 'book': 'Book Deposit', |
---|
| 57 | 'parentsconsult': 'Parents Consultative Forum (PCF) Fee', |
---|
| 58 | 'pharmlab': 'Pharmacy Lab Support Fee', |
---|
[15736] | 59 | 'lo_ident': 'Letter of Identification Fee', |
---|
| 60 | 'change_course': 'Change of Course Fee', |
---|
| 61 | 'make_up': 'Make-up Fee', |
---|
| 62 | 'iuits': 'IUITS Fee', |
---|
| 63 | 'fine': 'Fine', |
---|
[15686] | 64 | 'combi': 'Combi Payment', |
---|
[15937] | 65 | 'resit1': '1 Make-Up Examination Course', |
---|
| 66 | 'resit2': '2 Make-Up Examination Courses', |
---|
| 67 | 'resit3': '3 Make-Up Examination Courses', |
---|
| 68 | 'resit4': '4 Make-Up Examination Courses', |
---|
| 69 | 'resit5': '5 Make-Up Examination Courses', |
---|
| 70 | 'resit6': '6 Make-Up Examination Course', |
---|
| 71 | 'resit7': '7 Make-Up Examination Courses', |
---|
| 72 | 'resit8': '8 Make-Up Examination Courses', |
---|
| 73 | 'resit9': '9 Make-Up Examination Courses', |
---|
[16575] | 74 | 'makeup_admin': 'Make-Up Registration Fee', |
---|
[16111] | 75 | 'id_card': 'Student ID Card', |
---|
[16222] | 76 | 'required_combi': 'Required Combi Payment', |
---|
[16233] | 77 | 'pg_other': 'PG Other Charges', |
---|
[16395] | 78 | 'jupeb_form':'JUPEB Form Fee', |
---|
| 79 | 'jupeb_acc':'JUPEB Acceptance Fee', |
---|
[16585] | 80 | 'jupeb_reg':'JUPEB Administrative Fee', |
---|
[16687] | 81 | 'jupeb_sci':'JUPEB Tuition (Science)', |
---|
| 82 | 'jupeb_arts':'JUPEB Tuition (Arts)', |
---|
| 83 | 'jupeb_hostel':'JUPEB Accommodation (optional)', |
---|
[16630] | 84 | 'brought_fwd': 'Balance Brought Forward', |
---|
[17436] | 85 | 'health_insurance': 'Student Health Insurance', |
---|
[15645] | 86 | } |
---|
| 87 | |
---|
| 88 | SELECTABLE_PAYMENT_CATEGORIES = { |
---|
[16233] | 89 | 'schoolfee': 'Tuition Plus (total amount)', |
---|
| 90 | 'schoolfee40': 'Tuition Plus (40% - 1st instalment)', |
---|
| 91 | 'secondinstal': 'Tuition Plus (60% - 2nd instalment)', |
---|
[15728] | 92 | 'registration': 'Registration Fee', |
---|
[16208] | 93 | 'clearance': 'Acceptance Fee', |
---|
[16212] | 94 | 'grad_clearance': 'Clearance Fee', |
---|
[15645] | 95 | #'bed_allocation': 'Bed Allocation Fee', |
---|
[15661] | 96 | #'hostel_maintenance': 'Accommodation', |
---|
[15645] | 97 | #'transfer': 'Transfer Fee', |
---|
| 98 | #'gown': 'Gown Hire Fee', |
---|
[16394] | 99 | 'application': 'Application Fee', |
---|
[16747] | 100 | 'pg_application': 'PG Application Fee', |
---|
[15645] | 101 | #'app_balance': 'Application Fee Balance', |
---|
[15789] | 102 | 'transcript_local': 'Transcript Fee (Local Students)', |
---|
| 103 | 'transcript_overseas': 'Transcript Fee (Oversea Students)', |
---|
[15645] | 104 | 'late_registration': 'Late Registration Fee', |
---|
| 105 | 'science': 'Science Bench Fee', |
---|
| 106 | 'clinical': 'Clinical Fee (Medical Students)', |
---|
| 107 | 'develop': 'Development Fee', |
---|
[15789] | 108 | 'municipal_fresh': 'Municipal Fee (Fresh Students)', |
---|
| 109 | 'municipal_returning': 'Municipal Fee (Returning Students)', |
---|
[15645] | 110 | 'alumni': 'Alumni Fee', |
---|
| 111 | 'conv': 'Convocation Fee', |
---|
| 112 | 'matric': 'Matriculation Fee', |
---|
[16305] | 113 | 'waecneco': 'WAEC/NECO Verification', |
---|
[15645] | 114 | 'jambver': 'JAMB Verification', |
---|
| 115 | 'book': 'Book Deposit', |
---|
| 116 | 'parentsconsult': 'Parents Consultative Forum (PCF) Fee', |
---|
| 117 | 'pharmlab': 'Pharmacy Lab Support Fee', |
---|
[15736] | 118 | 'lo_ident': 'Letter of Identification Fee', |
---|
| 119 | 'change_course': 'Change of Course Fee', |
---|
[15937] | 120 | #'make_up': 'Make-up Fee', |
---|
[15736] | 121 | 'iuits': 'IUITS Fee', |
---|
| 122 | 'fine': 'Fine', |
---|
[15781] | 123 | 'combi': 'Combi Payment', |
---|
[15937] | 124 | 'resit1': '1 Make-Up Examination Course', |
---|
| 125 | 'resit2': '2 Make-Up Examination Courses', |
---|
| 126 | 'resit3': '3 Make-Up Examination Courses', |
---|
| 127 | 'resit4': '4 Make-Up Examination Courses', |
---|
| 128 | 'resit5': '5 Make-Up Examination Courses', |
---|
| 129 | 'resit6': '6 Make-Up Examination Course', |
---|
| 130 | 'resit7': '7 Make-Up Examination Courses', |
---|
| 131 | 'resit8': '8 Make-Up Examination Courses', |
---|
| 132 | 'resit9': '9 Make-Up Examination Courses', |
---|
[16575] | 133 | 'makeup_admin': 'Make-Up Registration Fee', |
---|
[16111] | 134 | 'id_card': 'Student ID Card', |
---|
[16222] | 135 | 'required_combi': 'Required Combi Payment', |
---|
[16233] | 136 | 'pg_other': 'PG Other Charges', |
---|
[16687] | 137 | #'jupeb_form':'JUPEB Form Fee', |
---|
| 138 | #'jupeb_acc':'JUPEB Acceptance Fee', |
---|
| 139 | #'jupeb_reg':'JUPEB Administrative Fee', |
---|
| 140 | 'jupeb_sci':'JUPEB Tuition (Science)', |
---|
| 141 | 'jupeb_arts':'JUPEB Tuition (Arts)', |
---|
| 142 | 'jupeb_hostel':'JUPEB Accommodation (optional)', |
---|
[17436] | 143 | 'health_insurance': 'Student Health Insurance', |
---|
[15645] | 144 | } |
---|
| 145 | |
---|
[16576] | 146 | def selectable_payment_categories(self, student): |
---|
[17126] | 147 | spc = deepcopy(self.SELECTABLE_PAYMENT_CATEGORIES) |
---|
| 148 | if student.depcode == 'BMS': |
---|
| 149 | del spc['schoolfee40'] |
---|
| 150 | del spc['secondinstal'] |
---|
| 151 | return spc |
---|
[16576] | 152 | |
---|
[15661] | 153 | PREVIOUS_PAYMENT_CATEGORIES = { |
---|
[16233] | 154 | 'schoolfee': 'Tuition, Accommodation, Adm. Charges', |
---|
[15728] | 155 | 'registration': 'Registration Fee', |
---|
[16208] | 156 | 'clearance': 'Acceptance Fee', |
---|
[16212] | 157 | 'grad_clearance': 'Clearance Fee', |
---|
[15661] | 158 | 'application': 'Application Fee', |
---|
| 159 | 'late_registration': 'Late Registration Fee', |
---|
| 160 | 'science': 'Science Bench Fee', |
---|
| 161 | 'clinical': 'Clinical Fee (Medical Students)', |
---|
| 162 | 'develop': 'Development Fee', |
---|
[15789] | 163 | 'municipal_fresh': 'Municipal Fee (Fresh Students)', |
---|
| 164 | 'municipal_returning': 'Municipal Fee (Returning Students)', |
---|
[15661] | 165 | 'alumni': 'Alumni Fee', |
---|
| 166 | 'conv': 'Convocation Fee', |
---|
| 167 | 'matric': 'Matriculation Fee', |
---|
[16305] | 168 | 'waecneco': 'WAEC/NECO Verification', |
---|
[15661] | 169 | 'jambver': 'JAMB Verification', |
---|
| 170 | 'book': 'Book Deposit', |
---|
| 171 | 'parentsconsult': 'Parents Consultative Forum (PCF) Fee', |
---|
| 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', |
---|
[16258] | 179 | 'required_combi': 'Required Combi Payment', |
---|
[16233] | 180 | 'pg_other': 'PG Other Charges', |
---|
[16687] | 181 | #'jupeb_form':'JUPEB Form Fee', |
---|
| 182 | #'jupeb_acc':'JUPEB Acceptance Fee', |
---|
| 183 | #'jupeb_reg':'JUPEB Administrative Fee', |
---|
| 184 | 'jupeb_sci':'JUPEB Tuition (Science)', |
---|
| 185 | 'jupeb_arts':'JUPEB Tuition (Arts)', |
---|
| 186 | 'jupeb_hostel':'JUPEB Accommodation (optional)', |
---|
[15675] | 187 | } |
---|
| 188 | |
---|
| 189 | COMBI_PAYMENT_CATEGORIES = { |
---|
[16284] | 190 | 'registration': 'Registration Fee', |
---|
[16212] | 191 | 'grad_clearance': 'Clearance Fee', |
---|
[15675] | 192 | 'late_registration': 'Late Registration Fee', |
---|
| 193 | 'science': 'Science Bench Fee', |
---|
| 194 | 'clinical': 'Clinical Fee (Medical Students)', |
---|
[16284] | 195 | 'develop': 'Development Fee', |
---|
| 196 | 'municipal_fresh': 'Municipal Fee (Fresh Students)', |
---|
| 197 | 'municipal_returning': 'Municipal Fee (Returning Students)', |
---|
[15675] | 198 | 'alumni': 'Alumni Fee', |
---|
| 199 | 'conv': 'Convocation Fee', |
---|
| 200 | 'matric': 'Matriculation Fee', |
---|
[16305] | 201 | 'waecneco': 'WAEC/NECO Verification', |
---|
[15675] | 202 | 'jambver': 'JAMB Verification', |
---|
[16284] | 203 | 'book': 'Book Deposit', |
---|
| 204 | 'parentsconsult': 'Parents Consultative Forum (PCF) Fee', |
---|
[15675] | 205 | 'pharmlab': 'Pharmacy Lab Support Fee', |
---|
[15736] | 206 | 'lo_ident': 'Letter of Identification Fee', |
---|
| 207 | 'change_course': 'Change of Course Fee', |
---|
| 208 | 'make_up': 'Make-up Fee', |
---|
| 209 | 'iuits': 'IUITS Fee', |
---|
| 210 | 'fine': 'Fine', |
---|
[16111] | 211 | 'id_card': 'Student ID Card', |
---|
[16233] | 212 | 'pg_other': 'PG Other Charges', |
---|
[16687] | 213 | #'jupeb_form':'JUPEB Form Fee', |
---|
| 214 | #'jupeb_acc':'JUPEB Acceptance Fee', |
---|
| 215 | #'jupeb_reg':'JUPEB Administrative Fee', |
---|
| 216 | 'jupeb_sci':'JUPEB Tuition (Science)', |
---|
| 217 | 'jupeb_arts':'JUPEB Tuition (Arts)', |
---|
| 218 | 'jupeb_hostel':'JUPEB Accommodation (optional)', |
---|
[15738] | 219 | } |
---|
| 220 | |
---|
[16015] | 221 | BALANCE_PAYMENT_CATEGORIES = { |
---|
[16233] | 222 | 'schoolfee': 'Tuition, Accommodation, Adm. Charges', |
---|
[16015] | 223 | } |
---|
| 224 | |
---|
[16434] | 225 | PAYMENT_OPTIONS = { |
---|
| 226 | 'first': 'First Bank Debit Card', |
---|
| 227 | 'access': 'Access Bank Debit Card', |
---|
| 228 | 'zenith': 'Zenith Bank Debit Card', |
---|
| 229 | 'other': 'Other Bank Debit Card', |
---|
| 230 | } |
---|
| 231 | |
---|
[15738] | 232 | APP_CATS_DICT = { |
---|
| 233 | 'basic': 'UAS, PUTME, PUDE, PCE, PRENCE', |
---|
| 234 | 'no': 'No Application', |
---|
[15858] | 235 | 'pg': 'Postgraduate Programmes', |
---|
[16092] | 236 | 'pg2': 'Postgraduate Programmes 2', |
---|
[16497] | 237 | 'pgphd': 'Postgraduate PhD/MPhil', |
---|
[15738] | 238 | 'pre': 'Pre-Degree Studies', |
---|
[15809] | 239 | 'pt': 'Part-Time Degree Programmes', |
---|
[15858] | 240 | 'ut': 'Undergraduate Programmes', |
---|
[16619] | 241 | 'conv': 'HND to BSc Conversion', |
---|
[15738] | 242 | } |
---|
[15877] | 243 | |
---|
| 244 | #: Maximum size in Bytes of passport images in the applicants and |
---|
| 245 | #: students section |
---|
[16048] | 246 | MAX_PASSPORT_SIZE = 250 * 1024 |
---|