Ignore:
Timestamp:
1 Dec 2020, 06:34:25 (4 years ago)
Author:
Henrik Bettermann
Message:

Configure jupeb payments.

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

Legend:

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

    r16316 r16337  
    120120        provider_amt = 0.0
    121121        student_union = 0.0
     122        jupeb_amt = 0.0
     123        reduced_inst_amt = 0.0
     124        lab_amt = 0.0
    122125        if self.context.p_category == 'schoolfee' and \
    123126            not self.context.p_item == 'Balance':
     
    127130        elif self.context.p_category == 'clearance':
    128131            provider_amt = self.dynamic_provider_amt(self.context.student)
    129         #elif self.context.p_category == 'pharmd_1':
    130         #    inst_acct = "0020197061015"
    131         #    provider_amt = 0.0
    132         if self.context.student.is_jupeb \
    133             or self.context.student.current_mode == 'dp_ft':
    134             inst_acct = "0040217361038"
     132
    135133        inst_amt = self.context.amount_auth - provider_amt - student_union
     134
    136135        lineitems = (
    137136                      {"lineItemsId":"itemid1","beneficiaryName":"Uniben",
     
    147146                          "beneficiaryAccount":"0025636203","bankCode":"039",
    148147                          "beneficiaryAmount":student_union,"deductFeeFrom":"0"},)
     148
     149        # We overwrite linetems in case of JUPEB students
     150        if self.context.student.is_jupeb:
     151            if self.context.p_category == 'clearance':
     152                provider_amt = self.dynamic_provider_amt(self.context.student)
     153                reduced_inst_amt = 0.7 * inst_amt
     154                jupeb_amt = 0.3 * inst_amt
     155            elif self.context.p_category == 'schoolfee' and \
     156                not self.context.p_item == 'Balance':
     157                provider_amt = self.dynamic_provider_amt(self.context.student)
     158                if context.student.depcode in ('AGR_JUP','EDU_JUP','ENG_JUP',
     159                                               'LSC_JUP','MED_JUP','PSC_JUP'):
     160                    lab_amt = 10000
     161                reduced_inst_amt = 0.7 * (inst_amt - lab_amt)
     162                jupeb_amt = 0.3 * (inst_amt - lab_amt) + lab_amt
     163            lineitems = (
     164                          {"lineItemsId":"itemid1","beneficiaryName":"Uniben",
     165                          "beneficiaryAccount":inst_acct,"bankCode":inst_bankcode,
     166                          "beneficiaryAmount":reduced_inst_amt,"deductFeeFrom":"1"},
     167                        )
     168            lineitems += ({"lineItemsId":"itemid2","beneficiaryName":"JUPEB",
     169                          "beneficiaryAccount":"0025636203","bankCode":"039",
     170                          "beneficiaryAmount":jupeb_amt,"deductFeeFrom":"0"},)
     171            if provider_amt:
     172                lineitems += ({"lineItemsId":"itemid3","beneficiaryName":"WAeAC",
     173                              "beneficiaryAccount":"1014261520","bankCode":"057",
     174                              "beneficiaryAmount":provider_amt,"deductFeeFrom":"0"},)
     175            if student_union:
     176                lineitems += ({"lineItemsId":"itemid4","beneficiaryName":"Student Union",
     177                              "beneficiaryAccount":"0025636203","bankCode":"039",
     178                              "beneficiaryAmount":student_union,"deductFeeFrom":"0"},)
     179
    149180
    150181        # Split pharmd school fee payments into 3 parts if students decide to pay the
  • main/waeup.uniben/trunk/src/waeup/uniben/students/student.py

    r15172 r16337  
    4848    @property
    4949    def is_jupeb(self):
    50         if self.faccode.startswith('JUPEB'):
     50        if self.current_mode == 'found':
    5151            return True
    5252        return False
Note: See TracChangeset for help on using the changeset viewer.