source: main/waeup.custom/trunk/src/waeup/custom/interfaces.py @ 7825

Last change on this file since 7825 was 7822, checked in by Henrik Bettermann, 13 years ago

Rename sirp to kofa.

  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
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
19import zope.i18nmessageid
20from zope import schema
21from 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.
27class 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
81class 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
93ISessionConfigurationAdd['academic_session'].order =  ISessionConfiguration[
94    'academic_session'].order
Note: See TracBrowser for help on using the repository browser.