- Timestamp:
- 18 Jun 2018, 05:20:14 (7 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/CHANGES.txt
r15051 r15055 4 4 1.6.1.dev0 (unreleased) 5 5 ======================= 6 7 * Add payment session filter to payment exporters. 6 8 7 9 * Add `SessionPaymentsOverviewExporter`. -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r15051 r15055 3437 3437 def update(self, START=None, session=None, level=None, mode=None, 3438 3438 payments_start=None, payments_end=None, ct_level=None, 3439 ct_session=None, paycat=None, exporter=None):3439 ct_session=None, paycat=None, paysession=None, exporter=None): 3440 3440 self._set_session_values() 3441 3441 self._set_level_values() … … 3476 3476 payments_end = payments_end, 3477 3477 paycat=paycat, 3478 paysession=paysession, 3478 3479 ct_level = ct_level, 3479 3480 ct_session = ct_session, … … 3491 3492 payments_end = payments_end, 3492 3493 paycat=paycat, 3494 paysession=paysession, 3493 3495 ct_level = ct_level, 3494 3496 ct_session = ct_session,) 3495 3497 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 3496 3498 self.context.logger.info( 3497 '%s - exported: %s (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s ), job_id=%s'3499 '%s - exported: %s (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s), job_id=%s' 3498 3500 % (ob_class, exporter, session, level, mode, self.faccode, 3499 3501 self.depcode, self.certcode, payments_start, payments_end, 3500 ct_level, ct_session, paycat, job_id))3502 ct_level, ct_session, paycat, paysession, job_id)) 3501 3503 self.flash(_('Export started for students with') + 3502 3504 ' current_session=%s, current_level=%s, study_mode=%s' % ( -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/exportconfig.pt
r15042 r15055 81 81 </span> 82 82 83 <span id="paysession" style="display: none;"> 84 <br /> 85 <label for="paysession" i18n:translate=""> 86 Payment Sessions 87 </label> 88 <select name="paysession" class="form-control half"> 89 <option tal:repeat="item view/sessions" 90 tal:attributes="value python:item[1]"> 91 <span tal:replace="python: item[0]">2018/2019</span> 92 </option> 93 </select> 94 <br /> 95 </span> 96 83 97 <span id="ct_data" style="display: none;"> 84 98 <br /> … … 120 134 document.getElementById('paycat').style.display = 'block'; 121 135 document.getElementById('ct_data').style.display = 'none'; 136 document.getElementById('paysession').style.display = 'block'; 137 122 138 } else if (document.getElementById('exporter').value == 'coursetickets') { 123 139 document.getElementById('ct_data').style.display = 'block'; 124 140 document.getElementById('payment_dates').style.display = 'none'; 125 141 document.getElementById('paycat').style.display = 'none'; 142 document.getElementById('paysession').style.display = 'none'; 143 126 144 } else { 127 145 document.getElementById('ct_data').style.display = 'none'; 128 146 document.getElementById('payment_dates').style.display = 'none'; 129 147 document.getElementById('paycat').style.display = 'none'; 148 document.getElementById('paysession').style.display = 'none'; 130 149 } 131 150 } -
main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
r15051 r15055 136 136 p_end = kw.get('payments_end') 137 137 paycat = kw.get('paycat') 138 paysession = kw.get('paysession') 138 139 for student in students: 139 140 for payment in student.get('payments', {}).values(): … … 152 153 continue 153 154 if paycat not in ('all', None) and payment.p_category != paycat: 155 continue 156 if paysession not in ('all', None) and payment.p_session != paysession: 154 157 continue 155 158 payments.append(payment) … … 206 209 del kw['payments_end'] 207 210 del kw['paycat'] 211 del kw['paysession'] 208 212 except KeyError: 209 213 pass 210 # Coursetickets can be filtered level and session.214 # Coursetickets can be filtered by level and session. 211 215 # These parameters are not keys of the catalog and must thus be 212 216 # removed from kw. -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r15047 r15055 3539 3539 'zope.mgr - students.browser.DatacenterExportJobContainerJobConfig ' 3540 3540 '- exported: bursary (2004, 100, ug_ft, None, None, None, ' 3541 '13/12/2012, 14/12/2012, all, all, all ), job_id=%s'3541 '13/12/2012, 14/12/2012, all, all, all, all), job_id=%s' 3542 3542 % job_id in logcontent 3543 3543 ) … … 3635 3635 'zope.mgr - students.browser.FacultiesExportJobContainerJobConfig ' 3636 3636 '- exported: bursary (2004, 100, ug_ft, None, None, None, ' 3637 '13/12/2012, 14/12/2012, all, all, schoolfee ), job_id=%s'3637 '13/12/2012, 14/12/2012, all, all, schoolfee, all), job_id=%s' 3638 3638 % job_id in logcontent 3639 3639 ) … … 3696 3696 'zope.mgr - students.browser.FacultyExportJobContainerJobConfig ' 3697 3697 '- exported: students (2004, 100, ug_ft, fac1, None, None, ' 3698 '13/12/2012, 14/12/2012, all, all, all ), job_id=%s'3698 '13/12/2012, 14/12/2012, all, all, all, all), job_id=%s' 3699 3699 % job_id in logcontent 3700 3700 ) … … 3748 3748 'zope.mgr - students.browser.DepartmentExportJobContainerJobConfig ' 3749 3749 '- exported: students (2004, 100, ug_ft, None, dep1, None, ' 3750 '13/12/2012, 14/12/2012, all, all, all ), job_id=%s'3750 '13/12/2012, 14/12/2012, all, all, all, all), job_id=%s' 3751 3751 % job_id in logcontent 3752 3752 ) … … 3795 3795 'zope.mgr - students.browser.CertificateExportJobContainerJobConfig ' 3796 3796 '- exported: students ' 3797 '(2004, 100, None, None, None, CERT1, , , None, None, None ), '3797 '(2004, 100, None, None, None, CERT1, , , None, None, None, None), ' 3798 3798 'job_id=%s' 3799 3799 % job_id in logcontent
Note: See TracChangeset for help on using the changeset viewer.