Ignore:
Timestamp:
14 Feb 2018, 07:16:54 (7 years ago)
Author:
Henrik Bettermann
Message:

Add clearance_fee_dp payment.

Change schoolfee calculation and adjust to the modifications made for 2017/2018.

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

Legend:

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

    r14944 r14954  
    7878        )
    7979
     80    clearance_fee_dp = schema.Float(
     81        title = _(u'Diploma Acceptance Fee'),
     82        default = 0.0,
     83        required = True,
     84        )
     85
    8086    booking_fee = schema.Float(
    8187        title = _(u'Booking Fee'),
  • main/waeup.aaue/trunk/src/waeup/aaue/locales/en/LC_MESSAGES/waeup.kofa.po

    r14838 r14954  
    144144#: school_fee_2
    145145msgid "Returning School Fee"
    146 msgstr "School Fees Returning Students (2015)"
     146msgstr "School Fees Returning Students (2015 & 2016)"
    147147
    148148#: school_fee_3
    149149msgid "Foreigner Initial School Fee"
    150 msgstr "School Fees Returning Students (<2015)"
     150msgstr "School Fees Returning Students"
    151151
    152152#: school_fee_4
    153153msgid "Foreigner Returning School Fee"
    154 msgstr "School Fees 4 (not used):"
     154msgstr "School Fees 4 (not used)"
    155155
    156156msgid "Registration Number"
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_utils.py

    r14733 r14954  
    9898        self.assertEqual(error, None)
    9999
     100        configuration = createObject('waeup.SessionConfiguration')
     101        configuration.academic_session = 2016
     102        self.app['configuration'].addSessionConfiguration(configuration)
     103        configuration = createObject('waeup.SessionConfiguration')
     104        configuration.academic_session = 2017
     105        self.app['configuration'].addSessionConfiguration(configuration)
     106        configuration = createObject('waeup.SessionConfiguration')
     107        configuration.academic_session = 2018
     108        self.app['configuration'].addSessionConfiguration(configuration)
     109        self.student['studycourse'].current_session = 2017
     110        self.student['studycourse'].entry_session = 2015
     111        error, payment = utils.setPaymentDetails('schoolfee',self.student)
     112        self.assertEqual(payment.p_level, 200)
     113        self.assertEqual(payment.p_session, 2018)
     114        self.assertEqual(payment.amount_auth, 7777.0)
     115        self.assertEqual(payment.p_item, u'CERT1')
     116        self.assertEqual(error, None)
     117        self.student['studycourse'].entry_session = 2017
     118        error, payment = utils.setPaymentDetails('schoolfee',self.student)
     119        self.assertEqual(payment.p_level, 200)
     120        self.assertEqual(payment.p_session, 2018)
     121        self.assertEqual(payment.amount_auth, 8888.0)
     122        self.assertEqual(payment.p_item, u'CERT1')
     123        self.assertEqual(error, None)
     124
     125        self.student['studycourse'].current_session = 2004
     126        self.student['studycourse'].entry_session = 2004
    100127        error, payment = utils.setPaymentDetails('clearance',self.student)
    101128        self.assertEqual(error, 'Acceptance Fee payments not allowed.')
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r14918 r14954  
    313313            if student.current_mode == 'ijmbe':
    314314                amount = academic_session.clearance_fee_ijmbe
     315            elif student.current_mode == 'dp_ft':
     316                amount = academic_session.clearance_fee_dp
    315317            elif student.faccode == 'FP':
    316318                amount = academic_session.clearance_fee_fp
     
    371373                    amount = getattr(certificate, 'school_fee_1', 0.0)
    372374                else:
    373                     if student.entry_session >= 2015:
     375                    if student.entry_session in (2015, 2016):
    374376                        amount = getattr(certificate, 'school_fee_2', 0.0)
    375377                    else:
     
    397399                except KeyError:
    398400                    return _(u'Session configuration object is not available.'), None
    399                 if student.entry_session >= 2015:
     401                if student.entry_session in (2015, 2016):
    400402                    amount = getattr(certificate, 'school_fee_2', 0.0)
    401                     # Cut school fee by 50%
    402                     if category == 'schoolfee_1' and amount:
    403                         amount = gateway_net_amt(amount) / 2 + GATEWAY_AMT
    404403                else:
    405404                    amount = getattr(certificate, 'school_fee_3', 0.0)
     405                # Cut school fee by 50%
     406                if category == 'schoolfee_1' and amount:
     407                    amount = gateway_net_amt(amount) / 2 + GATEWAY_AMT
    406408            elif category == 'schoolfee_2':
    407409                amount = getattr(certificate, 'school_fee_2', 0.0)
Note: See TracChangeset for help on using the changeset viewer.