Step 1: Select Unit Type

Step 2: Select Payment Plan

Step 3: Enter Unit Price

Enter your unit's offer price to see your personalised payment timeline.

Payment Schedule

Cost of Acquisition

Unit Price AED 0
4% DLD (Dubai Land Department) AED 0
Admin Fees AED 5,000
5% VAT on Fees AED 0
Total Cost AED 0
Enquire Now

The Chedi Private Residences

Payment Schedule

Unit Type: ${unitName}

Payment Plan: ${plan.name}

Unit Price: AED ${new Intl.NumberFormat('en-AE').format(unitPrice)}

`; let cumulative = 0; plan.milestones.forEach((milestone, index) => { const amount = Math.round((milestone.percentage / 100) * unitPrice); cumulative += amount; html += ` `; }); const dld = Math.round(unitPrice * 0.04); const adminFees = 5000; const vat = Math.round(adminFees * 0.05); const total = unitPrice + dld + adminFees + vat; html += `
Payment Percentage Amount (AED) Trigger Cumulative (AED)
${milestone.title} ${milestone.percentage}% AED ${new Intl.NumberFormat('en-AE').format(amount)} ${milestone.trigger} AED ${new Intl.NumberFormat('en-AE').format(cumulative)}

Cost of Acquisition

Unit Price AED ${new Intl.NumberFormat('en-AE').format(unitPrice)}
4% DLD (Dubai Land Department) AED ${new Intl.NumberFormat('en-AE').format(dld)}
Admin Fees AED ${new Intl.NumberFormat('en-AE').format(adminFees)}
5% VAT on Fees AED ${new Intl.NumberFormat('en-AE').format(vat)}
Total Cost AED ${new Intl.NumberFormat('en-AE').format(total)}
`; const blob = new Blob([html], { type: 'text/html' }); const link = document.createElement('a'); link.href = URL.createObjectURL(blob); link.download = `Payment-Schedule-${unitName.replace(/\s+/g, '-')}.html`; link.click(); URL.revokeObjectURL(link.href); }); // ============================================================================ // COOKIE BANNER // ============================================================================ const cookieBanner = document.getElementById('cookieBanner'); const showCookieBanner = () => { if (!localStorage.getItem('cookieConsent')) { setTimeout(() => { cookieBanner.classList.add('show'); }, 1000); } }; showCookieBanner(); // ============================================================================ // LANGUAGE SWITCH // ============================================================================ // Pre-fill from URL params (from inventory page link) try { const urlParams = new URLSearchParams(window.location.search); const prePrice = urlParams.get('price'); const preUnit = urlParams.get('unit'); const preFloor = urlParams.get('floor'); if (prePrice && unitPriceInput) { unitPriceInput.value = parseInt(prePrice).toLocaleString('en-AE'); // Auto-select Plan A and trigger calculation const defaultPlan = document.querySelector('input[name="paymentPlan"][value="plan6535"]'); if (defaultPlan) defaultPlan.checked = true; generateTimeline(); } } catch(e) {} document.getElementById('langSwitch').addEventListener('click', function() { const currentLang = this.textContent; this.textContent = currentLang === 'EN' ? 'AR' : 'EN'; alert('Language switcher would redirect to: ' + (currentLang === 'EN' ? '/ar/payment-plan.html' : '/en/payment-plan.html')); }); // ============================================================================ // ANALYTICS // ============================================================================ // Track calculator usage document.querySelectorAll('input[type="radio"], input[type="number"]').forEach(input => { input.addEventListener('change', () => { if (window.dataLayer) { window.dataLayer.push({ event: 'calculator_interaction', eventCategory: 'Payment Calculator', eventAction: 'Input Changed', eventLabel: input.name }); } }); }); // Track downloads document.getElementById('downloadBtn').addEventListener('click', () => { if (window.dataLayer) { window.dataLayer.push({ event: 'download_schedule', eventCategory: 'Payment Calculator', eventAction: 'Download Schedule', eventLabel: 'PDF Download' }); } }); document.getElementById('cookieDecline')?.addEventListener('click', function() { document.getElementById('cookieBanner').style.transform='translateY(100%)'; document.cookie='chedi_consent=declined;path=/;max-age=2592000'; }); document.getElementById('cookieAccept')?.addEventListener('click', function() { document.getElementById('cookieBanner').style.transform='translateY(100%)'; document.cookie='chedi_consent=accepted;path=/;max-age=31536000'; });