Ignore:
Timestamp:
6 Mar 2018, 16:10:56 (7 years ago)
Author:
Henrik Bettermann
Message:

Implement school fee installment payment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py

    r14932 r14960  
    178178    #    return False
    179179
     180    def _pharmdInstallments(self, student):
     181        installments = 0.0
     182        if len(student['payments']):
     183            for ticket in student['payments'].values():
     184                if ticket.p_state == 'paid' and \
     185                    ticket.p_category.startswith('pharmd') and \
     186                    ticket.p_session == student.current_session:
     187                    installments += ticket.amount_auth
     188        return installments
     189
    180190    def setPaymentDetails(self, category, student,
    181191            previous_session, previous_level):
     
    218228        elif category == 'clinexam':
    219229            amount = academic_session.clinexam_fee
     230        elif category.startswith('pharmd') \
     231            and student.current_mode == 'special_ft':
     232            amount = 80000.0
    220233        elif category == 'bed_allocation':
    221234            p_item = self.getAccommodationDetails(student)['bt']
     
    348361                            and certificate.custom_float_1:
    349362                            amount -= certificate.custom_float_1
     363                # PHARMD school fee amount is fixed and previously paid
     364                # installments in current session are deducted.
     365                if student.current_mode == 'special_ft':
     366                    amount = 240000.0 - self._pharmdInstallments(student)
    350367            # Give 50% school fee discount to staff members.
    351368            if student.is_staff:
Note: See TracChangeset for help on using the changeset viewer.