document.addEventListener("DOMContentLoaded", () => { const invoiceForms = document.querySelectorAll(".invoice-form"); invoiceForms.forEach(form => { form.addEventListener("submit", () => { // Nach PDF-Erstellung Seite neu laden setTimeout(() => { window.location.reload(); }, 1000); }); }); }); document.addEventListener("DOMContentLoaded", () => { const invoiceForms = document.querySelectorAll(".invoice-form"); invoiceForms.forEach(form => { form.addEventListener("submit", () => { console.log("🧾 Rechnung erstellt – Reload folgt"); setTimeout(() => { window.location.reload(); }, 1200); }); }); });