Changeset 14087


Ignore:
Timestamp:
18 Aug 2016, 06:01:42 (8 years ago)
Author:
Henrik Bettermann
Message:

Add payment types for foundation programme fees.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/etranzact
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/etranzact/browser.py

    r14085 r14087  
    106106            'SCHOOL-FEE-PT-BALANCE': ('schoolfee','schoolfee_incl',
    107107                                      'schoolfee_1','schoolfee_2'),
     108            'SCHOOL-FEE-FP-NEW': ('schoolfee',),
    108109
    109110            'ACCEPTANCE-FEE': ('clearance',),
    110111            'ACCEPTANCE-FEE-PLUS': ('clearance_incl',),
    111112            'ACCEPTANCE-FEE-PG': ('clearance',),
    112 
    113113            'ACCEPTANCE-FEE-PT': ('clearance',),
    114114            'ACCEPTANCE-FEE-PT-PLUS': ('clearance_incl',),
    115115            'ACCEPTANCE-FEE-PT-PG': ('clearance',),
     116            'ACCEPTANCE-FEE-FP': ('clearance',),
    116117
    117118            'APPLICATION-FEE': ('application',),
    118119            'APPLICATION-FEE-PT': ('application',),
     120            'APPLICATION-FEE-FP': ('application',),
    119121
    120122            'LATE-REGISTRATION': ('late_registration',),
     
    200202            and student.current_mode.endswith('_pt'):
    201203            self.output = ERROR_PART1 + 'Part-time student' + ERROR_PART2
     204            return
     205        if student and '-FP' in PAYMENT_TYPE and student.current_mode != 'found':
     206            self.output = ERROR_PART1 + 'Not a foundation programme student' + ERROR_PART2
     207            return
     208        if student and '-FP' not in PAYMENT_TYPE and student.current_mode == 'found':
     209            self.output = ERROR_PART1 + 'Foundation programme student' + ERROR_PART2
    202210            return
    203211        if '-BALANCE' in PAYMENT_TYPE and results[0].p_item != 'Balance':
  • main/waeup.aaue/trunk/src/waeup/aaue/etranzact/tests.py

    r14083 r14087  
    168168        # Change payment item
    169169        self.payment.p_item = u'Balance'
    170 
    171170        self.browser.open(
    172171            'http://localhost/app/feerequest?PAYEE_ID=%s&PAYMENT_TYPE=SCHOOL-FEE-PLUS-RETURNING'
     
    176175        # Change study mode
    177176        self.certificate.study_mode = 'special_pg_pt'
    178 
    179177        self.browser.open(
    180178            'http://localhost/app/feerequest?PAYEE_ID=%s&PAYMENT_TYPE=SCHOOL-FEE-BALANCE'
     
    232230            'Email=aa@aa.ng~'
    233231            'PhoneNumber=1234' % self.p_id)
     232
     233        IWorkflowState(self.student).setState('cleared')
     234        self.browser.open(
     235            'http://localhost/app/feerequest?PAYEE_ID=%s&PAYMENT_TYPE=SCHOOL-FEE-FP-NEW'
     236            % self.p_id)
     237        self.assertEqual(self.browser.contents, ERROR_PART1 + 'Not a foundation programme student' + ERROR_PART2)
     238        self.certificate.study_mode = 'found'
     239        self.browser.open(
     240            'http://localhost/app/feerequest?PAYEE_ID=%s&PAYMENT_TYPE=SCHOOL-FEE-NEW'
     241            % self.p_id)
     242        self.assertEqual(self.browser.contents, ERROR_PART1 + 'Foundation programme student' + ERROR_PART2)
    234243
    235244    @external_test
Note: See TracChangeset for help on using the changeset viewer.