- Timestamp:
- 7 Mar 2008, 07:18:02 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/Payment.py
r2947 r3274 57 57 security = ClassSecurityInfo() 58 58 59 security.declareProtected(View,"Title") ###( 59 # security.declareProtected(View,"Title") 60 # def Title(self): 61 # """compose title""" 62 # content = self.getContent() 63 # description = getattr(content,'type_description','') 64 # d = getattr(content,'date','') 65 # #pay_date = "%s/%s/%s %s:%s:%s" %(d[:2],d[2:4],d[4:6],d[6:8],d[8:10],d[10:]) 66 # pay_date = d.strftime("%d/%m/%y %H:%M:%S") 67 # amount = getattr(content,'amount','') 68 # if not (description or pay_date or amount): 69 # return self.getId() 70 # return "%(description)s, Naira %(amount)s, %(pay_date)s" % vars() 71 72 security.declareProtected(View,"Title") 60 73 def Title(self): 61 74 """compose title""" 62 content = self.getContent() 63 description = getattr(content,'type_description','') 64 d = getattr(content,'date','') 65 #pay_date = "%s/%s/%s %s:%s:%s" %(d[:2],d[2:4],d[4:6],d[6:8],d[8:10],d[10:]) 66 pay_date = d.strftime("%d/%m/%y %H:%M:%S") 67 amount = getattr(content,'amount','') 68 if not (description or pay_date or amount): 69 return self.getId() 70 return "%(description)s, Naira %(amount)s, %(pay_date)s" % vars() 71 ###) 75 payment = self.getContent() 76 vocabularies = self.portal_vocabularies 77 78 if payment.status == 'invalid': 79 return "Invalid Payment, Naira %s, %s" % (payment.amount, 80 payment.date.strftime("%d/%m/%y %H:%M:%S")) 81 82 return "%s for Session %s, Naira %s, %s" % (vocabularies.payment_categories.get(payment.category), 83 vocabularies.sessions.get(payment.session_id), 84 payment.amount, 85 payment.date.strftime("%d/%m/%y %H:%M:%S")) 86 72 87 73 88 # update Payment is no longer necessary … … 81 96 ## should not be done online for all started objects (too many conflict errors) 82 97 if status and status != 'started' and not type_description.startswith('Transfer') and not force: 83 #if status and not force: 98 #if status and not force: 84 99 return 85 100 wftool = self.portal_workflow
Note: See TracChangeset for help on using the changeset viewer.