Ignore:
Timestamp:
14 May 2014, 05:30:03 (11 years ago)
Author:
Henrik Bettermann
Message:

Use init_update and samePaymentMade methods.

File:
1 edited

Legend:

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

    r11457 r11649  
    278278        if amount in (0.0, None):
    279279            return _(u'Amount could not be determined.'), None
    280         for key in student['payments'].keys():
    281             ticket = student['payments'][key]
    282             if ticket.p_state == 'paid' and\
    283                ticket.p_category == category and \
    284                ticket.p_item == p_item and \
    285                ticket.p_session == p_session:
    286                   return _('This type of payment has already been made.'), None
     280        if self.samePaymentMade(student, category, p_item, p_session):
     281            return _('This type of payment has already been made.'), None
    287282        if self._isPaymentDisabled(p_session, category, student):
    288283            return _('Payment temporarily disabled.'), None
Note: See TracChangeset for help on using the changeset viewer.