Ignore:
Timestamp:
11 Oct 2022, 11:21:15 (2 years ago)
Author:
Henrik Bettermann
Message:

JUPEB students must pay acceptance fee first.

File:
1 edited

Legend:

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

    r16893 r17123  
    3737    # refix
    3838    STUDENT_ID_PREFIX = u'D'
     39
     40    def _clearancePaymentMade(self, student):
     41        if len(student['payments']):
     42            for ticket in student['payments'].values():
     43                if ticket.p_state == 'paid' and \
     44                    ticket.p_category == 'clearance':
     45                    return True
     46        return False
    3947
    4048    def setPaymentDetails(self, category, student,
     
    8290                    amount = getattr(certificate, 'school_fee_2', 0.0)
    8391            else:
     92                if student.is_jupeb:
     93                    if not self._clearancePaymentMade(student):
     94                        return _(u'Acceptance fee must be paid first.'), None
    8495                if student.state == CLEARED:
    8596                    amount = getattr(certificate, 'school_fee_1', 0.0)
Note: See TracChangeset for help on using the changeset viewer.