Ignore:
Timestamp:
11 Jan 2016, 13:45:34 (9 years ago)
Author:
Henrik Bettermann
Message:

Acceptance Fee is ONLY FOR NEWLY ADMITTED STUDENTS.

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

    r13534 r13594  
    9595
    9696        error, payment = utils.setPaymentDetails('clearance',self.student)
     97        self.assertEqual(error, 'Acceptance Fee payments not allowed.')
     98        IWorkflowState(self.student).setState('cleared')
     99        error, payment = utils.setPaymentDetails('clearance',self.student)
    97100        self.assertEqual(payment.p_level, 100)
    98101        self.assertEqual(payment.p_session, 2004)
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r13571 r13594  
    2020from zope.component import createObject
    2121from waeup.kofa.interfaces import (
    22     ADMITTED, CLEARED, RETURNING, PAID, academic_sessions_vocab)
     22    ADMITTED, CLEARANCE, REQUESTED, CLEARED, RETURNING, PAID,
     23    academic_sessions_vocab)
    2324from kofacustom.nigeria.students.utils import NigeriaStudentsUtils
    2425from waeup.kofa.accesscodes import create_accesscode
     
    154155            amount = academic_session.concessional_fee
    155156        elif category.startswith('clearance'):
     157            if student.state not in (ADMITTED, CLEARANCE, REQUESTED, CLEARED):
     158                return _(u'Acceptance Fee payments not allowed.'), None
    156159            if student.faccode == 'FP':
    157160                amount = academic_session.clearance_fee_fp
Note: See TracChangeset for help on using the changeset viewer.