Ignore:
Timestamp:
17 Oct 2018, 04:23:51 (6 years ago)
Author:
Henrik Bettermann
Message:

"only students with entry session equal to 2018 should pay the new items (LIBRARY DEVELOPMENT LEVY and SPORTS DEVELOPMENT FEE (NUGA & WAGU)) ... Returning students should be excluded" (see #513)

Location:
main/waeup.aaue/trunk/src/waeup/aaue
Files:
2 edited

Legend:

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

    r15190 r15192  
    296296                xmldict['student_union_due_amt'] = 100 * student_union_due_amt
    297297                xmldict['student_welfare_assurance_amt'] = 100 * student_welfare_assurance_amt
    298                 xmldict['sports_amt'] = 100 * sports_amt
    299                 if student.is_postgrad:
    300                     xmldict['library_amt'] = 100 * library_amt_pg
    301                 else:
    302                     xmldict['library_amt'] = 100 * library_amt
    303                 xmldict['institution_amt'] = 100 * (
    304                     gateway_net_amt(self.context.amount_auth)
    305                     - provider_amt
    306                     - joint_venture_amt
    307                     - aaue_share_amt
    308                     - student_union_due_amt
    309                     - student_welfare_assurance_amt
    310                     - sports_amt
    311                     - library_amt)
    312                 xmltext = """<payment_item_detail>
     298
     299                if student.entry_session == 2018 and student.is_fresh:
     300                    xmldict['sports_amt'] = 100 * sports_amt
     301                    if student.is_postgrad:
     302                        xmldict['library_amt'] = 100 * library_amt_pg
     303                    else:
     304                        xmldict['library_amt'] = 100 * library_amt
     305                    xmldict['institution_amt'] = 100 * (
     306                        gateway_net_amt(self.context.amount_auth)
     307                        - provider_amt
     308                        - joint_venture_amt
     309                        - aaue_share_amt
     310                        - student_union_due_amt
     311                        - student_welfare_assurance_amt
     312                        - sports_amt
     313                        - library_amt)
     314                    xmltext = """<payment_item_detail>
    313315<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    314316<item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" />
     
    320322<item_detail item_id="7" item_name="Sports Development Fee" item_amt="%(sports_amt)d" bank_id="123" acct_num="1005407792" />
    321323<item_detail item_id="8" item_name="Library Development Fee" item_amt="%(library_amt)d" bank_id="8" acct_num="2000122995" />
     324</item_details>
     325</payment_item_detail>""" % xmldict
     326                else:
     327                    xmldict['institution_amt'] = 100 * (
     328                        gateway_net_amt(self.context.amount_auth)
     329                        - provider_amt
     330                        - joint_venture_amt
     331                        - aaue_share_amt
     332                        - student_union_due_amt
     333                        - student_welfare_assurance_amt)
     334                    xmltext = """<payment_item_detail>
     335<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     336<item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" />
     337<item_detail item_id="2" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" />
     338<item_detail item_id="3" item_name="Joint Venture" item_amt="%(joint_venture_amt)d" bank_id="%(joint_venture_bank_id)s" acct_num="%(joint_venture_acct)s" />
     339<item_detail item_id="4" item_name="AAUE Share" item_amt="%(aaue_share_amt)d" bank_id="%(aaue_share_bank_id)s" acct_num="%(aaue_share_acct)s" />
     340<item_detail item_id="5" item_name="Student Union" item_amt="%(student_union_due_amt)d" bank_id="%(student_union_bank_id)s" acct_num="%(student_union_acct)s" />
     341<item_detail item_id="6" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="123" acct_num="1006407792" />
    322342</item_details>
    323343</payment_item_detail>""" % xmldict
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r15181 r15192  
    438438                    amount += gateway_net_amt(academic_session.welfare_fee) + \
    439439                        gateway_net_amt(academic_session.union_fee)
    440                 amount += gateway_net_amt(academic_session.sports_fee)
    441                 if student.is_postgrad:
    442                     amount += gateway_net_amt(academic_session.library_fee_pg)
    443                 else:
    444                     amount += gateway_net_amt(academic_session.library_fee)
     440                if student.entry_session == 2018 and student.is_fresh:
     441                    amount += gateway_net_amt(academic_session.sports_fee)
     442                    if student.is_postgrad:
     443                        amount += gateway_net_amt(academic_session.library_fee_pg)
     444                    else:
     445                        amount += gateway_net_amt(academic_session.library_fee)
    445446                if student.entry_session == 2016 \
    446447                    and student.entry_mode == 'ug_ft' \
Note: See TracChangeset for help on using the changeset viewer.