Changeset 17494 for main/waeup.aaue


Ignore:
Timestamp:
19 Jul 2023, 16:41:44 (16 months ago)
Author:
Henrik Bettermann
Message:

100_ now indicates first year only payments.

Location:
main/waeup.aaue/trunk/src/waeup/aaue
Files:
5 edited

Legend:

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

    r17491 r17494  
    104104    'matricgown': 'Matriculation Gown Fee',
    105105    'lapel':      'File/Lapel Fee',
    106     'lmsplus':    'LMS Plus Fee',
     106    '1_lmsplus':  'LMS Plus Fee',
    107107    'nuga':       'NUGA Fee',
    108108    }
     
    335335                for item in sorted_items:
    336336                    try:
    337                         item_amt = 100 * int(item[1])
     337                        if  item[1].startswith('1_') and student.state == CLEARED:
     338                            # first year payment only
     339                            item_amt = 100 * int(item.split('_')[1])
     340                        else:
     341                            item_amt = 100 * int(item[1])
    338342                        if self.context.p_category == 'schoolfee_1' and item[0] == 'tuition':
    339343                            item_amt /= 2
  • main/waeup.aaue/trunk/src/waeup/aaue/students/schoolfees_12.csv

    r17449 r17494  
    11code,faculty_code,department_code,tuition,edohis,union,access,sport,library
    2 CERT1,FAG,ANS,184000,16000,30000,4500,3000,2000
     2CERT1,FAG,ANS,184000,16000,30000,4500,3000,100_2000
    33BAGRANS,FAG,ANS,35000,16000,1000,4500,3000,1000
    44BAGRCRS,FAG,CRS,35000,16000,1000,4500,3000,1000
  • main/waeup.aaue/trunk/src/waeup/aaue/students/schoolfees_15.csv

    r17455 r17494  
    11code,faculty_code,department_code,tuition,edohis,union,access,sport,library,nuga
    2 CERT1,FAG,ANS,184000,16000,30000,4500,3000,1000,1000
     2CERT1,FAG,ANS,184000,16000,30000,4500,3000,1000,100_1000
    33BAGRANS,FAG,ANS,106700,16000,1000,4500,3000,1000,1000
    44BAGRCRS,FAG,CRS,106700,16000,1000,4500,3000,1000,1000
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py

    r17468 r17494  
    685685        #    'You must choose a payment which includes additional fees'
    686686        #    in self.browser.contents)
     687        configuration_2 = createObject('waeup.SessionConfiguration')
     688        configuration_2.academic_session = 2019
     689        self.app['configuration'].addSessionConfiguration(configuration_2)
     690        self.student.father_name = u'Rudolf'
     691        IWorkflowState(self.student).setState('returning')
     692        self.browser.open(self.student_path + '/payments')
     693        self.browser.getLink("Add current session payment ticket").click()
     694        self.browser.getControl(name="form.p_category").value = ['schoolfee_incl']
     695        self.browser.getControl("Create ticket").click()
     696        self.assertTrue('ticket created' in self.browser.contents)
     697        value = self.student['payments'].keys()[1]
     698        self.student['payments'][value].p_state = 'paid'
     699        self.browser.getLink(value).click()
     700        self.assertTrue('Amount Authorized' in self.browser.contents)
     701        # It's 1000 less
     702        self.assertEqual(self.student['payments'][value].amount_auth, 238500.0)
    687703        return
    688704
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r17481 r17494  
    426426                    additional += int(item)
    427427                except:
    428                     pass
     428                    # 100_ indicates first year payment only
     429                    if student.state == CLEARED:
     430                        try:
     431                            additional += int(item.split('_')[1])
     432                        except:
     433                            pass
    429434            amount = float(schoolfees[0])
    430435            additional -= amount
Note: See TracChangeset for help on using the changeset viewer.