Ignore:
Timestamp:
23 Oct 2011, 19:41:47 (13 years ago)
Author:
Henrik Bettermann
Message:

Add clearance payment category.

Location:
main/waeup.sirp/trunk/src/waeup/sirp
Files:
4 edited

Legend:

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

    r6918 r6929  
    244244        )
    245245
     246    surcharge_1 = schema.Int(
     247        title = u'Surcharge 1',
     248        default = 0,
     249        )
     250
     251    surcharge_2 = schema.Int(
     252        title = u'Surcharge 2',
     253        default = 0,
     254        )
     255
     256    surcharge_3 = schema.Int(
     257        title = u'Surcharge 3',
     258        default = 0,
     259        )
     260
    246261    fee_2 = schema.Int(
    247         title = u'Surcharge',
     262        title = u'Clearance Fee',
    248263        default = 0,
    249264        )
  • main/waeup.sirp/trunk/src/waeup/sirp/payments/vocabularies.py

    r6869 r6929  
    1010payment_categories = SimpleWAeUPVocabulary(
    1111    ('School Fee','schoolfee'),
     12    ('Clearance','clearance'),
    1213    ('Hostel Maintenance','hostel_maintenance'),
    1314    ('Transfer','transfer'),
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py

    r6927 r6929  
    661661        self.app['configuration'].addSessionConfiguration(configuration)
    662662
    663         # Managers can add and remove online payment tickets
     663        # Managers can add and remove online school fee payment tickets
    664664        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    665665        self.browser.open(self.payments_student_path)
    666666        self.browser.getLink("Manage").click()
    667667        self.browser.getControl("Add online payment ticket").click()
     668        self.browser.getControl(name="form.p_category").value = ['schoolfee']
    668669        self.browser.getControl("Create ticket").click()
    669670        self.assertMatches('...ticket created...',
     
    683684        self.browser.getControl("Remove selected", index=0).click()
    684685        self.assertTrue('Successfully removed' in self.browser.contents)
     686
     687        # Managers can add online clearance payment tickets
     688        self.browser.open(self.payments_student_path + '/addop')
     689        self.browser.getControl(name="form.p_category").value = ['clearance']
     690        self.browser.getControl("Create ticket").click()
     691        self.assertMatches('...ticket created...',
     692                           self.browser.contents)
  • main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py

    r6920 r6929  
    3838    if category == 'schoolfee':
    3939        amount = academic_session.fee_1
    40         surcharge_1 = academic_session.fee_2
     40        surcharge_1 = academic_session.surcharge_1
     41        surcharge_2 = academic_session.surcharge_2
     42        surcharge_3 = academic_session.surcharge_3
    4143        p_item = student['studycourse'].certificate.code
     44    elif category == 'clearance':
     45        p_item = student['studycourse'].certificate.code
     46        amount = academic_session.fee_2
    4247    return (amount, p_item, p_session,
    4348        surcharge_1, surcharge_2, surcharge_3, error)
Note: See TracChangeset for help on using the changeset viewer.