Ignore:
Timestamp:
17 Mar 2021, 21:19:49 (4 years ago)
Author:
Henrik Bettermann
Message:

abraham: "enable *NADESU/SA/SUG* and *GNS Dues* payment pre-codition for the payment of 2020/2021 session school fee for SPAT (Part-time), same way it is for full-time (regular) students"

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

Legend:

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

    r16356 r16416  
    172172        self.certificate.study_mode = 'nd_ft'
    173173        self.certificate.school_fee_3 = 30000.0
    174         # dep_sug tickets cannot be created
    175         self.browser.open(self.payments_path + '/addop')
    176         self.browser.getControl(name="form.p_category").value = ['dep_sug']
    177         self.browser.getControl("Create ticket").click()
    178         self.assertTrue('Amount could not be determined' in self.browser.contents)
    179         #self.assertTrue('ticket created' in self.browser.contents)
    180         #ctrl = self.browser.getControl(name='val_id')
    181         #dep_sug_pid = ctrl.options[0]
    182         #self.assertTrue(self.student['payments'][dep_sug_pid].amount_auth == 1650)
    183         #self.browser.getLink(dep_sug_pid).click()
    184         #self.browser.getLink("Pay via Interswitch", index=0).click()
    185         #self.student['payments'][dep_sug_pid].p_state = 'paid'
    186         #self.assertTrue(
    187         #    '<item_detail item_id="1" item_name="Students Welfare" '
    188         #    'item_amt="50000" bank_id="11" acct_num="0037892949" />'
    189         #    in self.browser.contents)
     174        # Add dep_sug and gns tickets.
     175        payment = createObject('waeup.StudentOnlinePayment')
     176        payment.p_category = u'dep_sug'
     177        payment.p_session = self.student.current_session
     178        payment.p_id = u'anyid'
     179        payment.p_state = u'paid'
     180        self.student['payments']['anykey'] = payment
     181        payment2 = createObject('waeup.StudentOnlinePayment')
     182        payment2.p_category = u'gns_1'
     183        payment2.p_session = self.student.current_session
     184        payment2.p_id = u'anyid2'
     185        payment2.p_state = u'paid'
     186        self.student['payments']['anykey2'] = payment2
    190187        # Add school fee ticket
    191188        self.browser.open(self.payments_path + '/addop')
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/utils.py

    r16338 r16416  
    172172                # Students are only allowed to pay school fee
    173173                # if current session dep_sug_gns payment has been made.
    174                 if student.faccode != 'SPAT' and not self._dep_sug_gns_paymentMade(
    175                     student, student.current_session):
     174                if not self._dep_sug_gns_paymentMade(student, student.current_session):
    176175                    return _('You have to pay NADESU/SA/SUG and GNS Dues first.'), None
    177176                penalty = getattr(academic_session, 'lsfp_penalty_fee')
     
    260259        elif category == 'dep_sug':
    261260            amount = 3150.0 # includes GATEWAY_AMT
    262             if student.faccode == 'SPAT':
     261            #if student.faccode == 'SPAT':
    263262            #    amount = 1650.0 # includes GATEWAY_AMT
    264                 amount = 0.0
     263            #    amount = 0.0
    265264            if student.state == RETURNING and not previous_session:
    266265                p_session, p_level = self.getReturningData(student)
Note: See TracChangeset for help on using the changeset viewer.