Ignore:
Timestamp:
7 Nov 2015, 12:05:48 (9 years ago)
Author:
Henrik Bettermann
Message:

Prepare function for computing the gateway amount dynamically (will be modified on next Monday).

Transaction fee is already embedded in each of the fee items and must this be substracted.

File:
1 edited

Legend:

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

    r13405 r13406  
    2424from waeup.kofa.accesscodes import create_accesscode
    2525from waeup.kofa.students.utils import trans
     26from waeup.aaue.interswitch.browser import dynamic_gateway_amt
    2627from waeup.aaue.interfaces import MessageFactory as _
    2728
     
    148149                    # Otherwise we can't add somtehing
    149150                    amount = 0.0
    150                 amount += academic_session.matric_gown_fee + academic_session.lapel_fee
     151                amount += academic_session.matric_gown_fee + \
     152                          academic_session.lapel_fee - \
     153                          2*(dynamic_gateway_amt(amount))
    151154        elif category == 'late_registration':
    152155            amount = academic_session.late_registration_fee
     
    183186                    # Otherwise we can't add somtehing
    184187                    amount = 0.0
    185                 amount += academic_session.welfare_fee + academic_session.union_fee
     188                amount += academic_session.welfare_fee + \
     189                          academic_session.union_fee - \
     190                          2*(dynamic_gateway_amt(amount))
    186191        if amount in (0.0, None):
    187192            return _(u'Amount could not be determined.'), None
Note: See TracChangeset for help on using the changeset viewer.