1 | ## $Id: interfaces.py 7822 2012-03-09 07:26:31Z 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 |
|
---|
19 | import zope.i18nmessageid
|
---|
20 | from zope import schema
|
---|
21 | from waeup.kofa.interfaces import (
|
---|
22 | ISessionConfiguration, academic_sessions_vocab)
|
---|
23 |
|
---|
24 | _ = MessageFactory = zope.i18nmessageid.MessageFactory('waeup.custom')
|
---|
25 |
|
---|
26 | # It's recommended to replicate all fields from the base package here.
|
---|
27 | class ISessionConfiguration(ISessionConfiguration):
|
---|
28 | """A session configuration object.
|
---|
29 | """
|
---|
30 |
|
---|
31 | school_fee_base = schema.Int(
|
---|
32 | title = _(u'School Fee (ignored)'),
|
---|
33 | default = 0,
|
---|
34 | )
|
---|
35 |
|
---|
36 | surcharge_1 = schema.Int(
|
---|
37 | title = _(u'Surcharge BT'),
|
---|
38 | default = 0,
|
---|
39 | )
|
---|
40 |
|
---|
41 | surcharge_2 = schema.Int(
|
---|
42 | title = _(u'Surcharge Interswitch'),
|
---|
43 | default = 0,
|
---|
44 | )
|
---|
45 |
|
---|
46 | surcharge_3 = schema.Int(
|
---|
47 | title = _(u'Surcharge 3'),
|
---|
48 | default = 0,
|
---|
49 | )
|
---|
50 |
|
---|
51 | clearance = schema.Int(
|
---|
52 | title = _(u'Clearance Fee'),
|
---|
53 | default = 0,
|
---|
54 | )
|
---|
55 |
|
---|
56 | booking_fee = schema.Int(
|
---|
57 | title = _(u'Booking Fee'),
|
---|
58 | default = 0,
|
---|
59 | )
|
---|
60 |
|
---|
61 | maint_fee = schema.Int(
|
---|
62 | title = _(u'Maintenance Fee'),
|
---|
63 | default = 0,
|
---|
64 | )
|
---|
65 |
|
---|
66 | gown = schema.Int(
|
---|
67 | title = _(u'Gown Fee'),
|
---|
68 | default = 0,
|
---|
69 | )
|
---|
70 |
|
---|
71 | transfer = schema.Int(
|
---|
72 | title = _(u'Transfer Fee'),
|
---|
73 | default = 0,
|
---|
74 | )
|
---|
75 |
|
---|
76 | def getSessionString():
|
---|
77 | """Returns the session string from the vocabulary.
|
---|
78 | """
|
---|
79 |
|
---|
80 |
|
---|
81 | class ISessionConfigurationAdd(ISessionConfiguration):
|
---|
82 | """A session configuration object in add mode.
|
---|
83 | """
|
---|
84 |
|
---|
85 | academic_session = schema.Choice(
|
---|
86 | title = _(u'Academic Session'),
|
---|
87 | source = academic_sessions_vocab,
|
---|
88 | default = None,
|
---|
89 | required = True,
|
---|
90 | readonly = False,
|
---|
91 | )
|
---|
92 |
|
---|
93 | ISessionConfigurationAdd['academic_session'].order = ISessionConfiguration[
|
---|
94 | 'academic_session'].order |
---|