Changeset 13720


Ignore:
Timestamp:
22 Feb 2016, 08:20:08 (9 years ago)
Author:
Henrik Bettermann
Message:

Instalment payment: students must pay the full gateway amount twice.

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

Legend:

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

    r13678 r13720  
    220220        self.assertEqual(self.student['payments'].values()[0].p_category, 'schoolfee_1')
    221221        self.assertEqual(self.student['payments'].values()[1].p_category, 'schoolfee_2')
    222         # 6666/2 + 1250 + 750 - 500
    223         self.assertEqual(self.student['payments'].values()[0].amount_auth, 4833.0)
    224         # 6666/2
    225         self.assertEqual(self.student['payments'].values()[1].amount_auth, 3333.0)
     222        # (6666-250)/2 + 1250 + 750 - 500 + 250
     223        self.assertEqual(self.student['payments'].values()[0].amount_auth, 4958.0)
     224        # (6666-250)/2 + 250
     225        self.assertEqual(self.student['payments'].values()[1].amount_auth, 3458.0)
    226226        return
    227227
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r13689 r13720  
    2525from waeup.kofa.accesscodes import create_accesscode
    2626from waeup.kofa.students.utils import trans
    27 from waeup.aaue.interswitch.browser import gateway_net_amt
     27from waeup.aaue.interswitch.browser import gateway_net_amt, GATEWAY_AMT
    2828from waeup.aaue.interfaces import MessageFactory as _
    2929
     
    208208                # Cut school fee by 50%
    209209                if category in ('schoolfee_1', 'schoolfee_2'):
    210                     amount = amount / 2
     210                    if amount:
     211                        amount = gateway_net_amt(amount) / 2 + GATEWAY_AMT
    211212            elif category == 'schoolfee_1':
    212213                return _("Wrong state. Only students in state 'cleared' "
Note: See TracChangeset for help on using the changeset viewer.