Changeset 12568
- Timestamp:
- 7 Feb 2015, 11:26:19 (10 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py
r11450 r12568 27 27 (_('Paid'),'paid'), 28 28 (_('Failed'),'failed'), 29 (_('Fees waived'),'waived'), 29 30 ) 30 31 -
main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
r12518 r12568 475 475 value = 0 476 476 for ticket in context['payments'].values(): 477 if ticket.p_state == 'paid' and \ 478 ticket.p_category == 'schoolfee' and \ 477 if ticket.p_category == 'schoolfee' and \ 479 478 ticket.p_session == int(name): 480 try: 481 value += ticket.amount_auth 482 except TypeError: 483 pass 479 if ticket.p_state == 'waived': 480 value = 'waived' 481 break 482 if ticket.p_state == 'paid': 483 try: 484 value += ticket.amount_auth 485 except TypeError: 486 pass 484 487 if value == 0: 485 488 value = '' -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
r12518 r12568 1078 1078 payment_2.p_session = curr_year - 5 1079 1079 payment_2.amount_auth = 13.13 1080 payment_2.p_state = u'paid'1080 payment_2.p_state = 'paid' 1081 1081 payment_2.p_category = u'schoolfee' 1082 1082 self.student['payments']['my-2ndpayment'] = payment_2 … … 1087 1087 payment_3.p_session = curr_year - 5 1088 1088 payment_3.amount_auth = 1.01 1089 payment_3.p_state = u'paid'1089 payment_3.p_state = 'paid' 1090 1090 payment_3.p_category = u'schoolfee' 1091 1091 self.student['payments']['my-3rdpayment'] = payment_3 1092 # One session school fee has been waived 1093 payment_4 = StudentOnlinePayment() 1094 payment_4.p_id = 'my-id_2' 1095 payment_4.p_session = curr_year - 4 1096 payment_4.amount_auth = 1.01 1097 payment_4.p_state = 'waived' 1098 payment_4.p_category = u'schoolfee' 1099 self.student['payments']['my-4thpayment'] = payment_4 1092 1100 exporter = StudentPaymentsOverviewExporter() 1093 1101 exporter.export_all(self.app, self.outfile) … … 1098 1106 'current_level,current_session,current_mode,' 1099 1107 '%s\r\nA111111,234,Anna M. Tester,created,CERT1,NA,NA,0,' 1100 '200,2012,ug_ft,,,,,14.14, ,12.12,,,\r\n'1108 '200,2012,ug_ft,,,,,14.14,waived,12.12,,,\r\n' 1101 1109 % year_range_str in result 1102 1110 )
Note: See TracChangeset for help on using the changeset viewer.