Ignore:
Timestamp:
7 May 2014, 18:21:58 (11 years ago)
Author:
Henrik Bettermann
Message:

To guarantee that cleared students pay both acceptance fee and school fees,
the eTranzact History can only be queried for school fee payments if
acceptance/clearance fee has been successfully queried/paid beforehand.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/etranzact/browser.py

    r11582 r11627  
    275275    placeholder = _('Confirmation Number (PIN)')
    276276
     277    def update(self):
     278        super(EtranzactEnterPinPageStudent, self).update()
     279        if self.context.p_category != 'schoolfee':
     280            return
     281        student = self.context.student
     282        for ticket in student['payments'].values():
     283            if ticket.p_state == 'paid' and \
     284                ticket.p_category == 'clearance':
     285                return
     286        self.flash(_('Please pay acceptance fee first.'), type="danger")
     287        self.redirect(self.url(self.context, '@@index'))
     288        return
     289
    277290class EtranzactEnterPinPageApplicant(EtranzactEnterPinPageStudent):
    278291    """
Note: See TracChangeset for help on using the changeset viewer.