/** * public/js/invoice-select.js * Ersetzt onchange="this.form.submit()" in Rechnungs-Filtern (CSP-sicher) */ document.addEventListener('DOMContentLoaded', function () { const ids = ['cancelledYear', 'creditYear', 'paidYear', 'paidQuarter']; ids.forEach(function (id) { const el = document.getElementById(id); if (el) { el.addEventListener('change', function () { const form = this.closest('form'); if (form) form.submit(); }); } }); });