Ignore:
Timestamp:
1 Jul 2015, 16:22:31 (9 years ago)
Author:
Henrik Bettermann
Message:

Do not create special application payment tickets with zero amount.

File:
1 edited

Legend:

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

    r13076 r13123  
    5151            session_config = grok.getSite()['configuration'][session]
    5252        except KeyError:
    53             return _(u'Session configuration object is not available.'), None
     53            return _(u'Session configuration object is not available.')
    5454        payment.p_id = "p%s" % timestamp
    5555        payment.p_item = container.title
     
    5959            if applicant.special_application:
    6060                fee_name = applicant.special_application + '_fee'
    61                 payment.amount_auth = getattr(session_config, fee_name, 0.0)
     61                payment.amount_auth = getattr(session_config, fee_name, None)
     62                if payment.amount_auth in (0.0, None):
     63                    return _('Amount could not be determined.')
    6264                payment.p_category = applicant.special_application
    6365            return
     
    6971        payment.amount_auth = session_config.application_fee
    7072        if payment.amount_auth in (0.0, None):
    71             return _('Amount could not be determined.'), None
     73            return _('Amount could not be determined.')
    7274        return
    7375
Note: See TracChangeset for help on using the changeset viewer.