1 | ## $Id: utils.py 17502 2023-07-21 13:58:08Z 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 | """ |
---|
20 | |
---|
21 | from copy import deepcopy |
---|
22 | from kofacustom.nigeria.utils.utils import NigeriaKofaUtils |
---|
23 | |
---|
24 | class CustomKofaUtils(NigeriaKofaUtils): |
---|
25 | """A collection of methods subject to customization. |
---|
26 | """ |
---|
27 | |
---|
28 | PAYMENT_CATEGORIES = { |
---|
29 | 'schoolfee': 'Tuition Plus (total amount)', |
---|
30 | 'schoolfee40': 'Tuition Plus (40% - 1st instalment)', |
---|
31 | 'secondinstal': 'Tuition Plus (60% - 2nd instalment)', |
---|
32 | 'clearance': 'Acceptance Fee', |
---|
33 | 'grad_clearance': 'Clearance Fee', |
---|
34 | 'registration': 'Registration Fee', |
---|
35 | #'bed_allocation': 'Bed Allocation Fee', |
---|
36 | #'hostel_maintenance': 'Accommodation', |
---|
37 | #'transfer': 'Transfer Fee', |
---|
38 | #'gown': 'Gown Hire Fee', |
---|
39 | 'application': 'Application Fee', |
---|
40 | 'pg_application': 'PG Application Fee', |
---|
41 | 'app_balance': 'Application Fee Balance', |
---|
42 | 'transcript': 'Transcript Fee', |
---|
43 | 'transcript_local': 'Transcript Fee Local', |
---|
44 | 'transcript_overseas': 'Transcript Fee Oversea', |
---|
45 | 'late_registration': 'Late Registration Fee', |
---|
46 | 'science': 'Science Bench Fee', |
---|
47 | 'clinical': 'Clinical Fee (Medical Students)', |
---|
48 | 'develop': 'Development Fee', |
---|
49 | 'municipal_fresh': 'Municipal Fee (Fresh Students)', |
---|
50 | 'municipal_returning': 'Municipal Fee (Returning Students)', |
---|
51 | 'alumni': 'Alumni Fee', |
---|
52 | 'conv': 'Convocation Fee', |
---|
53 | 'matric': 'Matriculation Fee', |
---|
54 | 'waecneco': 'WAEC/NECO Verification', |
---|
55 | 'jambver': 'JAMB Verification', |
---|
56 | 'book': 'Book Deposit', |
---|
57 | 'parentsconsult': 'Parents Consultative Forum (PCF) Fee', |
---|
58 | 'pharmlab': 'Pharmacy Lab Support Fee', |
---|
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', |
---|
64 | 'combi': 'Combi Payment', |
---|
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', |
---|
74 | 'makeup_admin': 'Make-Up Registration Fee', |
---|
75 | 'id_card': 'Student ID Card', |
---|
76 | 'required_combi': 'Required Combi Payment', |
---|
77 | 'pg_other': 'PG Other Charges', |
---|
78 | 'jupeb_form':'JUPEB Form Fee', |
---|
79 | 'jupeb_acc':'JUPEB Acceptance Fee', |
---|
80 | 'jupeb_reg':'JUPEB Administrative Fee', |
---|
81 | 'jupeb_sci':'JUPEB Tuition (Science)', |
---|
82 | 'jupeb_arts':'JUPEB Tuition (Arts)', |
---|
83 | 'jupeb_hostel':'JUPEB Accommodation (optional)', |
---|
84 | 'brought_fwd': 'Balance Brought Forward', |
---|
85 | 'health_insurance': 'Student Health Insurance', |
---|
86 | } |
---|
87 | |
---|
88 | SELECTABLE_PAYMENT_CATEGORIES = { |
---|
89 | 'schoolfee': 'Tuition Plus (total amount)', |
---|
90 | 'schoolfee40': 'Tuition Plus (40% - 1st instalment)', |
---|
91 | 'secondinstal': 'Tuition Plus (60% - 2nd instalment)', |
---|
92 | 'registration': 'Registration Fee', |
---|
93 | 'clearance': 'Acceptance Fee', |
---|
94 | 'grad_clearance': 'Clearance Fee', |
---|
95 | #'bed_allocation': 'Bed Allocation Fee', |
---|
96 | #'hostel_maintenance': 'Accommodation', |
---|
97 | #'transfer': 'Transfer Fee', |
---|
98 | #'gown': 'Gown Hire Fee', |
---|
99 | 'application': 'Application Fee', |
---|
100 | 'pg_application': 'PG Application Fee', |
---|
101 | #'app_balance': 'Application Fee Balance', |
---|
102 | 'transcript_local': 'Transcript Fee (Local Students)', |
---|
103 | 'transcript_overseas': 'Transcript Fee (Oversea Students)', |
---|
104 | 'late_registration': 'Late Registration Fee', |
---|
105 | 'science': 'Science Bench Fee', |
---|
106 | 'clinical': 'Clinical Fee (Medical Students)', |
---|
107 | 'develop': 'Development Fee', |
---|
108 | 'municipal_fresh': 'Municipal Fee (Fresh Students)', |
---|
109 | 'municipal_returning': 'Municipal Fee (Returning Students)', |
---|
110 | 'alumni': 'Alumni Fee', |
---|
111 | 'conv': 'Convocation Fee', |
---|
112 | 'matric': 'Matriculation Fee', |
---|
113 | 'waecneco': 'WAEC/NECO Verification', |
---|
114 | 'jambver': 'JAMB Verification', |
---|
115 | 'book': 'Book Deposit', |
---|
116 | 'parentsconsult': 'Parents Consultative Forum (PCF) Fee', |
---|
117 | 'pharmlab': 'Pharmacy Lab Support Fee', |
---|
118 | 'lo_ident': 'Letter of Identification Fee', |
---|
119 | 'change_course': 'Change of Course Fee', |
---|
120 | #'make_up': 'Make-up Fee', |
---|
121 | 'iuits': 'IUITS Fee', |
---|
122 | 'fine': 'Fine', |
---|
123 | 'combi': 'Combi Payment', |
---|
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', |
---|
133 | 'makeup_admin': 'Make-Up Registration Fee', |
---|
134 | 'id_card': 'Student ID Card', |
---|
135 | 'required_combi': 'Required Combi Payment', |
---|
136 | 'pg_other': 'PG Other Charges', |
---|
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)', |
---|
143 | 'health_insurance': 'Student Health Insurance', |
---|
144 | } |
---|
145 | |
---|
146 | def selectable_payment_categories(self, student): |
---|
147 | spc = deepcopy(self.SELECTABLE_PAYMENT_CATEGORIES) |
---|
148 | if student.depcode == 'BMS': |
---|
149 | del spc['schoolfee40'] |
---|
150 | del spc['secondinstal'] |
---|
151 | return spc |
---|
152 | |
---|
153 | PREVIOUS_PAYMENT_CATEGORIES = { |
---|
154 | 'schoolfee': 'Tuition, Accommodation, Adm. Charges', |
---|
155 | 'registration': 'Registration Fee', |
---|
156 | 'clearance': 'Acceptance Fee', |
---|
157 | 'grad_clearance': 'Clearance Fee', |
---|
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', |
---|
163 | 'municipal_fresh': 'Municipal Fee (Fresh Students)', |
---|
164 | 'municipal_returning': 'Municipal Fee (Returning Students)', |
---|
165 | 'alumni': 'Alumni Fee', |
---|
166 | 'conv': 'Convocation Fee', |
---|
167 | 'matric': 'Matriculation Fee', |
---|
168 | 'waecneco': 'WAEC/NECO Verification', |
---|
169 | 'jambver': 'JAMB Verification', |
---|
170 | 'book': 'Book Deposit', |
---|
171 | 'parentsconsult': 'Parents Consultative Forum (PCF) Fee', |
---|
172 | 'pharmlab': 'Pharmacy Lab Support Fee', |
---|
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', |
---|
178 | 'id_card': 'Student ID Card', |
---|
179 | 'required_combi': 'Required Combi Payment', |
---|
180 | 'pg_other': 'PG Other Charges', |
---|
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)', |
---|
187 | 'health_insurance': 'Student Health Insurance', |
---|
188 | } |
---|
189 | |
---|
190 | COMBI_PAYMENT_CATEGORIES = { |
---|
191 | 'registration': 'Registration Fee', |
---|
192 | 'grad_clearance': 'Clearance Fee', |
---|
193 | 'late_registration': 'Late Registration Fee', |
---|
194 | 'science': 'Science Bench Fee', |
---|
195 | 'clinical': 'Clinical Fee (Medical Students)', |
---|
196 | 'develop': 'Development Fee', |
---|
197 | 'municipal_fresh': 'Municipal Fee (Fresh Students)', |
---|
198 | 'municipal_returning': 'Municipal Fee (Returning Students)', |
---|
199 | 'alumni': 'Alumni Fee', |
---|
200 | 'conv': 'Convocation Fee', |
---|
201 | 'matric': 'Matriculation Fee', |
---|
202 | 'waecneco': 'WAEC/NECO Verification', |
---|
203 | 'jambver': 'JAMB Verification', |
---|
204 | 'book': 'Book Deposit', |
---|
205 | 'parentsconsult': 'Parents Consultative Forum (PCF) Fee', |
---|
206 | 'pharmlab': 'Pharmacy Lab Support Fee', |
---|
207 | 'lo_ident': 'Letter of Identification Fee', |
---|
208 | 'change_course': 'Change of Course Fee', |
---|
209 | 'make_up': 'Make-up Fee', |
---|
210 | 'iuits': 'IUITS Fee', |
---|
211 | 'fine': 'Fine', |
---|
212 | 'id_card': 'Student ID Card', |
---|
213 | 'pg_other': 'PG Other Charges', |
---|
214 | #'jupeb_form':'JUPEB Form Fee', |
---|
215 | #'jupeb_acc':'JUPEB Acceptance Fee', |
---|
216 | #'jupeb_reg':'JUPEB Administrative Fee', |
---|
217 | 'jupeb_sci':'JUPEB Tuition (Science)', |
---|
218 | 'jupeb_arts':'JUPEB Tuition (Arts)', |
---|
219 | 'jupeb_hostel':'JUPEB Accommodation (optional)', |
---|
220 | 'health_insurance': 'Student Health Insurance', |
---|
221 | } |
---|
222 | |
---|
223 | BALANCE_PAYMENT_CATEGORIES = { |
---|
224 | 'schoolfee': 'Tuition, Accommodation, Adm. Charges', |
---|
225 | } |
---|
226 | |
---|
227 | PAYMENT_OPTIONS = { |
---|
228 | 'first': 'First Bank Debit Card', |
---|
229 | 'access': 'Access Bank Debit Card', |
---|
230 | 'zenith': 'Zenith Bank Debit Card', |
---|
231 | 'other': 'Other Bank Debit Card', |
---|
232 | } |
---|
233 | |
---|
234 | APP_CATS_DICT = { |
---|
235 | 'basic': 'UAS, PUTME, PUDE, PCE, PRENCE', |
---|
236 | 'no': 'No Application', |
---|
237 | 'pg': 'Postgraduate Programmes', |
---|
238 | 'pg2': 'Postgraduate Programmes 2', |
---|
239 | 'pgphd': 'Postgraduate PhD/MPhil', |
---|
240 | 'pre': 'Pre-Degree Studies', |
---|
241 | 'pt': 'Part-Time Degree Programmes', |
---|
242 | 'ut': 'Undergraduate Programmes', |
---|
243 | 'conv': 'HND to BSc Conversion', |
---|
244 | } |
---|
245 | |
---|
246 | #: Maximum size in Bytes of passport images in the applicants and |
---|
247 | #: students section |
---|
248 | MAX_PASSPORT_SIZE = 250 * 1024 |
---|