source: main/waeup.aaue/trunk/src/waeup/aaue/interfaces.py @ 13381

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

Configure acceptance/clearance fee computation.

  • Property svn:keywords set to Id
File size: 4.5 KB
RevLine 
[13357]1## $Id: interfaces.py 13377 2015-11-02 05:54:08Z henrik $
2##
3## Copyright (C) 2011 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
19import zope.i18nmessageid
20from zope import schema
21from zc.sourcefactory.basic import BasicSourceFactory
22from waeup.kofa.interfaces import (SimpleKofaVocabulary,
23    ISessionConfiguration, academic_sessions_vocab)
24
25_ = MessageFactory = zope.i18nmessageid.MessageFactory('waeup.aaue')
26
27# It's recommended to replicate all fields from the base package here.
28class ICustomSessionConfiguration(ISessionConfiguration):
29    """A session configuration object.
30    """
31
[13377]32
[13357]33    application_fee = schema.Float(
34        title = _(u'Application Fee'),
35        default = 0.0,
36        required = True,
37        )
38
39    clearance_fee = schema.Float(
40        title = _(u'Regular Acceptance Fee'),
41        default = 0.0,
42        required = True,
43        )
44
45    clearance_fee_fp = schema.Float(
46        title = _(u'FP Acceptance Fee'),
47        default = 0.0,
48        required = True,
49        )
50
[13377]51    clearance_fee_pt = schema.Float(
52        title = _(u'PT Acceptance Fee'),
53        default = 0.0,
54        required = True,
55        )
56
57    clearance_fee_med = schema.Float(
58        title = _(u'Medical Acceptance Fee'),
59        default = 0.0,
60        required = True,
61        )
62
[13357]63    booking_fee = schema.Float(
64        title = _(u'Booking Fee'),
65        default = 0.0,
66        required = True,
67        )
68
69    transcript_fee = schema.Float(
70        title = _(u'Transcript Fee'),
71        default = 0.0,
72        required = True,
73        )
74
75    # Additional fees in custom package
76
77    maint_fee = schema.Float(
78        title = _(u'Maintenance Fee'),
79        default = 0.0,
80        required = True,
81        )
82
83    gown_fee = schema.Float(
84        title = _(u'Gown Fee'),
85        default = 0.0,
86        required = True,
87        )
88
89    transfer_fee = schema.Float(
90        title = _(u'Transfer Fee'),
91        default = 0.0,
92        required = True,
93        )
94
95    penalty_ug = schema.Float(
96        title = _(u'UG Penalty Fee'),
97        default = 0.0,
98        required = True,
99        )
100
101    penalty_pg = schema.Float(
102        title = _(u'PG Penalty Fee'),
103        default = 0.0,
104        required = True,
105        )
106
107    late_registration_fee = schema.Float(
108        title = _(u'Late Course Reg. Fee'),
109        default = 0.0,
110        required = True,
111        )
112
[13374]113    welfare_fee = schema.Float(
114        title = _(u'AAU Student Welfare Assurance Fee'),
115        default = 0.0,
116        required = True,
117        )
118
119    union_fee = schema.Float(
120        title = _(u'Students\' Union Due'),
121        default = 0.0,
122        required = True,
123        )
124
125    lapel_fee = schema.Float(
126        title = _(u'AAU Lapel/File Fee'),
127        default = 0.0,
128        required = True,
129        )
130
131    matric_gown_fee = schema.Float(
132        title = _(u'Matriculation Gown Fee'),
133        default = 0.0,
134        required = True,
135        )
136
137    concessional_fee = schema.Float(
138        title = _(u'Concessional Fee'),
139        default = 0.0,
140        required = True,
141        )
142
143    medical_fee = schema.Float(
144        title = _(u'Medical Student Acceptance Fee'),
145        default = 0.0,
146        required = True,
147        )
148
[13357]149    coursereg_deadline = schema.Datetime(
150        title = _(u'Course Reg. Deadline'),
151        required = False,
152        description = _('Example: ') + u'2011-12-31 23:59:59+01:00',
153        )
154
155
156    def getSessionString():
157        """Returns the session string from the vocabulary.
158        """
159
160
161class ICustomSessionConfigurationAdd(ICustomSessionConfiguration):
162    """A session configuration object in add mode.
163    """
164
165    academic_session = schema.Choice(
166        title = _(u'Academic Session'),
167        source = academic_sessions_vocab,
168        default = None,
169        required = True,
170        readonly = False,
171        )
172
173ICustomSessionConfigurationAdd[
174    'academic_session'].order =  ICustomSessionConfiguration[
[6923]175    'academic_session'].order
Note: See TracBrowser for help on using the repository browser.