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

JUPEB students must pay acceptance fee first.

Location:
main/kofacustom.unidel/trunk/src/kofacustom/unidel
Files:
2 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)
  • main/kofacustom.unidel/trunk/src/kofacustom/unidel/utils/utils.py

    r17116 r17123  
    6666    APP_CATS_DICT = {
    6767        'basic': 'UAS, PUTME, PUDE, PCE, PRENCE',
     68        'de': 'Direct Entry Programmes',
    6869        'no': 'No Application',
    6970        'pre': 'Pre-Degree Studies',
     
    7172        'dp_ft': 'Full-Time Diploma Programmes',
    7273        'dp_pt': 'Part-Time Diploma Programmes',
    73         'de': 'Direct Entry Programmes',
    7474        }
    7575
Note: See TracChangeset for help on using the changeset viewer.