Ignore:
Timestamp:
10 Nov 2019, 20:11:40 (5 years ago)
Author:
Henrik Bettermann
Message:

Add payment status scholarship.

File:
1 edited

Legend:

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

    r15546 r15792  
    481481    two seperate export files. The exporter is primarily used by bursary
    482482    officers who have exclusively access to this exporter. The exporter
    483     exports ``paid`` and ``waived`` payment tickets.
     483    exports ``paid``, ``waived`` and ``scholarship`` payment tickets.
    484484    """
    485485    grok.name('bursary')
    486486
    487487    def filter_func(self, x, **kw):
    488         return get_payments(x, p_states=('paid', 'waived'), **kw)
     488        return get_payments(x, p_states=('paid', 'waived', 'scholarship'), **kw)
    489489
    490490    fields = tuple(
     
    517517class AccommodationPaymentsExporter(DataForBursaryExporter):
    518518    """The Accommodation Payments Exporter works like the Data for Bursary
    519     Exporter above. The exporter exports ``paid`` and ``waived`` payment
    520     tickets with category ``bed_allocation`` or ``hostel_maintenance``.
     519    Exporter above. The exporter exports ``paid``, ``waived`` and ``scholarship``
     520    payment tickets with category ``bed_allocation`` or ``hostel_maintenance``.
    521521    The exporter is primarily used by accommodation officers who have
    522522    exclusively access to this exporter.
     
    526526    def filter_func(self, x, **kw):
    527527        kw['paycat'] = 'bed_allocation'
    528         payments = get_payments(x, p_states=('paid', 'waived'), **kw)
     528        payments = get_payments(x, p_states=(
     529          'paid', 'waived', 'scholarship'), **kw)
    529530        kw['paycat'] = 'hostel_maintenance'
    530         payments += get_payments(x, p_states=('paid', 'waived'), **kw)
     531        payments += get_payments(x, p_states=(
     532          'paid', 'waived', 'scholarship'), **kw)
    531533        return payments
    532534
     
    589591        iterates over all paid school fee payment tickets and
    590592        adds together the amounts paid in a year. Waived payments
    591         are marked ``waived``.
     593        are marked ``waived`` and scholarship payments marked `scholarship`.
    592594        """
    593595        if name in self.year_range_tuple and context is not None:
     
    598600                    if ticket.p_state == 'waived':
    599601                        value = 'waived'
     602                        break
     603                    if ticket.p_state == 'scholarship':
     604                        value = 'scholarship'
    600605                        break
    601606                    if ticket.p_state == 'paid':
Note: See TracChangeset for help on using the changeset viewer.