Ignore:
Timestamp:
29 Aug 2014, 18:53:15 (10 years ago)
Author:
Henrik Bettermann
Message:

Undo changes of previous revision. We do not need to customize setPaymentDetails.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py

    r11782 r11783  
    1919"""
    2020
    21 from time import time
    22 import grok
    2321from kofacustom.nigeria.applicants.utils import NigeriaApplicantsUtils
    2422from waeup.kofa.applicants.workflow import (INITIALIZED,
     
    5149        }
    5250
    53     # customizations for admission checking payments
    54     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.'), None
    63         payment.p_id = "p%s" % timestamp
    64         payment.p_item = container.title
    65         payment.p_session = container.year
    66         payment.amount_auth = 0.0
    67         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_application
    72             return
    73         payment.p_category = 'application'
    74         container_fee = container.application_fee
    75         if container_fee:
    76             payment.amount_auth = container_fee
    77             return
    78         payment.amount_auth = session_config.application_fee
    79         if payment.amount_auth in (0.0, None):
    80             return _('Amount could not be determined.'), None
    81         return
    82 
    8351
    8452    # Temporarily disabled
Note: See TracChangeset for help on using the changeset viewer.