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

Last change on this file since 11913 was 11913, checked in by Henrik Bettermann, 10 years ago

Add payment category 'NCE Third Semester Fee' which can be set in session configuration objects. Remove unused payment categories.

  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1## $Id: utils.py 11913 2014-10-29 21:23:53Z 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    SELECTABLE_PAYMENT_CATEGORIES = deepcopy(PAYMENT_CATEGORIES)
53
54    def getPaymentItem(self, payment):
55        """Return payment item.
56
57        Bed coordinates are only visible after payment.
58        """
59        if 'maintenance' in payment.p_category and payment.p_state != 'paid':
60            return _('(visible after successful payment)')
61        return payment.p_item
Note: See TracBrowser for help on using the repository browser.