source: main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/interfaces.py @ 16233

Last change on this file since 16233 was 16233, checked in by Henrik Bettermann, 4 years ago

Implement PG schoolfee payments.

Show provider_amt in payment ticket pages.

  • Property svn:keywords set to Id
File size: 3.6 KB
Line 
1## $Id: interfaces.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
19from zope import schema
20from waeup.kofa.students.vocabularies import StudyLevelSource
21from waeup.kofa.interfaces import validate_email
22from kofacustom.nigeria.students.interfaces import (
23    INigeriaStudentBase, INigeriaUGStudentClearance, INigeriaPGStudentClearance,
24    INigeriaStudentPersonal, INigeriaStudentStudyLevel,
25    INigeriaStudentStudyCourse, INigeriaCourseTicket,
26    INigeriaStudentUpdateByRegNo, INigeriaStudentUpdateByMatricNo,
27    )
28from kofacustom.iuokada.payments.interfaces import ICustomOnlinePayment
29from kofacustom.iuokada.interfaces import MessageFactory as _
30
31class ICustomStudentBase(INigeriaStudentBase):
32    """Representation of student base data.
33
34    """
35
36    email2 = schema.ASCIILine(
37        title = _(u'Second Email'),
38        required = False,
39        constraint=validate_email,
40        )
41
42    library = schema.Bool(
43        title = _(u'Library Id Card'),
44        default = False,
45        required = False,
46        )
47
48ICustomStudentBase['email2'].order = ICustomStudentBase[
49    'phone'].order
50ICustomStudentBase['phone'].order = ICustomStudentBase[
51    'email'].order
52
53class ICustomStudentPersonal(INigeriaStudentPersonal):
54    """Student personal data.
55
56    """
57
58class ICustomUGStudentClearance(INigeriaUGStudentClearance):
59    """Representation of ug student clearance data.
60
61    """
62
63class ICustomPGStudentClearance(INigeriaPGStudentClearance):
64    """Representation of pg student clearance data.
65
66    """
67
68
69class ICustomStudent(ICustomStudentBase,ICustomUGStudentClearance,
70    ICustomPGStudentClearance,ICustomStudentPersonal):
71    """Representation of a student.
72
73    """
74
75class ICustomStudentStudyCourse(INigeriaStudentStudyCourse):
76    """A container for student study levels.
77
78    """
79
80class ICustomStudentStudyLevel(INigeriaStudentStudyLevel):
81    """A container for course tickets.
82
83    """
84
85class ICustomStudentOnlinePayment(ICustomOnlinePayment):
86    """A student payment via payment gateways.
87
88    This Interface does not inherit from IStudentOnlinePayment.
89    Thus all fields from IStudentOnlinePayment have to be repeated here.
90    """
91
92    p_current = schema.Bool(
93        title = _(u'Current Session Payment'),
94        default = True,
95        required = False,
96        )
97
98    p_level = schema.Choice(
99        title = _(u'Payment Level'),
100        source = StudyLevelSource(),
101        required = False,
102        )
103
104ICustomStudentOnlinePayment['p_level'].order = ICustomStudentOnlinePayment[
105    'p_session'].order
106ICustomStudentOnlinePayment['provider_amt'].order = ICustomStudentOnlinePayment[
107    'net_amt'].order
108
109class ICustomCourseTicket(INigeriaCourseTicket):
110    """A course ticket.
111
112    """
113
114class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo):
115    """Representation of a student. Skip regular reg_number validation.
116
117    """
118
119class ICustomStudentUpdateByMatricNo(INigeriaStudentUpdateByMatricNo):
120    """Representation of a student. Skip regular matric_number validation.
121
122    """
Note: See TracBrowser for help on using the repository browser.