Ignore:
Timestamp:
19 Jul 2025, 06:41:05 (25 hours ago)
Author:
Henrik Bettermann
Message:

Disable sundry combi payments.

Location:
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada
Files:
3 edited

Legend:

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

    r18043 r18131  
    7676        # 250 gateway charge have been added
    7777        payment = self.student['payments'][self.value]
    78         self.assertEqual(payment.amount_auth, 7250)
     78        self.assertEqual(payment.amount_auth, 7800)
    7979        self.assertEqual(payment.net_amt, 7000)
    8080        self.assertTrue(
    81             '<input type="hidden" name="amount" value="725000" />' in
     81            '<input type="hidden" name="amount" value="780000" />' in
    8282            self.browser.contents)
    8383        # WAeAC charge have been substracted
     
    9090
    9191    def test_interswitch_required_combi(self):
     92        configuration = createObject('waeup.SessionConfiguration')
     93        configuration.academic_session = 2025
     94        self.app['configuration'].addSessionConfiguration(configuration)
    9295        # Student is a fresh non-science student
    9396        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     97        self.student['studycourse'].current_session = 2025
     98        self.student['studycourse'].entry_session = 2025
    9499        self.browser.open(self.payments_path)
    95100        IWorkflowState(self.student).setState('cleared')
     
    102107        self.browser.getControl(name="form.p_category").value = ['required_combi']
    103108        self.browser.getControl("Create payment").click()
    104         self.assertTrue('Student Health Insurance undefined.' in self.browser.contents)
    105         self.app['configuration']['2004'].registration_fresh_fee = 10000.0
    106         self.app['configuration']['2004'].book_fee = 10000.0
    107         self.app['configuration']['2004'].develop_fee = 10000.0
    108         self.app['configuration']['2004'].parentsconsult_fee = 10000.0
    109         self.app['configuration']['2004'].municipal_fresh_fee = 10000.0
    110         self.app['configuration']['2004'].matric_fee = 10000.0
    111         self.app['configuration']['2004'].waecneco_fee = 10000.0
    112         self.app['configuration']['2004'].jambver_fee = 10000.0
    113         self.app['configuration']['2004'].health_insurance_fee = 10000.0
    114         self.app['configuration']['2004'].id_card_fee = 10000.0
    115         self.app['configuration']['2004'].medical_screening_fee = 10000.0
     109        self.assertTrue('undefined.' in self.browser.contents)
     110        self.app['configuration']['2025'].registration_fresh_fee = 10000.0
     111        self.app['configuration']['2025'].book_fee = 10000.0
     112        self.app['configuration']['2025'].develop_fee = 10000.0
     113        self.app['configuration']['2025'].parentsconsult_fee = 10000.0
     114        self.app['configuration']['2025'].municipal_fresh_fee = 10000.0
     115        self.app['configuration']['2025'].matric_fee = 10000.0
     116        self.app['configuration']['2025'].waecneco_fee = 10000.0
     117        self.app['configuration']['2025'].jambver_fee = 10000.0
     118        self.app['configuration']['2025'].health_insurance_fee = 10000.0
     119        self.app['configuration']['2025'].id_card_fee = 10000.0
     120        self.app['configuration']['2025'].medical_screening_fee = 10000.0
    116121        self.browser.getControl(name="form.p_category").value = ['required_combi']
    117122        self.browser.getControl("Create payment").click()
     
    130135        # 250 gateway charge have been added
    131136        payment = self.student['payments'][self.value]
    132         self.assertEqual(payment.amount_auth, 110250)
     137        self.assertEqual(payment.amount_auth, 110800)
    133138        self.assertEqual(payment.net_amt, 110000)
    134139        self.assertTrue(
    135             '<input type="hidden" name="amount" value="11025000" />' in
     140            '<input type="hidden" name="amount" value="11080000" />' in
    136141            self.browser.contents)
    137142        self.assertTrue(
     
    139144            self.browser.contents)
    140145        self.assertTrue(
    141             'item_id="12" item_name="parentsconsult" item_amt="1000000" bank_id="117" acct_num="1228747029"' in
     146            'item_id="12" item_name="parentsconsult" item_amt="1000000" bank_id="117" acct_num="1012355544"' in
    142147            self.browser.contents)
    143148
     
    160165        # 250 gateway charge have been added
    161166        self.assertTrue(
    162             '<input type="hidden" name="amount" value="125000" />' in
    163             self.browser.contents)
    164         self.assertEqual(acc_payment.amount_auth, 1250)
     167            '<input type="hidden" name="amount" value="180000" />' in
     168            self.browser.contents)
     169        self.assertEqual(acc_payment.amount_auth, 1800)
    165170        self.assertEqual(acc_payment.net_amt, 1000)
    166171        delta = timedelta(days=8)
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/utils.py

    r18122 r18131  
    200200        rp = self._collect_required_payment_items(student)
    201201        cats_missing = deepcopy(rp)
     202        combi_cats = getUtility(IKofaUtils).COMBI_PAYMENT_CATEGORIES
    202203        if len(student['payments']):
    203204            for category in rp.keys():
     
    205206                    if ticket.p_state == 'paid' and \
    206207                        ticket.p_category == category and \
     208                        ticket.p_session == session:
     209                        del cats_missing[category]
     210                    elif ticket.p_state == 'paid' and \
     211                        ticket.p_category == 'combi' and \
     212                        combi_cats[category] in ticket.p_item and \
    207213                        ticket.p_session == session:
    208214                        del cats_missing[category]
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/utils/utils.py

    r18034 r18131  
    286286    _COMBI_PAYMENT_CATEGORIES = {
    287287        #'registration': 'Registration Fee',
    288         'registration_fresh': 'Registration Fee (Fresh)',
    289         'registration_return': 'Registration Fee (Returning)',
    290         'grad_clearance': 'Clearance Fee',
     288        ## sundry: 'registration_fresh': 'Registration Fee (Fresh)',
     289        ## sundry: 'registration_return': 'Registration Fee (Returning)',
     290        ## sundry: 'grad_clearance': 'Clearance Fee',
     291        ## sundry: 'science': 'Science Bench Fee',
     292        ## sundry: 'medical_screening':'Medical Screening Fees',
     293        ## sundry: 'municipal_fresh': 'Municipal Fee (Fresh Students)',
     294        ## sundry: 'municipal_returning': 'Municipal Fee (Returning Students)',
     295        ## sundry: 'alumni': 'Alumni Fee',
     296        ## sundry: 'conv': 'Convocation Fee',
     297        ## sundry: 'matric': 'Matriculation Fee',
     298        ## sundry: 'waecneco': 'WAEC/NECO Verification',
     299        ## sundry: 'jambver': 'JAMB Verification',
     300        ## sundry: 'book': 'Book Deposit',
     301        ## sundry: 'parentsconsult': 'Parents Consultative Forum (PCF) Fee',
     302        ## sundry: 'id_card': 'Student ID Card',
     303        ## sundry: 'develop': 'Development Fee',
     304        ## sundry: 'health_insurance': 'Student Health Insurance',
     305        'clinical': 'Clinical Fee (Medical Students)',
    291306        'late_registration': 'Late Registration Fee',
    292         'science': 'Science Bench Fee',
    293         'clinical': 'Clinical Fee (Medical Students)',
    294         'medical_screening':'Medical Screening Fees',
    295         'develop': 'Development Fee',
    296         'municipal_fresh': 'Municipal Fee (Fresh Students)',
    297         'municipal_returning': 'Municipal Fee (Returning Students)',
    298         'alumni': 'Alumni Fee',
    299         'conv': 'Convocation Fee',
    300         'matric': 'Matriculation Fee',
    301         'waecneco': 'WAEC/NECO Verification',
    302         'jambver': 'JAMB Verification',
    303         'book': 'Book Deposit',
    304         'parentsconsult': 'Parents Consultative Forum (PCF) Fee',
    305307        'pharmlab': 'Pharmacy Lab Support Fee',
    306308        'lo_ident': 'Letter of Identification Fee',
     
    309311        'iuits': 'IUITS Fee',
    310312        'fine': 'Fine',
    311         'id_card': 'Student ID Card',
    312313        'pg_other': 'PG Other Charges',
    313314        'jupeb_form':'JUPEB Form Fee',
     
    317318        'jupeb_arts':'JUPEB Tuition (Arts)',
    318319        'jupeb_hostel':'JUPEB Accommodation (optional)',
    319         'health_insurance': 'Student Health Insurance',
    320320        }
    321321
Note: See TracChangeset for help on using the changeset viewer.