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.

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

    r13403 r13406  
    317317        self.browser.getLink(value).click()
    318318        self.assertTrue('Amount Authorized' in self.browser.contents)
    319         self.assertEqual(self.student['payments'][value].amount_auth, 51750.0)
     319        self.assertEqual(self.student['payments'][value].amount_auth, 51250.0)
    320320        self.browser.open(self.browser.url + '/payment_slip.pdf')
    321321        self.assertEqual(self.browser.headers['Status'], '200 Ok')
  • 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.