Ignore:
Timestamp:
28 Apr 2016, 07:01:01 (9 years ago)
Author:
Henrik Bettermann
Message:

Postgraduate students must not pay additional fees.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/students
Files:
2 edited

Legend:

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

    r13846 r13853  
    8787        self.assertEqual(error, u'Personal data form is not properly filled.')
    8888        self.student.father_name = u'Rudolf'
     89        error, payment = utils.setPaymentDetails('schoolfee_incl',self.student)
     90        self.assertEqual(error, 'This type of payment is not allowed.')
    8991        error, payment = utils.setPaymentDetails('schoolfee',self.student)
    9092        self.assertEqual(payment.p_level, 200)
     
    9799        self.assertEqual(error, 'Acceptance Fee payments not allowed.')
    98100        IWorkflowState(self.student).setState('cleared')
     101        error, payment = utils.setPaymentDetails('clearance_incl',self.student)
     102        self.assertEqual(error, 'This type of payment is not allowed.')
    99103        error, payment = utils.setPaymentDetails('clearance',self.student)
    100104        self.assertEqual(payment.p_level, 100)
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r13846 r13853  
    209209                amount = academic_session.clearance_fee_med
    210210            elif student.is_postgrad:  # and not part-time
     211                if category != 'clearance':
     212                    return _("This type of payment is not allowed."), None
    211213                amount = academic_session.clearance_fee_pg
    212214            else:
     
    227229            except (AttributeError, TypeError):
    228230                return _('Study course data are incomplete.'), None
     231            if student.is_postgrad and category != 'schoolfee':
     232                return _("This type of payment is not allowed."), None
    229233            if category in ('schoolfee_1', 'schoolfee_2'):
    230234                if student.current_mode == 'ug_pt':
Note: See TracChangeset for help on using the changeset viewer.