Silver
📡
120 GB / mies.
25 zł/msc brutto
20,33 zł netto/msc
Aktywacja od 0 zł0 zł (12 msc) / 20 zł netto · 24,60 zł brutto (nieokr.)
📦
Wysyłkae-SIM 0 zł / SIM 15 zł netto · 18,45 zł brutto
⭐ Gold
🚀
Bez limitu GB
60 zł/msc brutto
48,78 zł netto/msc
Aktywacja od 0 zł0 zł (12 msc) / 20 zł netto · 24,60 zł brutto (nieokr.)
📦
Wysyłkae-SIM 0 zł / SIM 15 zł netto · 18,45 zł brutto
Ceny brutto zawierają 23% VAT. Aktywacja: 0 zł (umowa 12 msc) lub 20 zł netto (czas nieokreślony).
'; var iframe = document.getElementById('imPreviewIframe'); var doc = iframe.contentDocument || iframe.contentWindow.document; doc.open(); doc.write(html); doc.close(); setTimeout(function() { try { var h = doc.documentElement.scrollHeight || doc.body.scrollHeight; if (h > 100) iframe.style.height = (h + 20) + 'px'; } catch(e) {} }, 300); imShowStep(2); } // ── Wysyłka: do siebie ── function imSendSelf() { if (!imFormData) return; var data = Object.assign({}, imFormData); data.sendTo = imEmailFirmowy || imFormData.email; imDoSend(data, data.sendTo); } // ── Wysyłka: do klienta ── function imSendClient() { if (!imFormData) return; if (!confirm('Potwierdzasz, \u017Ce klient wyrazi\u0142 zgod\u0119 na otrzymanie oferty na adres: ' + imFormData.email + '?')) return; var data = Object.assign({}, imFormData); data.sendTo = imFormData.email; imDoSend(data, data.sendTo); } // ── Loader z krokami ── function imSetStepState(idx, state) { var el = document.getElementById('imLS_' + idx); if (!el) return; var icon = el.querySelector('.im-ls-icon'); var fill = el.querySelector('.im-ls-fill'); var label = el.querySelector('.im-ls-label'); if (state === 'active') { if (icon) { icon.style.background = 'transparent'; icon.innerHTML = '
'; } if (fill) { fill.style.width = '0%'; fill.style.background = '#3b82f6'; fill.style.animation = 'im-pulse 1.5s ease-in-out infinite'; } if (label) { label.style.color = '#1e40af'; label.style.fontWeight = '600'; } } else if (state === 'done') { if (icon) { icon.style.background = '#dcfce7'; icon.innerHTML = '\u2705'; } if (fill) { fill.style.animation = 'none'; fill.style.width = '100%'; fill.style.background = '#22c55e'; } if (label) { label.style.color = '#166534'; label.style.fontWeight = '400'; } } else if (state === 'error') { if (icon) { icon.style.background = '#fee2e2'; icon.innerHTML = '\u274C'; } if (fill) { fill.style.animation = 'none'; fill.style.width = '100%'; fill.style.background = '#ef4444'; } if (label) { label.style.color = '#991b1b'; label.style.fontWeight = '400'; } } } function imBuildLoader(customSteps) { var steps = customSteps || [ 'Generowanie oferty PDF', 'Wysy\u0142anie e-maila' ]; var h = ''; h += '
'; h += '

Przygotowywanie oferty...

