Changeset 13785


Ignore:
Timestamp:
21 Mar 2016, 12:53:53 (9 years ago)
Author:
Henrik Bettermann
Message:

Implement JUPEB fee payment.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/interfaces.py

    r13756 r13785  
    106106        )
    107107
     108    jupeb_fee = schema.Float(
     109        title = _(u'JUPEB Examination Fee'),
     110        default = 0.0,
     111        required = False,
     112        )
     113
    108114    def getSessionString():
    109115        """Returns the session string from the vocabulary.
  • main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py

    r13771 r13785  
    9595        elif self.context.p_category == 'gown':
    9696            self.pay_item_id = '5704'
     97        elif self.context.p_category.startswith('hostel_maintenance'):
     98            self.pay_item_id = '5705'
    9799        elif self.context.p_category.startswith('bed_allocation'):
    98100            self.pay_item_id = '5716'
    99         elif self.context.p_category.startswith('hostel_maintenance'):
    100             self.pay_item_id = '5705'
     101        elif self.context.p_category == 'jupeb':
     102            self.pay_item_id = '5717'
    101103
    102104        xmldict['provider_amt'] = 100 * provider_amt
  • main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py

    r13771 r13785  
    297297            'item_name="BT Education"' in self.browser.contents)
    298298
     299        # Create JUPEB fee ticket
     300        self.app['configuration']['2004'].jupeb_fee = 345.0
     301        self.browser.open(self.payments_path + '/addop')
     302        self.browser.getControl(name="form.p_category").value = ['jupeb']
     303        self.browser.getControl("Create ticket").click()
     304        ctrl = self.browser.getControl(name='val_id')
     305        value = ctrl.options[4]
     306        self.browser.getLink(value).click()
     307        self.assertTrue(
     308            '<span>345.0</span>',
     309            self.browser.contents)
     310        # Manager can access InterswitchForm
     311        self.browser.getLink("CollegePAY", index=0).click()
     312        self.assertEqual(self.student['payments'][value].provider_amt, 0.0)
     313        self.assertEqual(self.student['payments'][value].gateway_amt, 150.0)
     314        self.assertTrue('<input type="hidden" name="pay_item_id" value="5717" />'
     315                           in self.browser.contents)
     316        self.assertTrue('Total Amount Authorized:'
     317                           in self.browser.contents)
     318        self.assertTrue(
     319            '<input type="hidden" name="amount" value="34500" />'
     320            in self.browser.contents)
     321        self.assertTrue(
     322            '<item_detail item_id="1" item_name="JUPEB Examination Fee" item_amt="19500" bank_id="8" acct_num="2017506430" />'
     323            in self.browser.contents)
     324        self.assertFalse(
     325            'item_name="BT Education"' in self.browser.contents)
     326
    299327#    @external_test
    300328#    def test_callback(self):
  • main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py

    r13777 r13785  
    194194        elif category == 'gown':
    195195            amount = academic_session.gown_fee
     196        elif category == 'jupeb':
     197            amount = academic_session.jupeb_fee
    196198        elif category == 'bed_allocation':
    197199            p_item = self.getAccommodationDetails(student)['bt']
  • main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py

    r13759 r13785  
    8181        'transcript': 'Transcript Fee',
    8282        'admission_checking': 'Admission Checking Fee',
     83        'jupeb': 'JUPEB Examination Fee',
    8384        }
    8485
     
    9697        'transcript': 'Transcript Fee',
    9798        'transfer': 'Transfer Fee',
     99        'jupeb': 'JUPEB Examination Fee',
    98100        }
    99101
Note: See TracChangeset for help on using the changeset viewer.