Ignore:
Timestamp:
27 Nov 2012, 15:50:05 (12 years ago)
Author:
Henrik Bettermann
Message:

Add session specific penalty fee.

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

Legend:

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

    r9714 r9732  
    168168        self.assertEqual(payment.amount_auth, 20000.0)
    169169
     170        # Penalty fee is taken into consideration
     171        self.app['configuration']['2005'].penalty_ug = 3000.0
     172        error, payment = utils.setPaymentDetails('schoolfee',self.student)
     173        self.assertEqual(payment.p_level, 200)
     174        self.assertEqual(payment.p_session, 2005)
     175        self.assertEqual(payment.amount_auth, 23000.0)
     176        self.assertEqual(payment.p_item, u'CERT2')
     177        self.assertEqual(error, None)
     178
    170179        error, payment = utils.setPaymentDetails('schoolfee',self.student, 2004, 100)
    171180        self.assertEqual(error, u'Previous session payment not yet implemented.')
  • main/waeup.futminna/trunk/src/waeup/futminna/students/utils.py

    r9714 r9732  
    147147               ticket.p_session == p_session:
    148148                  return _('This type of payment has already been made.'), None
     149        # Add session specific penalty fee.
     150        if category == 'schoolfee' and student.is_postgrad:
     151            amount += academic_session.penalty_pg
     152        elif category == 'schoolfee':
     153            amount += academic_session.penalty_ug
    149154        payment = createObject(u'waeup.StudentOnlinePayment')
    150155        timestamp = ("%d" % int(time()*10000))[1:]
Note: See TracChangeset for help on using the changeset viewer.