Changeset 8708
- Timestamp:
- 13 Jun 2012, 13:29:35 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/payment.py
r8703 r8708 84 84 85 85 @property 86 def payee(self): 86 def display_fullname(self): 87 "Name of payee." 87 88 return self.context.__parent__.display_fullname 89 90 @property 91 def id(self): 92 "Id of payee" 93 return self.context.__parent__.applicant_id 94 95 @property 96 def faculty(self): 97 "Faculty of payee" 98 return '' 99 100 @property 101 def department(self): 102 "Department of payee" 103 return '' 88 104 89 105 # Applicant online payments must be importable. So we might need a factory. -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r8703 r8708 732 732 self.assertEqual(payment.amount_auth,200.0) 733 733 # Applicant is payee of the payment ticket. 734 self.assertEqual(IPaymentWebservice(payment).payee, 'John Tester') 734 self.assertEqual( 735 IPaymentWebservice(payment).display_fullname, 'John Tester') 736 self.assertEqual( 737 IPaymentWebservice(payment).id, self.applicant.applicant_id) 738 self.assertEqual(IPaymentWebservice(payment).faculty, '') 739 self.assertEqual(IPaymentWebservice(payment).department, '') 735 740 # The pdf payment slip can't yet be opened 736 741 #self.browser.open(payment_url + '/payment_receipt.pdf') -
main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py
r8703 r8708 146 146 """ 147 147 148 def payee(): 149 "Payments are usually paid by a payee." 148 def display_fullname(): 149 "Name of payee." 150 151 def id(): 152 "Id of payee" 153 154 def faculty(): 155 "Faculty of payee" 156 157 def department(): 158 "Department of payee" -
main/waeup.kofa/trunk/src/waeup/kofa/students/payments.py
r8703 r8708 137 137 138 138 @property 139 def payee(self): 139 def display_fullname(self): 140 "Name of payee." 140 141 return self.context.getStudent().display_fullname 142 143 @property 144 def id(self): 145 "Id of payee" 146 return self.context.getStudent().student_id 147 148 @property 149 def faculty(self): 150 "Faculty of payee" 151 return self.context.getStudent().faccode 152 153 @property 154 def department(self): 155 "Department of payee" 156 return self.context.getStudent().depcode 141 157 142 158 # Student online payments must be importable. So we might need a factory. -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r8703 r8708 159 159 self.certificate.school_fee_1 = 40000.0 160 160 self.certificate.school_fee_2 = 20000.0 161 self.app['faculties']['fac1'] = Faculty( )161 self.app['faculties']['fac1'] = Faculty(code='fac1') 162 162 self.app['faculties']['fac1']['dep1'] = Department(code='dep1') 163 163 self.app['faculties']['fac1']['dep1'].certificates.addCertificate( … … 1475 1475 1476 1476 # Student is the payee of the payment ticket. 1477 self.assertEqual(IPaymentWebservice( 1478 self.student['payments'][value]).payee, 'Anna Tester') 1477 webservice = IPaymentWebservice(self.student['payments'][value]) 1478 self.assertEqual(webservice.display_fullname, 'Anna Tester') 1479 self.assertEqual(webservice.id, self.student_id) 1480 self.assertEqual(webservice.faculty, 'fac1') 1481 self.assertEqual(webservice.department, 'dep1') 1479 1482 1480 1483 # We simulate the approval -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r8688 r8708 225 225 """ 226 226 grok.implements(IStudentsUtils) 227 paymentfactory = u'waeup.StudentOnlinePayment'228 227 229 228 def getReturningData(self, student): … … 305 304 ticket.p_session == p_session: 306 305 return _('This type of payment has already been made.'), None 307 payment = createObject( self.paymentfactory)306 payment = createObject(u'waeup.StudentOnlinePayment') 308 307 timestamp = "%d" % int(time()*1000) 309 308 payment.p_id = "p%s" % timestamp
Note: See TracChangeset for help on using the changeset viewer.