source: main/waeup.fceokene/trunk/src/waeup/fceokene/utils/utils.py @ 13061

Last change on this file since 13061 was 13030, checked in by Henrik Bettermann, 9 years ago

Let's disable NCE 1 payments online (undo r13022).

  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1## $Id: utils.py 13030 2015-06-04 12:11:22Z 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"""
20from copy import deepcopy
21from kofacustom.nigeria.utils.utils import NigeriaKofaUtils
22from waeup.fceokene.interfaces import MessageFactory as _
23
24class CustomKofaUtils(NigeriaKofaUtils):
25    """A collection of methods subject to customization.
26    """
27
28    PREFERRED_LANGUAGES_DICT = {
29        }
30
31    APP_CATS_DICT = {
32        'basic': 'UTME, DE, PCE, PRENCE',
33        'no': 'No Application',
34        'sandwich': 'Sandwich',
35        'cest': 'Part-Time, Diploma, Certificate',
36        'bec': 'Bachelor of Education Certificate Programmes',
37        }
38
39
40    PAYMENT_CATEGORIES = {
41        'schoolfee': 'School Fee',
42        'clearance': 'Acceptance Fee',
43        'bed_allocation': 'Bed Allocation Fee',
44        'hostel_maintenance': 'Hostel Maintenance Fee',
45        #'transfer': 'Transfer Fee',
46        #'gown': 'Gown Hire Fee',
47        'application': 'Application Fee',
48        #'transcript': 'Transcript Fee',
49        'third_semester': 'NCE Third Semester Fee',
50        }
51
52    DISABLE_PAYMENT_GROUP_DICT = {
53        'sf_all': 'School Fee - All Students',
54        'sf_nce1': 'School Fee - NCE I Fresh Students',
55        }
56
57    SELECTABLE_PAYMENT_CATEGORIES = deepcopy(PAYMENT_CATEGORIES)
58
59    def getPaymentItem(self, payment):
60        """Return payment item.
61
62        Bed coordinates are only visible after payment.
63        """
64        if 'maintenance' in payment.p_category and payment.p_state != 'paid':
65            return _('(visible after successful payment)')
66        return payment.p_item
Note: See TracBrowser for help on using the repository browser.