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

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

Parttime and fulltime postgrad students pay different acceptance fees.

  • Property svn:keywords set to Id
File size: 4.5 KB
Line 
1## $Id: interfaces.py 13678 2016-02-11 10:45:59Z 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
32
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
51    clearance_fee_pg = schema.Float(
52        title = _(u'FT PG Acceptance Fee'),
53        default = 0.0,
54        required = True,
55        )
56
57    clearance_fee_ug_pt = schema.Float(
58        title = _(u'PT UG Acceptance Fee'),
59        default = 0.0,
60        required = True,
61        )
62
63    clearance_fee_pg_pt = schema.Float(
64        title = _(u'PT PG Acceptance Fee'),
65        default = 0.0,
66        required = True,
67        )
68
69    clearance_fee_med = schema.Float(
70        title = _(u'Medical Acceptance Fee'),
71        default = 0.0,
72        required = True,
73        )
74
75    booking_fee = schema.Float(
76        title = _(u'Booking Fee'),
77        default = 0.0,
78        required = True,
79        )
80
81    transcript_fee = schema.Float(
82        title = _(u'Transcript Fee'),
83        default = 0.0,
84        required = True,
85        )
86
87    # Additional fees in custom package
88
89    maint_fee = schema.Float(
90        title = _(u'Maintenance Fee'),
91        default = 0.0,
92        required = True,
93        )
94
95    transfer_fee = schema.Float(
96        title = _(u'Transfer Fee'),
97        default = 0.0,
98        required = True,
99        )
100
101    penalty_ug = schema.Float(
102        title = _(u'UG Penalty Fee'),
103        default = 0.0,
104        required = True,
105        )
106
107    penalty_pg = schema.Float(
108        title = _(u'PG Penalty Fee'),
109        default = 0.0,
110        required = True,
111        )
112
113    late_registration_fee = schema.Float(
114        title = _(u'Late Course Reg. Fee'),
115        default = 0.0,
116        required = True,
117        )
118
119    welfare_fee = schema.Float(
120        title = _(u'AAU Student Welfare Assurance Fee'),
121        default = 0.0,
122        required = True,
123        )
124
125    union_fee = schema.Float(
126        title = _(u'Student Union Due'),
127        default = 0.0,
128        required = True,
129        )
130
131    lapel_fee = schema.Float(
132        title = _(u'AAU Lapel/File Fee'),
133        default = 0.0,
134        required = True,
135        )
136
137    matric_gown_fee = schema.Float(
138        title = _(u'Matriculation Gown Fee'),
139        default = 0.0,
140        required = True,
141        )
142
143    concessional_fee = schema.Float(
144        title = _(u'Concessional Fee'),
145        default = 0.0,
146        required = True,
147        )
148
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[
175    'academic_session'].order
Note: See TracBrowser for help on using the repository browser.