Ignore:
Timestamp:
9 Mar 2017, 10:42:42 (8 years ago)
Author:
Henrik Bettermann
Message:

Enable balance payments. Add gateway amount to balance amount. No other surcharges.

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

Legend:

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

    r14587 r14616  
    2828from waeup.kofa.fees import FeeTable
    2929from waeup.kofa.hostels.hostel import NOT_OCCUPIED
     30from waeup.kwarapoly.interswitch.browser import GATEWAY_AMT
    3031from waeup.kwarapoly.interfaces import MessageFactory as _
    3132
     
    277278        return None, payment
    278279
     280    def setBalanceDetails(self, category, student,
     281            balance_session, balance_level, balance_amount):
     282        """Create a balance payment ticket and set the payment data
     283        as selected by the student. Kwarapoly: Add Interswitch surcharge
     284        """
     285        p_item = u'Balance'
     286        p_session = balance_session
     287        p_level = balance_level
     288        p_current = False
     289        amount = balance_amount
     290        academic_session = self._getSessionConfiguration(p_session)
     291        if academic_session == None:
     292            return _(u'Session configuration object is not available.'), None
     293        if amount in (0.0, None) or amount < 0:
     294            return _('Amount must be greater than 0.'), None
     295        payment = createObject(u'waeup.StudentOnlinePayment')
     296        timestamp = ("%d" % int(time()*10000))[1:]
     297        payment.p_id = "p%s" % timestamp
     298        payment.p_category = category
     299        payment.p_item = p_item
     300        payment.p_session = p_session
     301        payment.p_level = p_level
     302        payment.p_current = p_current
     303        payment.amount_auth = amount + GATEWAY_AMT
     304        return None, payment
     305
    279306    def getAccommodationDetails(self, student):
    280307        """Determine the accommodation data of a student.
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/viewlets.py

    r12907 r14616  
    3535        return ''
    3636
    37 class AddBalancePaymentActionButton(AddBalancePaymentActionButton):
     37#class AddBalancePaymentActionButton(AddBalancePaymentActionButton):
    3838
    39     @property
    40     def target_url(self):
    41         return ''
     39#    @property
     40#    def target_url(self):
     41#        return ''
    4242
    4343class AdmissionNotificationActionButton(ManageActionButton):
Note: See TracChangeset for help on using the changeset viewer.