encyCode').value = 'EUR';
        document.getElementById('dateFormat').value = 'DD.MM.YYYY';
        
        updateFormatPreview();
    }
}

function testEmailSettings() {
    $('#testEmailModal').modal('show');
}

function sendTestEmail() {
    const emailAddress = document.getElementById('testEmailAddress').value;
    
    if (!emailAddress) {
        alert('Please enter an email address');
        return;
    }
    
    const testData = {
        toEmail: emailAddress
    };
    
    // Show loading st