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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.