Changeset 8245
- Timestamp:
- 22 Apr 2012, 12:46:17 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r8244 r8245 450 450 factory = u'waeup.ApplicantOnlinePayment' 451 451 452 def _fillCustomFields(self, payment, session_config): 453 """No custom fields in the base package 454 """ 455 pass 456 452 457 def update(self): 453 458 p_category = 'acceptance' 454 459 session = str(self.context.__parent__.year) 455 460 try: 456 academic_session= grok.getSite()['configuration'][session]461 session_config = grok.getSite()['configuration'][session] 457 462 except KeyError: 458 463 self.flash(_('Session configuration object is not available.')) … … 469 474 payment.p_id = "p%s" % timestamp 470 475 payment.p_item = self.context.__parent__.title 471 payment.p_ year= self.context.__parent__.year476 payment.p_session = self.context.__parent__.year 472 477 payment.p_category = p_category 473 payment.amount_auth = academic_session.acceptance_fee 474 #payment.surcharge_1 = academic_session.surcharge_1 475 #payment.surcharge_2 = academic_session.surcharge_2 476 #payment.surcharge_3 = academic_session.surcharge_3 478 payment.amount_auth = session_config.acceptance_fee 479 payment = self._fillCustomFields(payment, session_config) 477 480 self.context[payment.p_id] = payment 478 481 self.flash(_('Payment ticket created.')) -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py
r8203 r8245 29 29 from waeup.kofa.schema import TextLineChoice, FormattedDate 30 30 from waeup.kofa.interfaces import ( 31 IKofaObject, year_range, validate_email, academic_sessions_vocab,31 IKofaObject, year_range, validate_email, 32 32 SimpleKofaVocabulary) 33 33 from waeup.kofa.interfaces import MessageFactory as _ … … 511 511 512 512 """ 513 p_year = schema.Choice(514 title = _(u'Payment Session'),515 source = academic_sessions_vocab,516 required = False,517 )518 519 IApplicantOnlinePayment['p_year'].order = IApplicantOnlinePayment[520 'p_year'].order521 -
main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py
r8244 r8245 18 18 from zope.interface import Attribute 19 19 from zope import schema 20 from waeup.kofa.interfaces import IKofaObject, SimpleKofaVocabulary 20 from waeup.kofa.interfaces import ( 21 IKofaObject, SimpleKofaVocabulary, academic_sessions_vocab) 21 22 from waeup.kofa.interfaces import MessageFactory as _ 22 23 … … 58 59 title = _(u'Payment Item'), 59 60 default = None, 61 required = False, 62 ) 63 64 p_session = schema.Choice( 65 title = _(u'Payment Session'), 66 source = academic_sessions_vocab, 60 67 required = False, 61 68 ) -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r8244 r8245 1054 1054 label = _('Add online payment') 1055 1055 pnav = 4 1056 factory = u'waeup.StudentOnlinePayment' 1057 1058 def _fillCustomFields(self, payment, pay_details): 1059 """No custom fields in the base package 1060 """ 1061 pass 1056 1062 1057 1063 @action(_('Create ticket'), style='primary') … … 1092 1098 self.redirect(self.url(self.context)) 1093 1099 return 1094 payment = createObject( u'waeup.StudentOnlinePayment')1100 payment = createObject(self.factory) 1095 1101 self.applyData(payment, **data) 1096 1102 timestamp = "%d" % int(time()*1000) … … 1099 1105 payment.p_session = p_session 1100 1106 payment.amount_auth = pay_details['amount'] 1101 #payment.surcharge_1 = pay_details['surcharge_1'] 1102 #payment.surcharge_2 = pay_details['surcharge_2'] 1103 #payment.surcharge_3 = pay_details['surcharge_3'] 1107 payment = self._fillCustomFields(payment, pay_details) 1104 1108 self.context[payment.p_id] = payment 1105 1109 self.flash(_('Payment ticket created.')) -
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r8182 r8245 501 501 502 502 """ 503 p_session = schema.Choice(504 title = _(u'Payment Session'),505 source = academic_sessions_vocab,506 required = False,507 )508 503 509 504 IStudentOnlinePayment['p_session'].order = IStudentOnlinePayment[
Note: See TracChangeset for help on using the changeset viewer.