Changeset 7928 for main/waeup.custom/trunk
- Timestamp:
- 20 Mar 2012, 14:37:35 (13 years ago)
- Location:
- main/waeup.custom/trunk/src/waeup/custom
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.custom/trunk/src/waeup/custom/interfaces.py
r7880 r7928 31 31 # Base fees, do not remove. 32 32 33 school_fee_base = schema. Int(33 school_fee_base = schema.Float( 34 34 title = _(u'School Fee (ignored)'), 35 default = 0 ,35 default = 0.0, 36 36 required = False, 37 37 ) 38 38 39 surcharge_1 = schema. Int(39 surcharge_1 = schema.Float( 40 40 title = _(u'Surcharge Portal Provider'), 41 default = 0 ,41 default = 0.0, 42 42 required = False, 43 43 ) 44 44 45 surcharge_2 = schema. Int(45 surcharge_2 = schema.Float( 46 46 title = _(u'Surcharge Interswitch'), 47 default = 0 ,47 default = 0.0, 48 48 required = False, 49 49 ) 50 50 51 surcharge_3 = schema. Int(51 surcharge_3 = schema.Float( 52 52 title = _(u'Surcharge 3'), 53 default = 0 ,53 default = 0.0, 54 54 required = False, 55 55 ) 56 56 57 clearance_fee = schema. Int(57 clearance_fee = schema.Float( 58 58 title = _(u'Clearance Fee'), 59 default = 0 ,59 default = 0.0, 60 60 required = False, 61 61 ) 62 62 63 booking_fee = schema. Int(63 booking_fee = schema.Float( 64 64 title = _(u'Booking Fee'), 65 default = 0 ,65 default = 0.0, 66 66 required = False, 67 67 ) 68 68 69 acceptance_fee = schema. Int(69 acceptance_fee = schema.Float( 70 70 title = _(u'Acceptance Fee'), 71 default = 0 ,71 default = 0.0, 72 72 required = False, 73 73 ) … … 75 75 # Additional fees in waeup.custom 76 76 77 maint_fee = schema. Int(77 maint_fee = schema.Float( 78 78 title = _(u'Maintenance Fee'), 79 default = 0 ,79 default = 0.0, 80 80 required = False, 81 81 ) 82 82 83 gown = schema. Int(83 gown = schema.Float( 84 84 title = _(u'Gown Fee'), 85 default = 0 ,85 default = 0.0, 86 86 required = False, 87 87 ) 88 88 89 transfer = schema. Int(89 transfer = schema.Float( 90 90 title = _(u'Transfer Fee'), 91 default = 0 ,91 default = 0.0, 92 92 required = False, 93 93 ) -
main/waeup.custom/trunk/src/waeup/custom/interswitch/browser.py
r7926 r7928 197 197 self.context.r_code = query.get('resp', None) 198 198 self.context.r_pay_reference = query.get('payRef', None) 199 self.context.r_amount_approved = int(query.get('apprAmt', '0')) / 100199 self.context.r_amount_approved = float(query.get('apprAmt', '0.0')) / 100 200 200 self.context.r_desc = query.get('desc', None) 201 201 … … 260 260 self.context.r_code = wlist[0] 261 261 self.context.r_desc = wlist[1] 262 self.context.r_amount_approved = int(wlist[2]) / 100262 self.context.r_amount_approved = float(wlist[2]) / 100 263 263 self.context.r_card_num = wlist[3] 264 264 self.context.r_pay_reference = wlist[5] -
main/waeup.custom/trunk/src/waeup/custom/interswitch/tests.py
r7926 r7928 59 59 self.browser.contents) 60 60 self.assertMatches( 61 '...<input type="hidden" name="amount" value="4000000 " />...',61 '...<input type="hidden" name="amount" value="4000000.0" />...', 62 62 self.browser.contents) 63 63 -
main/waeup.custom/trunk/src/waeup/custom/students/tests/test_browser.py
r7895 r7928 96 96 def test_manage_payments(self): 97 97 # Add missing configuration data 98 self.app['configuration']['2004'].gown_fee = 150 99 self.app['configuration']['2004'].transfer_fee = 90 100 self.app['configuration']['2004'].clearance_fee = 120 101 self.app['configuration']['2004'].maint_fee = 180 98 self.app['configuration']['2004'].gown_fee = 150.0 99 self.app['configuration']['2004'].transfer_fee = 90.0 100 self.app['configuration']['2004'].clearance_fee = 120.0 101 self.app['configuration']['2004'].maint_fee = 180.0 102 102 103 103 # Managers can add online payment tickets -
main/waeup.custom/trunk/src/waeup/custom/students/utils.py
r7879 r7928 33 33 # fresh 34 34 if state == CLEARED: 35 return 40000 - surcharge35 return 40000.0 - surcharge 36 36 # returning 37 37 elif state == RETURNING: 38 return 20000 - surcharge38 return 20000.0 - surcharge 39 39 else: 40 return 0 40 return 0.0 41 41 else: 42 return 0 42 return 0.0 43 43 44 44 class StudentsUtils(StudentsUtils): … … 59 59 def getPaymentDetails(self, category, student): 60 60 d = {} 61 d['surcharge_1'] = d['surcharge_2'] = d['surcharge_3'] = 0 61 d['surcharge_1'] = d['surcharge_2'] = d['surcharge_3'] = 0.0 62 62 d['p_item'] = u'' 63 d['amount'] = 0 63 d['amount'] = 0.0 64 64 d['error'] = u'' 65 65 d['p_session'] = student['studycourse'].current_session … … 88 88 d['p_item'] = code 89 89 d['p_session'] += 1 90 if d['amount'] == 0 :90 if d['amount'] == 0.0: 91 91 d['error'] = _(u'Amount could not be determined.') 92 92 return d
Note: See TracChangeset for help on using the changeset viewer.