Ignore:
Timestamp:
1 Jul 2018, 09:18:26 (6 years ago)
Author:
Henrik Bettermann
Message:

Extend _requiredPaymentsMade.

Location:
main/kofacustom.edopoly/trunk/src/kofacustom/edopoly
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interswitch/tests.py

    r15070 r15072  
    6262        self.browser.getControl("Create ticket").click()
    6363        self.assertTrue(
    64             'Pay ICT, Logbook and SIWESS fees first.' in self.browser.contents)
     64            'Pay ICT, Logbook and SIWESS fee(s) first.' in self.browser.contents)
    6565
    6666        # Add required payments first.
  • main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/students/utils.py

    r15071 r15072  
    9191        req_payments_titles = 'ICT, Logbook and SIWESS'
    9292        if len(student['payments']):
     93            # All ND and HND of part time do not pay LOGBOOK
    9394            if student.current_mode.endswith('_pt'):
    9495                req_payments = ('ict_entre', 'siwess_combo')
    9596                req_payments_titles = 'ICT and SIWESS'
     97            # HND2 full time do not pay for SIWES
     98            elif student.current_mode == 'hnd_ft' and student.state == RETURNING:
     99                req_payments = ('ict_entre', 'logbook_combo')
     100                req_payments_titles = 'ICT and Logbook'
     101            # HND1 full time do not pay both SIWES and LOGBOOK
     102            elif student.current_mode == 'hnd_ft' and student.state == CLEARED:
     103                req_payments = ('ict_entre',)
     104                req_payments_titles = 'ICT'
     105            # ND2 FULL TIME Do not pay LOGBOOK
     106            elif student.current_mode == 'nd_ft' and student.state == RETURNING:
     107                req_payments = ('ict_entre', 'siwess_combo')
     108                req_payments_titles = 'ICT and SIWESS'
     109            # ND1 full time do not pay SIWES
     110            elif student.current_mode == 'nd_ft' and student.state == CLEARED:
     111                req_payments = ('ict_entre', 'logbook_combo')
     112                req_payments_titles = 'ICT and Logbook'
    96113            num = 0
    97114            for ticket in student['payments'].values():
     
    141158            rpm, rpt = self._requiredPaymentsMade(student, p_session)
    142159            if not rpm:
    143                 return 'Pay %s fees first.' % rpt, None
     160                return 'Pay %s fee(s) first.' % rpt, None
    144161            try:
    145162                certificate = student['studycourse'].certificate
Note: See TracChangeset for help on using the changeset viewer.