Changeset 8534 for main


Ignore:
Timestamp:
28 May 2012, 05:00:24 (13 years ago)
Author:
Henrik Bettermann
Message:

Use application fee in session configuration object as fallback if application fee in ApplicantsContainer? is False.

File:
1 edited

Legend:

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

    r8524 r8534  
    4242        """
    4343        timestamp = "%d" % int(time()*1000)
    44         session = str(container.year)
    45         try:
    46             session_config = grok.getSite()['configuration'][session]
    47         except KeyError:
    48             return _(u'Session configuration object is not available.')
     44        container_fee = container.application_fee
     45        if container_fee:
     46            payment.amount_auth = container_fee
     47        else:
     48            session = str(container.year)
     49            try:
     50                session_config = grok.getSite()['configuration'][session]
     51            except KeyError:
     52                return _(u'Session configuration object is not available.')
     53            payment.amount_auth = session_config.application_fee
    4954        payment.p_id = "p%s" % timestamp
    5055        payment.p_item = container.title
    5156        payment.p_session = container.year
    5257        payment.p_category = 'application'
    53         payment.amount_auth = session_config.application_fee
    5458        return None
Note: See TracChangeset for help on using the changeset viewer.