Ignore:
Timestamp:
30 Jun 2020, 07:02:41 (4 years ago)
Author:
Henrik Bettermann
Message:

Customize setBalanceDetails. Compulsory Fees must also be applied to Custom/Balance? Payment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/utils.py

    r16136 r16138  
    113113            return _(u'Session configuration object is not available.'), None
    114114        # Determine fee.
    115         if category in ('schoolfee', 'schoolfee40',
    116                         'secondinstal'):
     115        if category in ('schoolfee', 'schoolfee40', 'secondinstal'):
    117116            rpm = self._requiredPaymentsMissing(student, p_session)
    118117            if rpm:
     
    216215        return None, payment
    217216
     217    def setBalanceDetails(self, category, student,
     218            balance_session, balance_level, balance_amount):
     219        """Create a balance payment ticket and set the payment data
     220        as selected by the student.
     221        """
     222        if category in ('schoolfee', 'schoolfee40', 'secondinstal'):
     223            rpm = self._requiredPaymentsMissing(student, balance_session)
     224            if rpm:
     225                return rpm, None
     226        return super(
     227            CustomStudentsUtils, self).setBalanceDetails(category, student,
     228            balance_session, balance_level, balance_amount)
     229
    218230    def constructMatricNumber(self, student):
    219231        """Fetch the matric number counter which fits the student and
Note: See TracChangeset for help on using the changeset viewer.