Ignore:
Timestamp:
6 May 2014, 17:40:21 (11 years ago)
Author:
Henrik Bettermann
Message:

Session specific penalty fee must be added before re-categorization of carryover fees.

Fees are required and must not be set to None.

File:
1 edited

Legend:

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

    r11453 r11623  
    258258               ticket.p_session == p_session:
    259259                  return _('This type of payment has already been made.'), None
     260        # Add session specific penalty fee.
     261        if category == 'schoolfee' and student.is_postgrad:
     262            amount += academic_session.penalty_pg
     263        elif category == 'schoolfee':
     264            amount += academic_session.penalty_ug
     265        # Recategorize carryover fees.
    260266        if category.startswith('carryover'):
    261267            p_item = getUtility(IKofaUtils).PAYMENT_CATEGORIES[category]
     
    263269            # Now we change the category to reduce the number of categories.
    264270            category = 'schoolfee'
    265         # Add session specific penalty fee.
    266         if category == 'schoolfee' and student.is_postgrad:
    267             amount += academic_session.penalty_pg
    268         elif category == 'schoolfee':
    269             amount += academic_session.penalty_ug
    270271        if self._isPaymentDisabled(p_session, category, student):
    271272            return _('Payment temporarily disabled.'), None
Note: See TracChangeset for help on using the changeset viewer.