Ignore:
Timestamp:
3 Jul 2018, 06:14:21 (6 years ago)
Author:
Henrik Bettermann
Message:

Enable previous session payments.

Location:
main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/students
Files:
2 edited

Legend:

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

    r14969 r15077  
    8080        p_item = u''
    8181        amount = 0.0
    82         p_session = student['studycourse'].current_session
    83         p_level = student['studycourse'].current_level
    84         p_current = True
     82        if previous_session:
     83            if previous_session < student['studycourse'].entry_session:
     84                return _('The previous session must not fall below '
     85                         'your entry session.'), None
     86            if category == 'schoolfee':
     87                # School fee is always paid for the following session
     88                if previous_session > student['studycourse'].current_session:
     89                    return _('This is not a previous session.'), None
     90            else:
     91                if previous_session > student['studycourse'].current_session - 1:
     92                    return _('This is not a previous session.'), None
     93            p_session = previous_session
     94            p_level = previous_level
     95            p_current = False
     96        else:
     97            p_session = student['studycourse'].current_session
     98            p_level = student['studycourse'].current_level
     99            p_current = True
    85100        academic_session = self._getSessionConfiguration(p_session)
    86         if previous_session:
    87             return _('Previous session payment not yet implemented.'), None
    88101        if academic_session == None:
    89102            return _(u'Session configuration object is not available.'), None
  • main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/students/viewlets.py

    r14347 r15077  
    3131from kofacustom.nigeria.interfaces import MessageFactory as _
    3232
    33 class AddPreviousPaymentActionButton(AddPreviousPaymentActionButton):
    34 
    35     @property
    36     def target_url(self):
    37         return ''
Note: See TracChangeset for help on using the changeset viewer.