Changeset 14770
- Timestamp:
- 4 Aug 2017, 20:53:07 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/remita/browser.py
r14768 r14770 52 52 action = 'http://www.remitademo.net/remita/ecomm/finalize.reg' 53 53 54 @property55 def lineitems(self):56 ba1 = self.context.amount_auth / 257 ba2 = self.context.amount_auth / 258 lineitems = (59 {"lineItemsId":"itemid1","beneficiaryName":"Klaus Mueller",60 "beneficiaryAccount":"6020067886","bankCode":"011",61 "beneficiaryAmount":str(ba1),"deductFeeFrom":"1"},62 {"lineItemsId":"itemid2","beneficiaryName":"Werner Rumm",63 "beneficiaryAccount":"0360883515","bankCode":"050",64 "beneficiaryAmount":str(ba2),"deductFeeFrom":"0"}65 )66 return lineitems54 #@property 55 #def lineitems(self): 56 # ba1 = self.context.amount_auth / 2 57 # ba2 = self.context.amount_auth / 2 58 # lineitems = ( 59 # {"lineItemsId":"itemid1","beneficiaryName":"Klaus Mueller", 60 # "beneficiaryAccount":"6020067886","bankCode":"011", 61 # "beneficiaryAmount":str(ba1),"deductFeeFrom":"1"}, 62 # {"lineItemsId":"itemid2","beneficiaryName":"Werner Rumm", 63 # "beneficiaryAccount":"0360883515","bankCode":"050", 64 # "beneficiaryAmount":str(ba2),"deductFeeFrom":"0"} 65 # ) 66 # return lineitems 67 67 68 68 def dynamic_provider_amt(self, student): … … 72 72 73 73 @property 74 def xxx_lineitems(self):74 def lineitems(self): 75 75 provider_amt = 0.0 76 76 if self.context.p_category == 'schoolfee' and \ 77 77 not self.context.p_item == 'Balance': 78 provider_amt = self.dynamic_provider_amt(self. student)78 provider_amt = self.dynamic_provider_amt(self.context.student) 79 79 elif self.context.p_category == 'clearance': 80 provider_amt = self.dynamic_provider_amt(self. student)80 provider_amt = self.dynamic_provider_amt(self.context.student) 81 81 inst_amt = self.context.amount_auth - provider_amt 82 82 if provider_amt: … … 100 100 if not module_activated(self.context.student.current_session): 101 101 return 102 self.orderId = self.context.p_id103 self.amount = str(self.context.amount_auth)104 102 error = self.init_update() 105 103 if error: … … 107 105 self.redirect(self.url(self.context, '@@index')) 108 106 return 107 self.orderId = self.context.p_id 108 self.amount = str(self.context.amount_auth) 109 109 return 110 110 … … 136 136 action = 'http://www.remitademo.net/remita/ecomm/finalize.reg' 137 137 138 #@property 139 #def lineitems(self): 140 # lineitems = ( 141 # {"lineItemsId":"itemid1","beneficiaryName":"Klaus Mueller", 142 # "beneficiaryAccount":"6020067886","bankCode":"011", 143 # "beneficiaryAmount":self.context.amount_auth/2,"deductFeeFrom":"1"}, 144 # {"lineItemsId":"itemid2","beneficiaryName":"Werner Rumm", 145 # "beneficiaryAccount":"0360883515","bankCode":"050", 146 # "beneficiaryAmount":self.context.amount_auth/2,"deductFeeFrom":"0"} 147 # ) 148 # return lineitems 149 138 150 @property 139 151 def lineitems(self): 140 152 provider_amt = 400.0 153 if self.context.__parent__.applicant_id.startswith('cbt'): 154 provider_amt = 200.0 155 inst_amt = self.context.amount_auth - provider_amt 141 156 lineitems = ( 142 {"lineItemsId":"itemid1","beneficiaryName":" Klaus Mueller",143 "beneficiaryAccount":" 6020067886","bankCode":"011",144 "beneficiaryAmount": self.context.amount_auth/2,"deductFeeFrom":"1"},145 {"lineItemsId":"itemid2","beneficiaryName":"W erner Rumm",146 "beneficiaryAccount":" 0360883515","bankCode":"050",147 "beneficiaryAmount": self.context.amount_auth/2,"deductFeeFrom":"0"}157 {"lineItemsId":"itemid1","beneficiaryName":"Uniben", 158 "beneficiaryAccount":"0040217361011","bankCode":"000", 159 "beneficiaryAmount":inst_amt,"deductFeeFrom":"1"}, 160 {"lineItemsId":"itemid2","beneficiaryName":"WAeAC", 161 "beneficiaryAccount":"1014261520","bankCode":"057", 162 "beneficiaryAmount":provider_amt,"deductFeeFrom":"0"} 148 163 ) 149 164 return lineitems … … 152 167 if not module_activated(self.context.__parent__.__parent__.year): 153 168 return 154 self.orderId = self.context.p_id155 self.amount = str(self.context.amount_auth)156 169 error = self.init_update() 157 170 if error: … … 159 172 self.redirect(self.url(self.context, '@@index')) 160 173 return 174 self.orderId = self.context.p_id 175 self.amount = str(self.context.amount_auth) 161 176 return
Note: See TracChangeset for help on using the changeset viewer.