Ignore:
Timestamp:
11 Jun 2012, 11:11:11 (13 years ago)
Author:
Henrik Bettermann
Message:

Add ug and pg penalty fees.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py

    r8598 r8676  
    321321        self.assertEqual(error, None)
    322322
     323        # Add penalty fee.
     324        self.app['configuration']['2004'].penalty_ug = 99.0
     325        error, payment = utils.setPaymentDetails('schoolfee',self.student)
     326        self.assertEqual(payment.amount_auth, 40099.0)
     327
    323328        IWorkflowState(self.student).setState('returning')
    324329        error, payment = utils.setPaymentDetails('schoolfee',self.student)
    325330        self.assertEqual(payment.p_level, 200)
    326331        self.assertEqual(payment.p_session, 2005)
    327         self.assertEqual(payment.amount_auth, 20000.0)
     332        self.assertEqual(payment.amount_auth, 20099.0)
    328333        self.assertEqual(payment.p_item, u'CERT1')
    329334        self.assertEqual(error, None)
  • main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py

    r8622 r8676  
    6868        except KeyError:
    6969            return _(u'Session configuration object is not available.'), None
     70        # Determine fee.
    7071        if category == 'transfer':
    7172            amount = academic_session.transfer_fee
     
    107108        if amount in (0.0, None):
    108109            return _(u'Amount could not be determined.'), None
     110        # Add session specific penalty fee.
     111        if category == 'schoolfee' and student.is_postgrad:
     112            amount += academic_session.penalty_pg
     113        elif category == 'schoolfee':
     114            amount += academic_session.penalty_ug
     115        # Create ticket.
    109116        for key in student['payments'].keys():
    110117            ticket = student['payments'][key]
Note: See TracChangeset for help on using the changeset viewer.