Changeset 17151


Ignore:
Timestamp:
30 Oct 2022, 21:46:11 (23 months ago)
Author:
Henrik Bettermann
Message:

The year of discount is different for pg and ug students.

Location:
main/waeup.uniben/trunk/src/waeup/uniben
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/locales/en/LC_MESSAGES/waeup.kofa.po

    r17111 r17151  
    66"Last-Translator: Henrik Bettermann <henrik@waeup.org>\n"
    77"Language-Team: \n"
     8"Language: en\n"
    89"MIME-Version: 1.0\n"
    910"Content-Type: text/plain; charset=iso-8859-1\n"
    1011"Content-Transfer-Encoding: 8bit\n"
    11 "Language: en\n"
    12 "X-Generator: Poedit 1.6.5\n"
     12"X-Generator: Poedit 3.2\n"
    1313
    1414#: waeup/kofa/applicants/viewlets.py:137
     
    4646
    4747msgid "Custom Float 1 (not used)"
    48 msgstr "New Students Discount (entry session < 2020)"
     48msgstr "New Students Discount"
    4949
    5050msgid "Custom Float 2 (not used)"
    51 msgstr "Returning Students Discount (entry session < 2020)"
     51msgstr "Returning Students Discount"
    5252
    5353msgid ""
  • main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py

    r17145 r17151  
    338338            except (AttributeError, TypeError):
    339339                return _('Study course data are incomplete.'), None
     340            discount_year = 2017
     341            if student.is_postgrad:
     342                discount_year = 2020
    340343            if previous_session:
    341344                # Students can pay for previous sessions in all workflow states.
     
    348351                        amount = getattr(certificate, 'school_fee_1', 0.0)
    349352                        # Old new students get a discount.
    350                         if student.entry_session < 2020 \
     353                        if student.entry_session < discount_year \
    351354                            and certificate.custom_float_1:
    352355                            amount -= certificate.custom_float_1                       
     
    357360                        amount = getattr(certificate, 'school_fee_2', 0.0)
    358361                        # Old returning students get a discount.
    359                         if student.entry_session < 2020 \
     362                        if student.entry_session < discount_year \
    360363                            and certificate.custom_float_2:
    361364                            amount -= certificate.custom_float_2
     
    367370                        amount = getattr(certificate, 'school_fee_1', 0.0)
    368371                        # Old new students get a discount.
    369                         if student.entry_session < 2020 \
     372                        if student.entry_session < discount_year \
    370373                            and certificate.custom_float_1:
    371374                            amount -= certificate.custom_float_1                             
     
    389392                    else:
    390393                        amount = getattr(certificate, 'school_fee_2', 0.0)
     394                        # Old returning students might get a discount.
     395                        if student.entry_session < discount_year \
     396                            and certificate.custom_float_2:
     397                            amount -= certificate.custom_float_2
    391398                elif student.state == RETURNING:
    392399                    # In case of returning school fee payment the payment session
     
    412419                        amount = getattr(certificate, 'school_fee_2', 0.0)
    413420                        # Old returning students might get a discount.
    414                         if student.entry_session < 2020 \
     421                        if student.entry_session < discount_year \
    415422                            and certificate.custom_float_2:
    416423                            amount -= certificate.custom_float_2
Note: See TracChangeset for help on using the changeset viewer.