function a(){const e=document.getElementById("createInvoiceBillingForm");if(!e)return;const t=new FormData(e);t.set("is_active",document.getElementById("create_is_active").checked?"1":"0"),t.set("is_automatic",document.getElementById("create_is_automatic").checked?"1":"0");try{const n=document.getElementById("create_settings").value.trim();n&&JSON.parse(n);const i=document.getElementById("create_mapping_fields").value.trim();i&&JSON.parse(i)}catch{window.showError("JSON formatında hata var. Lütfen ayarlar ve eşleştirme alanlarını kontrol edin.");return}e.submit()}function r(){const e=document.getElementById("createInvoiceBillingForm");e&&e.addEventListener("submit",function(t){t.preventDefault(),a()})}document.addEventListener("DOMContentLoaded",function(){r()});
