goOnInvoice') === 'on',
        currencySymbol: formData.get('currencySymbol'),
        currencyCode: formData.get('currencyCode'),
        dateFormat: formData.get('dateFormat')
    };
    
    fetch('/api/invoice-settings', {
        method: 'PUT',
        headers: {
            'Content-Type': 'application/json',
        },
        body: JSON.stringify(settings)
    })
    .then(response => response.json())
    .then(data => {
        if (data.error) {
            alert('Error: ' + data.error);
        }