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

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

Adjust custom package to the changes made in the base package.

Set svn properties and harmonize copyright statement.

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