Changeset 11783 for main/waeup.uniben/trunk/src
- Timestamp:
- 29 Aug 2014, 18:53:15 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py
r11782 r11783 19 19 """ 20 20 21 from time import time22 import grok23 21 from kofacustom.nigeria.applicants.utils import NigeriaApplicantsUtils 24 22 from waeup.kofa.applicants.workflow import (INITIALIZED, … … 51 49 } 52 50 53 # customizations for admission checking payments54 def setPaymentDetails(self, container, payment, applicant):55 """Set the payment data of an applicant.56 """57 timestamp = ("%d" % int(time()*10000))[1:]58 session = str(container.year)59 try:60 session_config = grok.getSite()['configuration'][session]61 except KeyError:62 return _(u'Session configuration object is not available.'), None63 payment.p_id = "p%s" % timestamp64 payment.p_item = container.title65 payment.p_session = container.year66 payment.amount_auth = 0.067 if applicant.special:68 if applicant.special_application:69 fee_name = applicant.special_application + '_fee'70 payment.amount_auth = getattr(session_config, fee_name, 0.0)71 payment.p_category = applicant.special_application72 return73 payment.p_category = 'application'74 container_fee = container.application_fee75 if container_fee:76 payment.amount_auth = container_fee77 return78 payment.amount_auth = session_config.application_fee79 if payment.amount_auth in (0.0, None):80 return _('Amount could not be determined.'), None81 return82 83 51 84 52 # Temporarily disabled
Note: See TracChangeset for help on using the changeset viewer.