Changeset 11065 for main/waeup.kwarapoly


Ignore:
Timestamp:
7 Feb 2014, 07:39:49 (11 years ago)
Author:
Henrik Bettermann
Message:

Implement penalty fee attributes and add penalty fee to school fee.

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

Legend:

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

    r10844 r11065  
    161161        required = False,
    162162        )
     163    penalty_ug = schema.Float(
     164        title = _(u'UG Penalty Fee'),
     165        default = 0.0,
     166        required = False,
     167        )
     168
     169    penalty_pg = schema.Float(
     170        title = _(u'PG Penalty Fee'),
     171        default = 0.0,
     172        required = False,
     173        )
    163174
    164175    def getSessionString():
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py

    r10756 r11065  
    250250        self.assertEqual(error, None)
    251251
     252        configuration.penalty_ug = 5000.0
     253        error, payment = utils.setPaymentDetails('schoolfee',self.student)
     254        self.assertEqual(payment.amount_auth, 37090.0)
     255        self.assertEqual(error, None)
     256
    252257        error, payment = utils.setPaymentDetails('clearance',self.student)
    253258        self.assertEqual(payment.p_level, 100)
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/utils.py

    r10942 r11065  
    253253            # Now we change the category to reduce the number of categories.
    254254            category = 'schoolfee'
     255        # Add session specific penalty fee.
     256        if category == 'schoolfee' and student.is_postgrad:
     257            amount += academic_session.penalty_pg
     258        elif category == 'schoolfee':
     259            amount += academic_session.penalty_ug
    255260        payment = createObject(u'waeup.StudentOnlinePayment')
    256261        timestamp = ("%d" % int(time()*10000))[1:]
Note: See TracChangeset for help on using the changeset viewer.