Changeset 16493 for main


Ignore:
Timestamp:
26 May 2021, 21:58:34 (3 years ago)
Author:
Henrik Bettermann
Message:

Change penalty fee conditions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/students/utils.py

    r16478 r16493  
    9090        return False
    9191
    92     def _lsfp_penalty_paymentMade(self, student, session):
     92    def _lsfp_penalty_payment(self, student, p_session):
     93        if p_session >= 2021:
     94            return False
     95        if p_session == 2020 and student.current_mode != 'nce_ft':
     96            return False
    9397        if student.current_mode not in ('ug_ft','de_ft', 'nce_ft', 'nce_pt'):
    94             return True
     98            return False
    9599        if len(student['payments']):
    96100            for ticket in student['payments'].values():
    97101                if ticket.p_state == 'paid' and \
    98102                    ticket.p_category == 'lsfp_penalty' and \
    99                     ticket.p_session == session:
    100                     return True
    101         return False
     103                    ticket.p_session == student.current_session:
     104                    return False
     105        return True
    102106
    103107    def setPaymentDetails(self, category, student,
     
    143147                    return _(u'Session configuration object '
    144148                              'is not available.'), None
    145             penalty = getattr(academic_session, 'lsfp_penalty_fee')
    146             if p_session < 2020 and penalty and \
    147                 not self._lsfp_penalty_paymentMade(
    148                 student, student.current_session):
     149            penalty_set = getattr(academic_session, 'lsfp_penalty_fee')
     150            if penalty_set and self._lsfp_penalty_payment(student, p_session):
    149151                return _('You have to pay late school fee payment penalty first.'), None
    150152            if p_level in PAYMENT_LEVELS:
Note: See TracChangeset for help on using the changeset viewer.