Changeset 15770 for main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/payoutletbrowser.py
- Timestamp:
- 7 Nov 2019, 15:43:51 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/payoutletbrowser.py
r15755 r15770 44 44 grok.templatedir('browser_templates') 45 45 46 def module_activated(session): 46 def module_activated(session, payment): 47 if payment.r_company and payment.r_company != 'etranzact': 48 return False 47 49 try: 48 50 return getattr(grok.getSite()['configuration'][str(session)], … … 61 63 @property 62 64 def target_url(self): 63 if not module_activated(self.context.__parent__.__parent__.year): 65 if not module_activated( 66 self.context.__parent__.__parent__.year, self.context): 64 67 return '' 65 68 if self.context.p_state in ('paid', 'waived'): … … 77 80 @property 78 81 def target_url(self): 79 if not module_activated(self.context.student.current_session): 82 if not module_activated( 83 self.context.student.current_session, self.context): 80 84 return '' 81 85 if self.context.p_state in ('paid', 'waived'): … … 98 102 99 103 def update(self): 100 if not module_activated(self.context.student.current_session): 104 if not module_activated( 105 self.context.student.current_session, self.context): 101 106 return 102 if self.context.r_company and self.context.r_company != 'etranzact':103 return _("Payment ticket has been used for another payment gateway.")104 107 super(EtranzactEnterPinPageStudent, self).update() 105 108 # Already now it becomes an Etranzact payment. We set the net amount … … 129 132 130 133 def update(self, confirmation_number=None): 131 if not module_activated(self.context.student.current_session): 134 if not module_activated( 135 self.context.student.current_session, self.context): 132 136 return 133 137 if self.context.p_state == 'paid': … … 163 167 164 168 def update(self, confirmation_number=None): 165 if not module_activated(self.context.__parent__.__parent__.year): 169 if not module_activated( 170 self.context.__parent__.__parent__.year, self.context): 166 171 return 167 172 if self.context.p_state == 'paid':
Note: See TracChangeset for help on using the changeset viewer.