[7419] | 1 | ## $Id: interfaces.py 7822 2012-03-09 07:26:31Z 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 | ##
|
---|
[7695] | 18 |
|
---|
| 19 | import zope.i18nmessageid
|
---|
[6923] | 20 | from zope import schema
|
---|
[7822] | 21 | from waeup.kofa.interfaces import (
|
---|
[7505] | 22 | ISessionConfiguration, academic_sessions_vocab)
|
---|
[6923] | 23 |
|
---|
[7695] | 24 | _ = MessageFactory = zope.i18nmessageid.MessageFactory('waeup.custom')
|
---|
| 25 |
|
---|
[7021] | 26 | # It's recommended to replicate all fields from the base package here.
|
---|
| 27 | class ISessionConfiguration(ISessionConfiguration):
|
---|
[6923] | 28 | """A session configuration object.
|
---|
| 29 | """
|
---|
| 30 |
|
---|
[7021] | 31 | school_fee_base = schema.Int(
|
---|
[7695] | 32 | title = _(u'School Fee (ignored)'),
|
---|
[6923] | 33 | default = 0,
|
---|
| 34 | )
|
---|
| 35 |
|
---|
| 36 | surcharge_1 = schema.Int(
|
---|
[7695] | 37 | title = _(u'Surcharge BT'),
|
---|
[6923] | 38 | default = 0,
|
---|
| 39 | )
|
---|
| 40 |
|
---|
| 41 | surcharge_2 = schema.Int(
|
---|
[7695] | 42 | title = _(u'Surcharge Interswitch'),
|
---|
[6923] | 43 | default = 0,
|
---|
| 44 | )
|
---|
| 45 |
|
---|
[7021] | 46 | surcharge_3 = schema.Int(
|
---|
[7695] | 47 | title = _(u'Surcharge 3'),
|
---|
[6923] | 48 | default = 0,
|
---|
| 49 | )
|
---|
| 50 |
|
---|
[7021] | 51 | clearance = schema.Int(
|
---|
[7695] | 52 | title = _(u'Clearance Fee'),
|
---|
[6923] | 53 | default = 0,
|
---|
| 54 | )
|
---|
| 55 |
|
---|
[7021] | 56 | booking_fee = schema.Int(
|
---|
[7695] | 57 | title = _(u'Booking Fee'),
|
---|
[6923] | 58 | default = 0,
|
---|
| 59 | )
|
---|
| 60 |
|
---|
[7021] | 61 | maint_fee = schema.Int(
|
---|
[7695] | 62 | title = _(u'Maintenance Fee'),
|
---|
[6950] | 63 | default = 0,
|
---|
| 64 | )
|
---|
| 65 |
|
---|
[7021] | 66 | gown = schema.Int(
|
---|
[7695] | 67 | title = _(u'Gown Fee'),
|
---|
[7021] | 68 | default = 0,
|
---|
| 69 | )
|
---|
| 70 |
|
---|
| 71 | transfer = schema.Int(
|
---|
[7695] | 72 | title = _(u'Transfer Fee'),
|
---|
[7021] | 73 | default = 0,
|
---|
| 74 | )
|
---|
| 75 |
|
---|
[6923] | 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(
|
---|
[7695] | 86 | title = _(u'Academic Session'),
|
---|
[6923] | 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 |
---|