- Timestamp:
- 7 Nov 2015, 06:16:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py
r13400 r13403 49 49 50 50 51 def school(student):51 def contr_agreement(student): 52 52 if student.current_mode == 'found' or student.current_mode.endswith('_pt'): 53 return ' pt'54 return ' regular'53 return 'first' 54 return 'second' 55 55 56 56 class CustomInterswitchPageApplicant(InterswitchPageApplicant): … … 141 141 self.redirect(self.url(self.context, '@@index')) 142 142 return 143 if school(student) == 'pt':143 if contr_agreement(student) == 'first': 144 144 self.product_id = PRODUCT_ID_PT 145 145 else: … … 180 180 # Schoolfee 181 181 if self.context.p_category.startswith('schoolfee'): 182 if school(student) == 'pt':183 # PT schoolfee settings182 if contr_agreement(student) == 'first': 183 # First agreement 184 184 provider_amt = 1900.0 185 185 joint_venture_amt = 1100.0 … … 194 194 self.pay_item_id = '105' 195 195 else: 196 # REGULAR schoolfee settings196 # Second agreement 197 197 provider_amt = 1500.0 198 198 joint_venture_amt = 1000.0 … … 249 249 # Clearance 250 250 elif self.context.p_category.startswith('clearance'): 251 if school(student) == 'pt':252 # PT clearance settings251 if contr_agreement(student) == 'first': 252 # First agreement 253 253 if student.current_mode == 'found': 254 254 self.pay_item_id = '102' … … 258 258 xmldict['institution_bank_id'] = '117' 259 259 else: 260 # REGULAR clearance settings260 # Second agreement 261 261 self.pay_item_id = '102' 262 262 xmldict['institution_acct'] = '1010827641' 263 263 xmldict['institution_bank_id'] = '117' 264 265 264 266 265 if self.context.p_category == 'clearance_incl': … … 294 293 </payment_item_detail>""" % xmldict 295 294 296 # Union Due 295 # Union Dues 297 296 elif self.context.p_category == 'union': 298 297 self.pay_item_id = '103' … … 307 306 </payment_item_detail>""" % xmldict 308 307 309 # Lapel 308 # Lapel/File 310 309 elif self.context.p_category == 'lapel': 311 310 self.pay_item_id = '104' … … 320 319 </payment_item_detail>""" % xmldict 321 320 322 # Welfare 321 # Welfare Assurance 323 322 elif self.context.p_category == 'welfare': 324 323 self.pay_item_id = '105' … … 359 358 </payment_item_detail>""" % xmldict 360 359 361 # Medical 360 # Medical Acceptance 362 361 elif self.context.p_category == 'medical': 363 362 self.pay_item_id = '108' … … 423 422 @property 424 423 def product_id(self): 425 if school(self.context.student) == 'pt':424 if contr_agreement(self.context.student) == 'first': 426 425 return PRODUCT_ID_PT 427 426 return PRODUCT_ID_REGULAR
Note: See TracChangeset for help on using the changeset viewer.