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

Use init_update and samePaymentMade methods.

File:
1 edited

Legend:

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

    r11623 r11646  
    251251        if amount in (0.0, None):
    252252            return _(u'Amount could not be determined.'), None
    253         for key in student['payments'].keys():
    254             ticket = student['payments'][key]
    255             if ticket.p_state == 'paid' and\
    256                ticket.p_category == category and \
    257                ticket.p_item == p_item and \
    258                ticket.p_session == p_session:
    259                   return _('This type of payment has already been made.'), None
     253        if self.samePaymentMade(student, category, p_item, p_session):
     254            return _('This type of payment has already been made.'), None
    260255        # Add session specific penalty fee.
    261256        if category == 'schoolfee' and student.is_postgrad:
Note: See TracChangeset for help on using the changeset viewer.