Ignore:
Timestamp:
2 Aug 2023, 14:03:16 (14 months ago)
Author:
Henrik Bettermann
Message:

Add additional fees also to tuition when splitting amounts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py

    r17523 r17529  
    336336                else:
    337337                    sorted_items = SCHOOLFEES[22][student.certcode].items()
    338                 # Move tuition
     338                # Move tuition. We expect that tuition is the fourth element
    339339                sorted_items.insert(0, sorted_items.pop(3))
    340340                for item in sorted_items:
     
    342342                        if  item[1].startswith('100_') and student.state == CLEARED:
    343343                            # first year payment only
    344                             item_amt = 100 * int(item[1].split('_')[1])
     344                            item_amt = int(item[1].split('_')[1])
    345345                        else:
    346                             item_amt = 100 * int(item[1])
     346                            item_amt = int(item[1])
    347347                        if self.context.p_category == 'schoolfee_1' and item[0] == 'tuition':
    348348                            item_amt /= 2
     349                        # Add non-indigenous fee and session specific penalty fees
     350                        try:
     351                            academic_session = grok.getSite()['configuration'][str(self.context.p_session)]
     352                        except KeyError:
     353                            self.flash(
     354                                _('Session configuration object is missing.'), type="danger")
     355                            self.redirect(self.url(self.context, '@@index'))
     356                            return
     357                        if student.is_postgrad and item[0] == 'tuition':
     358                            item_amt += academic_session.penalty_pg
     359                            if student.lga and not student.lga.startswith('edo') \
     360                                and student.entry_session < 2022:
     361                                item_amt += 20000.0
     362                        else:
     363                            item_amt += academic_session.penalty_ug
     364                        item_amt *= 100
    349365                        acct_num = ''
    350366                        bank_id = ''
Note: See TracChangeset for help on using the changeset viewer.