Changeset 10682
- Timestamp:
- 1 Nov 2013, 09:11:10 (11 years ago)
- Location:
- main/waeup.kwarapoly/trunk/src/waeup/kwarapoly
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interfaces.py
r9347 r10682 59 59 60 60 maint_fee = schema.Float( 61 title = _(u'Maintenance Fee ( ignored)'),61 title = _(u'Maintenance Fee (fallback)'), 62 62 default = 0.0, 63 63 required = False, -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py
r10675 r10682 204 204 self.assertMatches('...Amount Authorized...', 205 205 self.browser.contents) 206 # Maint fee is taken from the session configurationobject207 self.assertMatches( 208 '...<span> 987.0</span>...',206 # Maint fee is taken from the hostel object 207 self.assertMatches( 208 '...<span>876.0</span>...', 209 209 self.browser.contents) 210 210 self.payment_url = self.browser.url … … 223 223 self.browser.contents) 224 224 self.assertMatches( 225 '...<input type="hidden" name="amount" value=" 98700.0" />...',226 self.browser.contents) 227 self.assertMatches( 228 '...item_name="Hostel Maintenance Fee" item_amt=" 68700" bank_id="31" acct_num="0039050937"...',225 '...<input type="hidden" name="amount" value="87600.0" />...', 226 self.browser.contents) 227 self.assertMatches( 228 '...item_name="Hostel Maintenance Fee" item_amt="57600" bank_id="31" acct_num="0039050937"...', 229 229 self.browser.contents) 230 230 -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py
r10679 r10682 282 282 self.assertEqual(payment.p_level, 100) 283 283 self.assertEqual(payment.p_session, 2004) 284 self.assertEqual(payment.amount_auth, 876.0) 285 self.assertEqual(payment.p_item, u'My bed coordinates') 286 self.assertEqual(error, None) 287 288 self.app['hostels']['hall-1'].maint_fee = 0.0 289 error, payment = utils.setPaymentDetails('hostel_maintenance',self.student) 290 self.assertEqual(payment.p_level, 100) 291 self.assertEqual(payment.p_session, 2004) 284 292 self.assertEqual(payment.amount_auth, 180.0) 285 self.assertEqual(payment.p_item, u' ')293 self.assertEqual(payment.p_item, u'My bed coordinates') 286 294 self.assertEqual(error, None) 287 295 -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/utils.py
r10679 r10682 178 178 amount = academic_session.booking_fee 179 179 elif category == 'hostel_maintenance': 180 amount = academic_session.maint_fee 180 amount = 0.0 181 bedticket = student['accommodation'].get( 182 str(student.current_session), None) 183 if bedticket: 184 p_item = bedticket.bed_coordinates 185 if bedticket.bed.__parent__.maint_fee > 0: 186 amount = bedticket.bed.__parent__.maint_fee 187 else: 188 # fallback 189 amount = academic_session.maint_fee 190 else: 191 # Should not happen because this is already checked 192 # in the browser module, but anyway ... 193 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 194 p_item = trans(_('no bed allocated'), portal_language) 181 195 elif category == 'clearance': 182 196 amount = academic_session.clearance_fee
Note: See TracChangeset for help on using the changeset viewer.