Changeset 17111


Ignore:
Timestamp:
29 Sep 2022, 06:18:06 (2 years ago)
Author:
Henrik Bettermann
Message:

Change discounts for old students.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/browser/pages.py

    r14974 r17111  
    8484        'ratio',
    8585        'custom_textline_1', 'custom_textline_2',
    86         'custom_float_2')
     86        )
    8787
    8888class CustomCertificateManageFormPage(CertificateManageFormPage):
     
    9292        'ratio',
    9393        'custom_textline_1', 'custom_textline_2',
    94         'custom_float_2', 'code')
     94        'code')
  • main/waeup.uniben/trunk/src/waeup/uniben/locales/en/LC_MESSAGES/waeup.kofa.po

    r16759 r17111  
    4646
    4747msgid "Custom Float 1 (not used)"
    48 msgstr "Old Returning Discount"
     48msgstr "New Students Discount (entry session < 2020)"
     49
     50msgid "Custom Float 2 (not used)"
     51msgstr "Returning Students Discount (entry session < 2020)"
    4952
    5053msgid ""
  • main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py

    r16946 r17111  
    608608        # Old returning students may pay less.
    609609        self.certificate.school_fee_2 = 50000.0
    610         self.certificate.custom_float_1 = 30000.0
     610        self.certificate.custom_float_2 = 30000.0
    611611        error, payment = utils.setPaymentDetails(
    612612            'schoolfee', self.student, None, None, None)
     
    614614
    615615        # Staff members pay less.
    616         self.certificate.custom_float_1 = None
     616        self.certificate.custom_float_2 = None
    617617        self.student.is_staff = True
    618618        error, payment = utils.setPaymentDetails('schoolfee',
  • main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py

    r16906 r17111  
    345345                    else:
    346346                        amount = getattr(certificate, 'school_fee_1', 0.0)
     347                        # Old new students get a discount.
     348                        if student.entry_session < 2020 \
     349                            and certificate.custom_float_1:
     350                            amount -= certificate.custom_float_1                       
    347351                else:
    348352                    if student.is_foreigner:
     
    350354                    else:
    351355                        amount = getattr(certificate, 'school_fee_2', 0.0)
    352                         # Old returning students might get a discount.
    353                         if student.entry_session < 2017 \
    354                             and certificate.custom_float_1:
    355                             amount -= certificate.custom_float_1
     356                        # Old returning students get a discount.
     357                        if student.entry_session < 2020 \
     358                            and certificate.custom_float_2:
     359                            amount -= certificate.custom_float_2
    356360            else:
    357361                if student.state == CLEARED:
     
    360364                    else:
    361365                        amount = getattr(certificate, 'school_fee_1', 0.0)
     366                        # Old new students get a discount.
     367                        if student.entry_session < 2020 \
     368                            and certificate.custom_float_1:
     369                            amount -= certificate.custom_float_1                             
    362370                elif student.state == PAID and student.is_postgrad:
    363371                    p_session += 1
     
    402410                        amount = getattr(certificate, 'school_fee_2', 0.0)
    403411                        # Old returning students might get a discount.
    404                         if student.entry_session < 2017 \
    405                             and certificate.custom_float_1:
    406                             amount -= certificate.custom_float_1
     412                        if student.entry_session < 2020 \
     413                            and certificate.custom_float_2:
     414                            amount -= certificate.custom_float_2
    407415                # PHARMD school fee amount is fixed and previously paid
    408416                # installments in current session are deducted.
Note: See TracChangeset for help on using the changeset viewer.