Ignore:
Timestamp:
23 May 2018, 05:45:13 (7 years ago)
Author:
Henrik Bettermann
Message:

Further customize payment components.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/students/utils.py

    r15013 r15015  
    118118                return _('Study course data are incomplete.'), None
    119119            if previous_session:
    120                 # Students can pay for previous sessions in all
    121                 # workflow states.  Fresh students are excluded by the
    122                 # update method of the PreviousPaymentAddFormPage.
    123                 if previous_level == 100:
    124                     amount = getattr(certificate, 'school_fee_1', 0.0)
    125                 else:
    126                     amount = getattr(certificate, 'school_fee_2', 0.0)
     120                amount = getattr(certificate, 'school_fee_1', 0.0)
    127121            else:
    128                 if student.state == CLEARED:
    129                     amount = getattr(certificate, 'school_fee_1', 0.0)
    130                 elif student.state == RETURNING:
     122                amount = getattr(certificate, 'school_fee_1', 0.0)
     123                if student.state == RETURNING:
    131124                    # In case of returning school fee payment the
    132125                    # payment session and level contain the values of
     
    139132                            u'Session configuration object is not available.'
    140133                            ), None
    141                     amount = getattr(certificate, 'school_fee_2', 0.0)
     134                   
    142135                elif student.is_postgrad and student.state == PAID:
    143136                    # Returning postgraduate students also pay for the
     
    150143                            u'Session configuration object is not available.'
    151144                            ), None
    152                     amount = getattr(certificate, 'school_fee_2', 0.0)
    153145        elif category == 'clearance':
    154146            try:
     
    179171        elif category == 'siwess_combo':
    180172            amount = academic_session.siwess_combo_fee
     173        elif category == 'transcript':
     174            amount = academic_session.transcript_fee
     175        elif category == 'certificate':
     176            amount = academic_session.certificate_fee
    181177        if amount in (0.0, None):
    182178            return _('Amount could not be determined.'), None
Note: See TracChangeset for help on using the changeset viewer.