'; for (var i = 0; i < steps.length; i++) { h += '
'; h += '
\u2022
'; h += '
' + steps[i] + '
'; h += '
'; h += '
'; } h += '
'; document.getElementById('imLoaderContent').innerHTML = h; } function imDoSend(data, targetEmail) { imShowStep(3); imBuildLoader(); imSetStepState(0, 'active'); var tokenParam = ''; fetch('https://porownajmy.to/app/portal/api/kalkulator-oferta.php?action=internet-mobilny-send' + tokenParam, { method: 'POST', headers: { 'Content-Type': 'application/json' }, credentials: 'include', body: JSON.stringify(data) }) .then(function(r) { imSetStepState(0, 'done'); imSetStepState(1, 'active'); return r.json(); }) .then(function(d) { if (d.ok) { imSetStepState(1, 'done'); setTimeout(function() { imShowStep(4); document.getElementById('imSentTo').textContent = 'Oferta zosta\u0142a wys\u0142ana na adres: ' + targetEmail; }, 600); } else { imSetStepState(1, 'error'); setTimeout(function() { imShowStep(1); var errEl = document.getElementById('imError'); errEl.textContent = d.error || 'Wyst\u0105pi\u0142 b\u0142\u0105d.'; errEl.style.display = ''; }, 1000); } }) .catch(function() { imSetStepState(0, 'error'); setTimeout(function() { imShowStep(1); var errEl = document.getElementById('imError'); errEl.textContent = 'B\u0142\u0105d po\u0142\u0105czenia.'; errEl.style.display = ''; }, 1000); }); } // ══════════════════════════════════════ // ZAMÓWIENIE — flow // ══════════════════════════════════════ var imOrderId = null; var imOrderDocs = {}; function imShowStep(n) { for (var i = 1; i <= 8; i++) { var el = document.getElementById('imStep' + i); if (el) el.style.display = (i === n) ? '' : 'none'; } var inner = document.getElementById('imModalInner'); if (inner) { if (n === 2 || n === 6) inner.classList.add('im-modal-inner--wide'); else inner.classList.remove('im-modal-inner--wide'); } } function imStartOrder() { var okresVal = imFormData ? imFormData.okres : 'nieokreslony'; var selOkres = document.getElementById('imOrderOkres'); if (selOkres) selOkres.value = okresVal; imUpdateOrderSummary(); imShowStep(5); } function imUpdateOrderSummary() { var silver = parseInt(document.getElementById('imOrderSilver').value) || 0; var gold = parseInt(document.getElementById('imOrderGold').value) || 0; var esim = parseInt(document.getElementById('imOrderEsim').value) || 0; var sim = parseInt(document.getElementById('imOrderSim').value) || 0; var okres = document.getElementById('imOrderOkres').value; var total = silver + gold; var simTotal = esim + sim; var aboBrutto = (silver * 25) + (gold * 60); var aktywacjaPerSim = (okres === '12') ? 0 : 20; var aktywacja = aktywacjaPerSim * total; // per numer var wysylka = (sim >= 1) ? 15 : 0; var aboNetto = Math.round((aboBrutto / 1.23) * 100) / 100; var pierwszaWplataNetto = aboNetto + aktywacja + wysylka; var pierwszaWplataBrutto = Math.round(pierwszaWplataNetto * 1.23 * 100) / 100; var el = document.getElementById('imOrderSummary'); if (!el) return; if (total === 0) { el.innerHTML = 'Wybierz co najmniej 1 pakiet.'; return; } var warn = (simTotal !== total) ? '
Suma kart SIM (' + simTotal + ') \u2260 ilo\u015B\u0107 pakiet\u00F3w (' + total + ')' : ''; var lines = 'Podsumowanie:
'; if (silver > 0) lines += silver + '\u00D7 Silver (120 GB) = ' + (silver * 25).toFixed(2) + ' z\u0142 brutto/msc
'; if (gold > 0) lines += gold + '\u00D7 Gold (Bez limitu) = ' + (gold * 60).toFixed(2) + ' z\u0142 brutto/msc
'; lines += 'Abonament: ' + aboBrutto.toFixed(2) + ' z\u0142 brutto/msc
'; if (aktywacja > 0) lines += 'Aktywacja: ' + aktywacja.toFixed(2) + ' z\u0142 netto (' + total + ' \u00D7 ' + aktywacjaPerSim + ' z\u0142)
'; if (wysylka > 0) lines += 'Wysy\u0142ka SIM: ' + wysylka.toFixed(2) + ' z\u0142 netto (jednorazowo)
'; lines += 'Do zap\u0142aty teraz: ' + pierwszaWplataBrutto.toFixed(2) + ' z\u0142 brutto'; el.innerHTML = lines + warn; } // Aktualizuj podsumowanie na zmianach (function() { var ids = ['imOrderSilver','imOrderGold','imOrderEsim','imOrderSim','imOrderOkres']; function bind() { ids.forEach(function(id) { var el = document.getElementById(id); if (el) { el.addEventListener('change', imUpdateOrderSummary); el.addEventListener('input', imUpdateOrderSummary); } }); } if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', bind); else bind(); })(); function imSubmitOrder() { var errEl = document.getElementById('imOrderError'); var silver = parseInt(document.getElementById('imOrderSilver').value) || 0; var gold = parseInt(document.getElementById('imOrderGold').value) || 0; var esim = parseInt(document.getElementById('imOrderEsim').value) || 0; var sim = parseInt(document.getElementById('imOrderSim').value) || 0; if (silver + gold < 1) { errEl.textContent = 'Wybierz co najmniej 1 pakiet.'; errEl.style.display = ''; return; } if (esim + sim !== silver + gold) { errEl.textContent = 'Suma kart SIM (' + (esim+sim) + ') musi r\u00F3wna\u0107 si\u0119 ilo\u015Bci pakiet\u00F3w (' + (silver+gold) + ').'; errEl.style.display = ''; return; } errEl.style.display = 'none'; var data = Object.assign({}, imFormData || {}); data.iloscSilver = silver; data.iloscGold = gold; data.iloscEsim = esim; data.iloscSim = sim; data.okres = document.getElementById('imOrderOkres').value; data.typKlienta = imTyp; // Krok 3: loader imShowStep(3); imBuildLoader(['Tworzenie zam\u00F3wienia', 'Generowanie dokument\u00F3w']); imSetStepState(0, 'active'); var tokenParam = ''; // 1. Utwórz zamówienie fetch('https://porownajmy.to/app/portal/api/kalkulator-oferta.php?action=im-order' + tokenParam, { method: 'POST', headers: { 'Content-Type': 'application/json' }, credentials: 'include', body: JSON.stringify(data) }) .then(function(r) { return r.json(); }) .then(function(d) { if (!d.ok) throw new Error(d.error || 'B\u0142\u0105d'); imOrderId = d.orderId; imSetStepState(0, 'done'); imSetStepState(1, 'active'); // 2. Generuj dokumenty return fetch('https://porownajmy.to/app/portal/api/kalkulator-oferta.php?action=im-documents' + tokenParam, { method: 'POST', headers: { 'Content-Type': 'application/json' }, credentials: 'include', body: JSON.stringify({ orderId: imOrderId }) }); }) .then(function(r) { return r.json(); }) .then(function(d) { if (!d.ok) throw new Error(d.error || 'B\u0142\u0105d'); imSetStepState(1, 'done'); imOrderDocs = { umowa: d.umowaHtml, regulamin: d.regulaminHtml }; setTimeout(function() { imDocTab('umowa'); imShowStep(6); }, 500); }) .catch(function(e) { imSetStepState(0, 'error'); setTimeout(function() { imShowStep(5); var errEl = document.getElementById('imOrderError'); errEl.textContent = e.message || 'B\u0142\u0105d.'; errEl.style.display = ''; }, 800); }); } function imDocTab(tab) { var html = (tab === 'regulamin') ? imOrderDocs.regulamin : imOrderDocs.umowa; var iframe = document.getElementById('imDocIframe'); var doc = iframe.contentDocument || iframe.contentWindow.document; doc.open(); doc.write(html || ''); doc.close(); setTimeout(function() { try { var h = doc.documentElement.scrollHeight; if (h > 100) iframe.style.height = (h + 20) + 'px'; } catch(e) {} }, 200); var btnU = document.getElementById('imDocTabUmowa'); var btnR = document.getElementById('imDocTabRegulamin'); if (tab === 'regulamin') { btnR.style.background = '#2980b9'; btnR.style.color = '#fff'; btnU.style.background = '#e2e8f0'; btnU.style.color = '#64748b'; } else { btnU.style.background = '#2980b9'; btnU.style.color = '#fff'; btnR.style.background = '#e2e8f0'; btnR.style.color = '#64748b'; } } function imRequestSign() { // Walidacja zgód (tylko przy pierwszym kliknięciu z kroku 6) var errConsent = document.getElementById('imSignConsentError'); if (errConsent) { if (!document.getElementById('imSignZgodaRegulamin').checked) { errConsent.textContent = 'Zapoznaj si\u0119 z umow\u0105 i regulaminem.'; errConsent.style.display = ''; return; } if (!document.getElementById('imSignZgodaUmowa').checked) { errConsent.textContent = 'Wyra\u017A zgod\u0119 na zawarcie umowy.'; errConsent.style.display = ''; return; } if (!document.getElementById('imSignZgodaRODO').checked) { errConsent.textContent = 'Wyra\u017A zgod\u0119 na przetwarzanie danych.'; errConsent.style.display = ''; return; } errConsent.style.display = 'none'; } var tokenParam = ''; var infoEl = document.getElementById('imSignInfo'); infoEl.textContent = 'Wysy\u0142anie kodu SMS...'; imShowStep(7); fetch('https://porownajmy.to/app/portal/api/kalkulator-oferta.php?action=im-sign-request' + tokenParam, { method: 'POST', headers: { 'Content-Type': 'application/json' }, credentials: 'include', body: JSON.stringify({ orderId: imOrderId }) }) .then(function(r) { return r.json(); }) .then(function(d) { if (!d.ok) throw new Error(d.error || 'B\u0142\u0105d SMS'); infoEl.textContent = 'Kod SMS wys\u0142any na numer: ' + (d.phone || ''); document.getElementById('imSmsCode').value = ''; document.getElementById('imSmsCode').focus(); }) .catch(function(e) { infoEl.textContent = 'B\u0142\u0105d: ' + e.message; }); } // ── Wyślij umowę do podpisu (broker/program/konkurs/b2b/zlecenie) ── function imSendForSignature() { // Walidacja zgód var errConsent = document.getElementById('imSignConsentError'); if (errConsent) { if (!document.getElementById('imSignZgodaRegulamin').checked) { errConsent.textContent = 'Zapoznaj si\u0119 z umow\u0105 i regulaminem.'; errConsent.style.display = ''; return; } if (!document.getElementById('imSignZgodaUmowa').checked) { errConsent.textContent = 'Wyra\u017A zgod\u0119 na zawarcie umowy.'; errConsent.style.display = ''; return; } if (!document.getElementById('imSignZgodaRODO').checked) { errConsent.textContent = 'Wyra\u017A zgod\u0119 na przetwarzanie danych.'; errConsent.style.display = ''; return; } errConsent.style.display = 'none'; } if (!confirm('Klient zosta\u0142 poinformowany o warunkach umowy i wyrazi\u0142 zgod\u0119 na otrzymanie dokumentów na adres: ' + (imFormData ? imFormData.email : '') + '?\n\nKlient otrzyma maila z dokumentami i linkiem do podpisu kodem SMS.')) return; imShowStep(3); imBuildLoader(['Generowanie dokument\u00F3w PDF', 'Wysy\u0142anie maila z umow\u0105']); imSetStepState(0, 'active'); var tokenParam = ''; fetch('https://porownajmy.to/app/portal/api/kalkulator-oferta.php?action=im-send-for-signature' + tokenParam, { method: 'POST', headers: { 'Content-Type': 'application/json' }, credentials: 'include', body: JSON.stringify({ orderId: imOrderId }) }) .then(function(r) { return r.json(); }) .then(function(d) { imSetStepState(0, 'done'); imSetStepState(1, d.ok ? 'done' : 'error'); if (d.ok) { setTimeout(function() { imShowStep(4); document.getElementById('imSentTo').textContent = 'Umowa z dokumentami zosta\u0142a wys\u0142ana na adres: ' + (d.email || '') + '. Klient otrzyma\u0142 link do podpisu kodem SMS.'; }, 600); } else { setTimeout(function() { imShowStep(6); if (errConsent) { errConsent.textContent = d.error || 'B\u0142\u0105d.'; errConsent.style.display = ''; } }, 800); } }) .catch(function(e) { imSetStepState(0, 'error'); setTimeout(function() { imShowStep(6); if (errConsent) { errConsent.textContent = 'B\u0142\u0105d po\u0142\u0105czenia.'; errConsent.style.display = ''; } }, 800); }); } function imConfirmSign() { var code = (document.getElementById('imSmsCode').value || '').trim(); var errEl = document.getElementById('imSignError'); if (code.length !== 6) { errEl.textContent = 'Wpisz 6-cyfrowy kod.'; errEl.style.display = ''; return; } errEl.style.display = 'none'; var tokenParam = ''; fetch('https://porownajmy.to/app/portal/api/kalkulator-oferta.php?action=im-sign-confirm' + tokenParam, { method: 'POST', headers: { 'Content-Type': 'application/json' }, credentials: 'include', body: JSON.stringify({ orderId: imOrderId, token: code }) }) .then(function(r) { return r.json(); }) .then(function(d) { if (!d.ok) { errEl.textContent = d.error || 'B\u0142\u0105d'; errEl.style.display = ''; return; } // Podpisano! Generuj PDFy i wyślij mail imShowStep(3); imBuildLoader(['Generowanie PDF dokument\u00F3w', 'Wysy\u0142anie e-maila z dokumentami']); imSetStepState(0, 'active'); fetch('https://porownajmy.to/app/portal/api/kalkulator-oferta.php?action=im-sign-complete' + tokenParam, { method: 'POST', headers: { 'Content-Type': 'application/json' }, credentials: 'include', body: JSON.stringify({ orderId: imOrderId }) }) .then(function(r) { return r.json(); }) .then(function(d2) { imSetStepState(0, 'done'); if (!d2.ok) { imSetStepState(1, 'error'); return; } imSetStepState(1, 'done'); setTimeout(function() { document.getElementById('imCompleteEmail').textContent = d2.email || ''; document.getElementById('imPaymentFirma').textContent = d2.firma || 'Broker Us\u0142ug Sp. z o.o.'; document.getElementById('imPaymentNip').textContent = d2.firmaNip || '527-298-65-55'; document.getElementById('imPaymentAdres').textContent = d2.firmaAdres || 'Al. Jana Paw\u0142a II 43A/37B, 01-001 Warszawa'; document.getElementById('imPaymentAccount').textContent = d2.kontoNr || ''; document.getElementById('imPaymentBank').textContent = d2.bank || 'Nest Bank'; document.getElementById('imPaymentTitle').textContent = d2.umowaNr || ''; var total = parseFloat(d2.totalFirstPayment || 0); document.getElementById('imPaymentAmount').textContent = 'Do zap\u0142aty: ' + total.toFixed(2) + ' z\u0142 brutto'; var parts = []; if (d2.kwotaBrutto) parts.push('abo: ' + parseFloat(d2.kwotaBrutto).toFixed(2) + ' z\u0142'); if (d2.aktywacjaBrutto > 0) parts.push('aktywacja: ' + parseFloat(d2.aktywacjaBrutto).toFixed(2) + ' z\u0142'); if (d2.wysylkaBrutto > 0) parts.push('wysy\u0142ka: ' + parseFloat(d2.wysylkaBrutto).toFixed(2) + ' z\u0142'); var bd = document.getElementById('imPaymentBreakdown'); if (bd) bd.textContent = parts.length > 1 ? '(' + parts.join(' + ') + ')' : ''; imShowStep(8); }, 600); }) .catch(function() { imSetStepState(0, 'error'); }); }) .catch(function(e) { errEl.textContent = e.message || 'B\u0142\u0105d po\u0142\u0105czenia.'; errEl.style.display = ''; }); } // Resize iframe (embed) if (window.parent !== window) { setTimeout(function() { var h = document.documentElement.scrollHeight; window.parent.postMessage({ type: 'porownajmy-embed-resize', height: h }, '*'); }, 500); }