Changeset 6898 for main/waeup.sirp/trunk/src/waeup
- Timestamp:
- 15 Oct 2011, 05:04:19 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r6877 r6898 877 877 payment.surcharge_3) = getPaymentDetails( 878 878 data['p_category'],self.context.__parent__) 879 if payment.amount_auth == 0:880 self.flash('Payment amount could not be determined.')881 self.redirect(self.url(self.context, u'@@manage'))882 return879 #if payment.amount_auth == 0: 880 # self.flash('Payment amount could not be determined.') 881 # self.redirect(self.url(self.context, u'@@manage')) 882 # return 883 883 self.context[payment.p_id] = payment 884 884 self.flash('Payment ticket created.') -
main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py
r6877 r6898 21 21 return 22 22 23 # To be defined in customization packages 23 24 def getPaymentDetails(category, student): 24 p_session = student['studycourse'].current_session25 p_session = None 25 26 surcharge_1 = surcharge_2 = surcharge_3 = 0 26 27 p_item = u'' 27 if category == 'transfer': 28 amount = 500 29 elif category == 'gown': 30 amount = 500 31 elif category == 'hostel_maintenance': 32 amount = 300 33 elif category == 'schoolfee': 34 surcharge_1 = 1500 # BT amount 35 surcharge_2 = 300 # Interswitch amount 36 amount = getSchoolFee(student, surcharge_1 + surcharge_2) 37 code = student['studycourse'].certificate.code 38 #session_string = academic_sessions_vocab.by_value[p_session + 1].title 39 p_item = code 40 p_session += 1 28 amount = 0 41 29 return amount, p_item, p_session, surcharge_1, surcharge_2, surcharge_3 42 43 # To be moved to the FUTMinna customization package44 def getSchoolFee(student, surcharge):45 study_mode = student['studycourse'].certificate.study_mode46 entry_mode = student.entry_mode47 state = student.state48 #lga = student.lga49 lga = 'nothing'50 current_level = student['studycourse'].current_level51 CLEARED = 'cleared'52 53 if study_mode.endswith('_ft'):54 # fresh remedial55 if current_level == 0 and state == CLEARED:56 if entry_mode == 'rmd_ft':57 return 80200 - surcharge58 else:59 return 74200 - surcharge60 # fresh61 elif state == CLEARED:62 if study_mode == 'jm_ft':63 return 72700 - surcharge64 elif lga == 'foreigner':65 return 131500 - surcharge66 else:67 return 41500 - surcharge68 # returning69 elif state == 'returning':70 if study_mode == 'jm_ft':71 return 32500 - surcharge72 elif lga == 'foreigner':73 return 109500 - surcharge74 else:75 return 19500 - surcharge76 else:77 return 078 else:79 return 0
Note: See TracChangeset for help on using the changeset viewer.