[7419] | 1 | ## $Id: interfaces.py 7419 2011-12-21 07:59:29Z henrik $
|
---|
[6923] | 2 | ##
|
---|
[7419] | 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 | ##
|
---|
[6923] | 18 | from zope import schema
|
---|
[7021] | 19 | from waeup.sirp.interfaces import (
|
---|
[7419] | 20 | ISIRPObject, ISessionConfiguration, academic_sessions_vocab)
|
---|
[6923] | 21 |
|
---|
[7021] | 22 | # It's recommended to replicate all fields from the base package here.
|
---|
| 23 | class ISessionConfiguration(ISessionConfiguration):
|
---|
[6923] | 24 | """A session configuration object.
|
---|
| 25 | """
|
---|
| 26 |
|
---|
[7021] | 27 | school_fee_base = schema.Int(
|
---|
[7145] | 28 | title = u'School Fee (ignored)',
|
---|
[6923] | 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 |
|
---|
[7021] | 42 | surcharge_3 = schema.Int(
|
---|
| 43 | title = u'Surcharge 3',
|
---|
[6923] | 44 | default = 0,
|
---|
| 45 | )
|
---|
| 46 |
|
---|
[7021] | 47 | clearance = schema.Int(
|
---|
| 48 | title = u'Clearance Fee',
|
---|
[6923] | 49 | default = 0,
|
---|
| 50 | )
|
---|
| 51 |
|
---|
[7021] | 52 | booking_fee = schema.Int(
|
---|
| 53 | title = u'Booking Fee',
|
---|
[6923] | 54 | default = 0,
|
---|
| 55 | )
|
---|
| 56 |
|
---|
[7021] | 57 | maint_fee = schema.Int(
|
---|
| 58 | title = u'Maintenance Fee',
|
---|
[6950] | 59 | default = 0,
|
---|
| 60 | )
|
---|
| 61 |
|
---|
[7021] | 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 |
|
---|
[6923] | 72 | def getSessionString():
|
---|
| 73 | """Returns the session string from the vocabulary.
|
---|
| 74 | """
|
---|
| 75 |
|
---|
| 76 |
|
---|
| 77 | class 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 |
|
---|
| 89 | ISessionConfigurationAdd['academic_session'].order = ISessionConfiguration[
|
---|
| 90 | 'academic_session'].order |
---|