Ignore:
Timestamp:
18 Jun 2018, 05:20:14 (6 years ago)
Author:
Henrik Bettermann
Message:

Add payment session filter to payment exporters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/export.py

    r15051 r15055  
    136136    p_end = kw.get('payments_end')
    137137    paycat = kw.get('paycat')
     138    paysession = kw.get('paysession')
    138139    for student in students:
    139140        for payment in student.get('payments', {}).values():
     
    152153                continue
    153154            if paycat not in ('all', None) and payment.p_category != paycat:
     155                continue
     156            if paysession not in ('all', None) and payment.p_session != paysession:
    154157                continue
    155158            payments.append(payment)
     
    206209            del kw['payments_end']
    207210            del kw['paycat']
     211            del kw['paysession']
    208212        except KeyError:
    209213            pass
    210         # Coursetickets can be filtered level and session.
     214        # Coursetickets can be filtered by level and session.
    211215        # These parameters are not keys of the catalog and must thus be
    212216        # removed from kw.
Note: See TracChangeset for help on using the changeset viewer.