Ignore:
Timestamp:
18 Aug 2020, 09:09:15 (4 years ago)
Author:
Henrik Bettermann
Message:

Adjust lineitems.

File:
1 edited

Legend:

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

    r16204 r16205  
    261261    def lineitems(self):
    262262        provider_amt = 1000.0
    263         if not self.context.p_item != 'Balance':
    264             if self.context.__parent__.applicant_id.startswith('pre'):
    265                 provider_amt = 2000.0
    266             if self.context.__parent__.applicant_id.startswith('tsc'):
    267                 provider_amt = 1200.0
    268             if self.context.__parent__.applicant_id.startswith('ase'):
    269                 provider_amt = 500.0
     263        if self.context.__parent__.applicant_id.startswith('pre'):
     264            provider_amt = 2000.0
     265        if self.context.__parent__.applicant_id.startswith('tsc'):
     266            provider_amt = 1200.0
     267        if self.context.__parent__.applicant_id.startswith('ase'):
     268            provider_amt = 500.0
    270269        if self.context.__parent__.applicant_id.startswith('dp'):
    271270            inst_acct = "0040217361038"
     
    274273        if self.context.__parent__.applicant_id.startswith('cbt'):
    275274            provider_amt = 300.0
     275        if self.context.p_item == 'Balance':
     276            provider_amt = 0.0
    276277        inst_amt = self.context.amount_auth - provider_amt
    277278        lineitems = (
     
    279280                      "beneficiaryAccount":inst_acct,"bankCode":"000",
    280281                      "beneficiaryAmount":inst_amt,"deductFeeFrom":"1"},
    281                       {"lineItemsId":"itemid2","beneficiaryName":"WAeAC",
    282                       "beneficiaryAccount":"1014261520","bankCode":"057",
    283                       "beneficiaryAmount":provider_amt,"deductFeeFrom":"0"}
    284282                    )
     283        if provider_amt:
     284            lineitems += ({"lineItemsId":"itemid2","beneficiaryName":"WAeAC",
     285                          "beneficiaryAccount":"1014261520","bankCode":"057",
     286                          "beneficiaryAmount":provider_amt,"deductFeeFrom":"0"},)
     287
    285288        self.context.provider_amt = provider_amt
    286289        self.context.net_amt = inst_amt
Note: See TracChangeset for help on using the changeset viewer.