Changeset 11785


Ignore:
Timestamp:
30 Aug 2014, 05:41:26 (10 years ago)
Author:
Henrik Bettermann
Message:

We don't charge if admission checking fee is not set.

File:
1 edited

Legend:

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

    r11784 r11785  
    2323from kofacustom.nigeria.applicants.applicant import NigeriaApplicant
    2424from waeup.uniben.applicants.interfaces import(
    25     ICustomApplicant, ICustomUGApplicantEdit, ICustomPGApplicantEdit, IPUTMEApplicantEdit)
     25    ICustomApplicant, ICustomUGApplicantEdit, ICustomPGApplicantEdit,
     26    IPUTMEApplicantEdit)
    2627
    2728class CustomApplicant(NigeriaApplicant):
     
    3233
    3334    def admchecking_fee_paid(self):
     35        # We don't charge if admission checking fee is not set.
     36        session = str(self.__parent__.year)
     37        try:
     38            session_config = grok.getSite()['configuration'][session]
     39        except KeyError:
     40            return True
     41        if session_config.admchecking_fee == 0:
     42            return True
    3443        for key in self.keys():
    3544            ticket = self[key]
    36             if ticket.p_state == 'paid' and ticket.p_category == 'admission_checking':
     45            if ticket.p_state == 'paid' and \
     46                ticket.p_category == 'admission_checking':
    3747                return True
    3848        return False
Note: See TracChangeset for help on using the changeset viewer.