Changeset 15645 for main/kofacustom.iuokada/trunk/src
- Timestamp:
- 4 Oct 2019, 21:11:24 (5 years ago)
- Location:
- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/interfaces.py
r15590 r15645 79 79 # Additional fees in custom package add here 80 80 81 late_registration_fee = schema.Float( 82 title = _(u'Late Registration Fee'), 83 default = 0.0, 84 required = False, 85 ) 86 87 science_fee = schema.Float( 88 title = _(u'Science Bench Fee'), 89 default = 0.0, 90 required = False, 91 ) 92 93 clinical_fee = schema.Float( 94 title = _(u'Clinical Fee (Medical Students)'), 95 default = 0.0, 96 required = False, 97 ) 98 99 develop_fee = schema.Float( 100 title = _(u'Development Fee'), 101 default = 0.0, 102 required = False, 103 ) 104 105 municipal_fee = schema.Float( 106 title = _(u'Municipal Fee'), 107 default = 0.0, 108 required = False, 109 ) 110 111 alumni_fee = schema.Float( 112 title = _(u'Alumni Fee'), 113 default = 0.0, 114 required = False, 115 ) 116 117 conv_fee = schema.Float( 118 title = _(u'Convocation Fee'), 119 default = 0.0, 120 required = False, 121 ) 122 123 matric_fee = schema.Float( 124 title = _(u'Matriculation Fee'), 125 default = 0.0, 126 required = False, 127 ) 128 129 waecneco_fee = schema.Float( 130 title = _(u'WAEC & NECO Verification Fee'), 131 default = 0.0, 132 required = False, 133 ) 134 135 jambver_fee = schema.Float( 136 title = _(u'JAMB Verification Fee'), 137 default = 0.0, 138 required = False, 139 ) 140 141 book_fee = schema.Float( 142 title = _(u'Book Deposit'), 143 default = 0.0, 144 required = False, 145 ) 146 147 parentsconsult_fee = schema.Float( 148 title = _(u'Parents Consultative Forum (PCF) Fee'), 149 default = 0.0, 150 required = False, 151 ) 152 153 pharmlab_fee = schema.Float( 154 title = _(u'Pharmacy Lab Support Fee'), 155 default = 0.0, 156 required = False, 157 ) 81 158 82 159 def getSessionString(): -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/interswitch/browser.py
r15563 r15645 30 30 from kofacustom.iuokada.interfaces import MessageFactory as _ 31 31 32 PRODUCT_ID = ' ' # must be provided by Interswitch32 PRODUCT_ID = '6207' # must be provided by Interswitch 33 33 SITE_NAME = 'iuokada-kofa.waeup.org' 34 PROVIDER_ACCT = '0 0000000'35 PROVIDER_BANK_ID = ' 00'36 PROVIDER_ITEM_NAME = ' BT Education'34 PROVIDER_ACCT = '0773411069' 35 PROVIDER_BANK_ID = '31' 36 PROVIDER_ITEM_NAME = 'WAeAC' 37 37 INSTITUTION_NAME = 'IUOkada' 38 38 CURRENCY = '566' 39 39 GATEWAY_AMT = 150.0 40 MAC = ' ' # must be provided by Interswitch40 MAC = 'CEF793CBBE838AA0CBB29B74D571113B4EA6586D3BA77E7CFA0B95E278364EFC4526ED7BD255A366CDDE11F1F607F0F844B09D93B16F7CFE87563B2272007AB3' # must be provided by Interswitch 41 41 42 42 #POST_ACTION = 'https://webpay.interswitchng.com/paydirect/pay' -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/utils.py
r15569 r15645 30 30 # refix 31 31 STUDENT_ID_PREFIX = u'I' 32 33 def setPaymentDetails(self, category, student, 34 previous_session, previous_level): 35 """Create a payment ticket and set the payment data of a 36 student for the payment category specified. 37 """ 38 p_item = u'' 39 amount = 0.0 40 if previous_session: 41 if previous_session < student['studycourse'].entry_session: 42 return _('The previous session must not fall below ' 43 'your entry session.'), None 44 if category == 'schoolfee': 45 # School fee is always paid for the following session 46 if previous_session > student['studycourse'].current_session: 47 return _('This is not a previous session.'), None 48 else: 49 if previous_session > student['studycourse'].current_session - 1: 50 return _('This is not a previous session.'), None 51 p_session = previous_session 52 p_level = previous_level 53 p_current = False 54 else: 55 p_session = student['studycourse'].current_session 56 p_level = student['studycourse'].current_level 57 p_current = True 58 academic_session = self._getSessionConfiguration(p_session) 59 if academic_session == None: 60 return _(u'Session configuration object is not available.'), None 61 # Determine fee. 62 if category == 'schoolfee': 63 try: 64 certificate = student['studycourse'].certificate 65 p_item = certificate.code 66 except (AttributeError, TypeError): 67 return _('Study course data are incomplete.'), None 68 if previous_session: 69 # Students can pay for previous sessions in all 70 # workflow states. Fresh students are excluded by the 71 # update method of the PreviousPaymentAddFormPage. 72 if previous_level == 100: 73 amount = getattr(certificate, 'school_fee_1', 0.0) 74 else: 75 amount = getattr(certificate, 'school_fee_2', 0.0) 76 else: 77 if student.state == CLEARED: 78 amount = getattr(certificate, 'school_fee_1', 0.0) 79 elif student.state == RETURNING: 80 # In case of returning school fee payment the 81 # payment session and level contain the values of 82 # the session the student has paid for. Payment 83 # session is always next session. 84 p_session, p_level = self.getReturningData(student) 85 academic_session = self._getSessionConfiguration(p_session) 86 if academic_session == None: 87 return _( 88 u'Session configuration object is not available.' 89 ), None 90 amount = getattr(certificate, 'school_fee_2', 0.0) 91 elif student.is_postgrad and student.state == PAID: 92 # Returning postgraduate students also pay for the 93 # next session but their level always remains the 94 # same. 95 p_session += 1 96 academic_session = self._getSessionConfiguration(p_session) 97 if academic_session == None: 98 return _( 99 u'Session configuration object is not available.' 100 ), None 101 amount = getattr(certificate, 'school_fee_2', 0.0) 102 elif category == 'clearance': 103 try: 104 p_item = student['studycourse'].certificate.code 105 except (AttributeError, TypeError): 106 return _('Study course data are incomplete.'), None 107 amount = academic_session.clearance_fee 108 elif category == 'bed_allocation': 109 p_item = self.getAccommodationDetails(student)['bt'] 110 amount = academic_session.booking_fee 111 elif category == 'hostel_maintenance': 112 amount = 0.0 113 bedticket = student['accommodation'].get( 114 str(student.current_session), None) 115 if bedticket is not None and bedticket.bed is not None: 116 p_item = bedticket.bed_coordinates 117 if bedticket.bed.__parent__.maint_fee > 0: 118 amount = bedticket.bed.__parent__.maint_fee 119 else: 120 # fallback 121 amount = academic_session.maint_fee 122 else: 123 return _(u'No bed allocated.'), None 124 else: 125 fee_name = category + '_fee' 126 amount = getattr(academic_session, fee_name, 0.0) 127 if amount in (0.0, None): 128 return _('Amount could not be determined.'), None 129 if self.samePaymentMade(student, category, p_item, p_session): 130 return _('This type of payment has already been made.'), None 131 if self._isPaymentDisabled(p_session, category, student): 132 return _('This category of payments has been disabled.'), None 133 payment = createObject(u'waeup.StudentOnlinePayment') 134 timestamp = ("%d" % int(time()*10000))[1:] 135 payment.p_id = "p%s" % timestamp 136 payment.p_category = category 137 payment.p_item = p_item 138 payment.p_session = p_session 139 payment.p_level = p_level 140 payment.p_current = p_current 141 payment.amount_auth = amount 142 return None, payment -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/utils/utils.py
r10765 r15645 18 18 """Customize general helper utilities for Kofa. 19 19 """ 20 21 from copy import deepcopy 20 22 from kofacustom.nigeria.utils.utils import NigeriaKofaUtils 21 23 … … 24 26 """ 25 27 28 PAYMENT_CATEGORIES = { 29 'schoolfee': 'School Fee', 30 'clearance': 'Acceptance Fee', 31 'bed_allocation': 'Bed Allocation Fee', 32 'hostel_maintenance': 'Accommodation', 33 #'transfer': 'Transfer Fee', 34 #'gown': 'Gown Hire Fee', 35 'application': 'Application Fee', 36 'app_balance': 'Application Fee Balance', 37 'transcript': 'Transcript Fee', 38 'late_registration': 'Late Registration Fee', 39 'science': 'Science Bench Fee', 40 'clinical': 'Clinical Fee (Medical Students)', 41 'develop': 'Development Fee', 42 'municipal': 'Municipal Fee', 43 'alumni': 'Alumni Fee', 44 'conv': 'Convocation Fee', 45 'matric': 'Matriculation Fee', 46 'waecneco': 'WAEC & NECO Verification', 47 'jambver': 'JAMB Verification', 48 'book': 'Book Deposit', 49 'parentsconsult': 'Parents Consultative Forum (PCF) Fee', 50 'pharmlab': 'Pharmacy Lab Support Fee', 51 } 52 53 SELECTABLE_PAYMENT_CATEGORIES = { 54 'schoolfee': 'School Fee', 55 'clearance': 'Acceptance Fee', 56 #'bed_allocation': 'Bed Allocation Fee', 57 'hostel_maintenance': 'Accommodation', 58 #'transfer': 'Transfer Fee', 59 #'gown': 'Gown Hire Fee', 60 'application': 'Application Fee', 61 #'app_balance': 'Application Fee Balance', 62 #'transcript': 'Transcript Fee', 63 'late_registration': 'Late Registration Fee', 64 'science': 'Science Bench Fee', 65 'clinical': 'Clinical Fee (Medical Students)', 66 'develop': 'Development Fee', 67 'municipal': 'Municipal Fee', 68 'alumni': 'Alumni Fee', 69 'conv': 'Convocation Fee', 70 'matric': 'Matriculation Fee', 71 'waecneco': 'WAEC & NECO Verification', 72 'jambver': 'JAMB Verification', 73 'book': 'Book Deposit', 74 'parentsconsult': 'Parents Consultative Forum (PCF) Fee', 75 'pharmlab': 'Pharmacy Lab Support Fee', 76 } 77 78 PREVIOUS_PAYMENT_CATEGORIES = deepcopy(SELECTABLE_PAYMENT_CATEGORIES)
Note: See TracChangeset for help on using the changeset viewer.