Changeset 15320 for main/waeup.uniben/trunk/src/waeup/uniben/students
- Timestamp:
- 4 Feb 2019, 12:15:59 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
r15318 r15320 189 189 installments += ticket.amount_auth 190 190 return installments 191 192 def samePaymentMade(self, student, category, p_item, p_session): 193 if category == 'bed_allocation': 194 return False 195 for key in student['payments'].keys(): 196 ticket = student['payments'][key] 197 if ticket.p_state == 'paid' and\ 198 ticket.p_category == category and \ 199 ticket.p_item == p_item and \ 200 ticket.p_session == p_session: 201 return True 202 return False 191 203 192 204 def setPaymentDetails(self, category, student, … … 389 401 category = 'hostel_maintenance' 390 402 # Create ticket. 391 if category != 'bed_allocation' \ 392 and self.samePaymentMade(student, category, p_item, p_session): 403 if self.samePaymentMade(student, category, p_item, p_session): 393 404 return _('This type of payment has already been made.'), None 394 405 if self._isPaymentDisabled(p_session, category, student):
Note: See TracChangeset for help on using the changeset viewer.