Changeset 15433


Ignore:
Timestamp:
29 May 2019, 12:05:52 (5 years ago)
Author:
Henrik Bettermann
Message:

Adjust to changes in base package.

Location:
main/waeup.aaue/trunk/src/waeup/aaue
Files:
2 edited

Legend:

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

    r15428 r15433  
    348348    def selectable_categories(self):
    349349        if 'alumni' in self.application_url():
    350             return self.ALUMNI_PAYMENT_CATS.items()
     350            return sorted(
     351                self.ALUMNI_PAYMENT_CATS.items(), key=lambda value: value[1])
    351352        if self.context.student.current_mode in (
    352353            'special_pg_ft', 'special_pg_pt', 'found', 'bridge'):
    353             return self.REDUCED_PAYMENT_CATS.items()
     354            return sorted(
     355                self.REDUCED_PAYMENT_CATS.items(), key=lambda value: value[1])
    354356        if self.context.student.current_mode in (
    355357            'ug_pt', 'de_pt','dp_pt', 'de_dsh', 'ug_dsh'):
    356             return self.PT_AND_DSH_PAYMENT_CATS.items()
     358            return sorted(
     359                self.PT_AND_DSH_PAYMENT_CATS.items(),
     360                key=lambda value: value[1])
    357361        if self.context.student.current_mode == 'ijmbe':
    358             return sorted(self.IJMBE_PAYMENT_CATS.items())
    359         categories = getUtility(IKofaUtils).SELECTABLE_PAYMENT_CATEGORIES
    360         return sorted(categories.items())
     362            return sorted(
     363                self.IJMBE_PAYMENT_CATS.items(), key=lambda value: value[1])
     364        student = self.context.__parent__
     365        categories = getUtility(
     366            IKofaUtils).selectable_payment_categories(student)
     367        return sorted(categories.items(), key=lambda value: value[1])
    361368
    362369class CustomPaymentsManageFormPage(PaymentsManageFormPage):
  • main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py

    r15431 r15433  
    9898        'restitution': 'Restitution Fee',
    9999        }
     100
     101    def selectable_payment_categories(self, student):
     102        return self.SELECTABLE_PAYMENT_CATEGORIES
    100103
    101104    REPORTABLE_PAYMENT_CATEGORIES = {
Note: See TracChangeset for help on using the changeset viewer.