Ignore:
Timestamp:
5 Apr 2019, 12:25:30 (6 years ago)
Author:
Henrik Bettermann
Message:

Restrict study modes ug_dsh and de_dsh from paying some following items.

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

Legend:

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

    r15387 r15388  
    343343
    344344    def test_interswitch_form_concessional_fees(self):
    345         self.certificate.study_mode = 'ug_pt'
     345        self.certificate.study_mode = 'ug_ft'
    346346        self.app['configuration']['2004'].concessional_fee = 1567.0
    347347        # Manager can access InterswitchForm
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py

    r15373 r15388  
    332332        }
    333333
     334    PT_AND_DSH_PAYMENT_CATS =  {
     335        'clearance_incl': 'Acceptance Fee Plus',
     336        'schoolfee_incl': 'School Fee Plus',
     337        'ent_registration_1': 'Registration Fee ENT201',
     338        'ent_text_book_1': 'Text Book Fee ENT201',
     339        'gst_registration_1': 'Registration Fee GST101 GST102 GST111 GST112',
     340        'gst_registration_2': 'Registration Fee GST222',
     341        'gst_text_book_0': 'Text Book Fee GST101 GST102 GST111 GST112',
     342        'gst_text_book_1': 'Text Book Fee GST101 GST102',
     343        'gst_text_book_2': 'Text Book Fee GST111 GST112',
     344        'gst_text_book_3': 'Text Book Fee GST222',
     345        }
     346
    334347    @property
    335348    def selectable_categories(self):
     
    339352            'special_pg_ft', 'special_pg_pt', 'found', 'bridge'):
    340353            return self.REDUCED_PAYMENT_CATS.items()
     354        if self.context.student.current_mode in (
     355            'ug_pt', 'de_pt','dp_pt', 'de_dsh', 'ug_dsh'):
     356            return self.PT_AND_DSH_PAYMENT_CATS.items()
    341357        if self.context.student.current_mode == 'ijmbe':
    342358            return sorted(self.IJMBE_PAYMENT_CATS.items())
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py

    r15379 r15388  
    2525from zope.securitypolicy.interfaces import IPrincipalRoleManager
    2626from datetime import datetime, timedelta, date
    27 from mechanize import LinkNotFoundError
     27from mechanize import LinkNotFoundError, ItemNotFoundError
    2828from hurry.workflow.interfaces import IWorkflowState
    2929from zope.event import notify
     
    231231        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    232232        self.browser.open(self.payments_path + '/addop')
    233         self.browser.getControl(name="form.p_category").value = ['schoolfee_1']
    234         self.browser.getControl("Create ticket").click()
    235         self.assertTrue(
    236             'Part-time students are not allowed' in self.browser.contents)
     233        self.assertFalse('schoolfee_1' in self.browser.contents)
     234        #self.browser.getControl(name="form.p_category").value = ['schoolfee_1']
     235        #self.browser.getControl("Create ticket").click()
     236        #self.assertTrue(
     237        #    'Part-time students are not allowed' in self.browser.contents)
    237238        self.student['studycourse'].certificate.study_mode = 'ug_ft'
    238239        self.browser.open(self.payments_path + '/addop')
     240        self.assertTrue('schoolfee_1' in self.browser.contents)
    239241        self.browser.getControl(name="form.p_category").value = ['schoolfee_1']
    240242        self.browser.getControl("Create ticket").click()
Note: See TracChangeset for help on using the changeset viewer.