{"id":11947,"date":"2023-11-09T17:28:02","date_gmt":"2023-11-09T16:28:02","guid":{"rendered":"http:\/\/test.arjuna.pl\/?page_id=11947"},"modified":"2024-04-24T17:52:13","modified_gmt":"2024-04-24T15:52:13","slug":"calc","status":"publish","type":"page","link":"https:\/\/isafira.pl\/index.php\/calc\/","title":{"rendered":"Kalkulator"},"content":{"rendered":"<style>\n.miejscowoscAdresClass {\nbackground-color: #000000;\nborder: 2px solid white;\ncolor: #ffffff;\npadding: 1em;\nwidth: 100%;\n}<\/style>\n<div style=\"text-align: center;\">\n<h1 class=\"none entry-title section-title\">KALKULATOR KOSZT\u00d3W POKAZU<\/h1>\n<\/div>\n<table style=\"border: none; padding: 0px; margin: 0px;\">\n<tbody>\n<tr style=\"border: none;\">\n<td style=\"border: none;\">\n<h4 class=\"none entry-title section-title\">Wybierz opcj\u0119 pokazu:<\/h4>\n<p><input id=\"pokaz8\" name=\"pokaz\" type=\"radio\" value=\"365\" \/> <label for=\"pokaz1\"><img decoding=\"async\" style=\"color: #fff;\" src=\"\/images\/star-alt-3.svg\" width=\"24\" \/> Warsztaty z manipulacji poi (1-1,5h, grupy 5-10 os\u00f3b)<\/label><br \/>\n<!--\n\n<div style=\"display: none;\"><input id=\"pokaz1\" name=\"pokaz\" type=\"radio\" value=\"1500\" \/> <label for=\"pokaz1\"><img decoding=\"async\" style=\"color: #fff;\" src=\"\/images\/flame.svg\" width=\"24\" \/> Opowie\u015bci Midgardu<\/label><\/div>\n\n--><br \/>\n<input id=\"pokaz2\" name=\"pokaz\" type=\"radio\" value=\"1057\" \/> <label for=\"pokaz2\"><img decoding=\"async\" style=\"color: #fff;\" src=\"\/images\/flame.svg\" width=\"24\" \/> Kraina marze\u0144<\/label><br \/>\n<input id=\"pokaz3\" name=\"pokaz\" type=\"radio\" value=\"1220\" \/> <label for=\"pokaz3\"><img decoding=\"async\" style=\"color: #fff;\" src=\"\/images\/flame.svg\" width=\"24\" \/> Kwiat Dziewanny<\/label><br \/>\n<input id=\"pokaz4\" name=\"pokaz\" type=\"radio\" value=\"610\" \/> <label for=\"pokaz4\"><img decoding=\"async\" style=\"color: #fff;\" src=\"\/images\/flame.svg\" width=\"24\" \/><img decoding=\"async\" style=\"color: #fff;\" src=\"\/images\/star-alt-3.svg\" width=\"24\" \/> Tosia znajduje Gwiazdk\u0119<\/label><br \/>\n<input id=\"pokaz7\" name=\"pokaz\" type=\"radio\" value=\"1707\" \/> <label for=\"pokaz7\"><img decoding=\"async\" style=\"color: #fff;\" src=\"\/images\/flame.svg\" width=\"24\" \/> Supernova<\/label><br \/>\n<input id=\"pokaz5\" name=\"pokaz\" type=\"radio\" value=\"1626\" \/> <label for=\"pokaz5\"><img decoding=\"async\" style=\"color: #fff;\" src=\"\/images\/star-alt-3.svg\" width=\"24\" \/> Aurora<\/label><br \/>\n<input id=\"pokaz6\" name=\"pokaz\" type=\"radio\" value=\"1626\" \/> <label for=\"pokaz6\"><img decoding=\"async\" style=\"color: #fff;\" src=\"\/images\/flame.svg\" width=\"24\" \/> Ogniste wesele<\/label><br \/>\n<input id=\"dojazdOdleglosc\" type=\"hidden\" \/><br \/>\n<input id=\"dojazdCena\" type=\"hidden\" \/><br \/>\n<input id=\"pokazCena\" type=\"hidden\" \/><\/td>\n<td style=\"border: none;\">\n<h4 class=\"none entry-title section-title\">Wpisz miejscowo\u015b\u0107 lub kod pocztowy:<\/h4>\n<p><input id=\"miejscowosc\" class=\"miejscowoscAdresClass\" type=\"text\" \/><\/p>\n<div class=\"mtheme-button\">Przelicz koszty<\/div>\n<p>&nbsp;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table style=\"margin-bottom: 0px;\">\n<tbody>\n<tr style=\"border: none; padding: 0px; margin: 0px;\">\n<td style=\"border: none; padding: 0px; margin: 0px; width: 50%;\">\n<h5 class=\"none entry-title section-title\">Koszty dojazdu netto:<\/h5>\n<\/td>\n<td style=\"border: none; padding: 0px; margin: 0px;\">\n<h4 id=\"dojazdNetto\" class=\"none entry-title section-title\"><\/h4>\n<\/td>\n<\/tr>\n<tr style=\"border: none; padding: 0px; margin: 0px;\">\n<td style=\"border: none; padding: 0px; margin: 0px;\">\n<h5 class=\"none entry-title section-title\">Koszty pokazu netto:<\/h5>\n<\/td>\n<td style=\"border: none; padding: 0px; margin: 0px;\">\n<h4 id=\"pokazNetto\" class=\"none entry-title section-title\"><\/h4>\n<\/td>\n<\/tr>\n<tr style=\"border: none; padding: 0px; margin: 0px;\">\n<td style=\"border: none; padding: 0px; margin: 0px;\">\n<h5 class=\"none entry-title section-title\">Koszt ca\u0142kowity netto:<\/h5>\n<\/td>\n<td style=\"border: none; padding: 0px; margin: 0px;\">\n<h4 id=\"calkowityNetto\" class=\"none entry-title section-title\"><\/h4>\n<\/td>\n<\/tr>\n<tr style=\"border: none; padding: 0px; margin: 0px;\">\n<td style=\"border: none; padding: 0px; margin: 0px;\">\n<h5 class=\"none entry-title section-title\">VAT (23%):<\/h5>\n<\/td>\n<td style=\"border: none; padding: 0px; margin: 0px;\">\n<h4 id=\"vat23\" class=\"none entry-title section-title\"><\/h4>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table style=\"border-top: 2px solid white!important; margin: 0px; padding-top: 1em;\">\n<tbody>\n<tr style=\"border: none; padding: 0px; margin: 0px;\">\n<td style=\"border: none; padding: 0px; margin: 0px; width: 50%;\">\n<h5 class=\"none entry-title section-title\">Koszt ca\u0142kowity brutto:<\/h5>\n<\/td>\n<td style=\"border: none; padding: 0px; margin: 0px;\">\n<h4 id=\"calkowityBrutto\" class=\"none entry-title section-title\"><\/h4>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<script>function waitForElementToExist(selector) {\r\n  return new Promise(resolve => {\r\n    if (document.querySelector(selector)) {\r\n      return resolve(document.querySelector(selector));\r\n    }\r\n\r\n    const observer = new MutationObserver(() => {\r\n      if (document.querySelector(selector)) {\r\n        resolve(document.querySelector(selector));\r\n        observer.disconnect();\r\n      }\r\n    });\r\n\r\n    observer.observe(document.body, {\r\n      subtree: true,\r\n      childList: true,\r\n    });\r\n  });\r\n}\r\n\r\nasync function getDistance(destination) {\r\n\tconsole.log('getDistance: ' + destination)\r\n\ttry {\r\n\tvar formD = new FormData();\r\n\tformD.append('place', destination);\r\n\tconst response = await fetch(\"\/api\/getDistance.php\", {\r\n\t\tmethod: \"POST\",\r\n\t\tbody: formD\r\n\t})\r\n\t.then((response) => response.json())\r\n  \t.then((res) => {\r\n\t\tdocument.getElementById('dojazdOdleglosc').value = res.rows[0].elements[0].distance.value\/1000;\r\n\t\tdocument.getElementById('dojazdCena').value = document.getElementById('dojazdOdleglosc').value * 0.8 * 2\r\n\t\tdocument.getElementById('pokazCena').value = document.querySelector('input[name=\"pokaz\"]:checked').value;\r\n\t\tvar dojazd = parseFloat(document.getElementById('dojazdCena').value)\r\n\t\tvar pokaz = parseFloat(document.getElementById('pokazCena').value)\r\n\t\tvar cenaNetto = dojazd + pokaz\r\n\t\tvar vat = cenaNetto * 0.23\r\n\t\tvar cenaBrutto = cenaNetto + vat\r\n\t\t\r\n\t\tdocument.getElementById('dojazdNetto').innerHTML = dojazd.toFixed(2) + ' PLN'\r\n\t\tdocument.getElementById('pokazNetto').innerHTML = pokaz.toFixed(2) + ' PLN'\r\n\t\tdocument.getElementById('calkowityNetto').innerHTML = cenaNetto.toFixed(2) + ' PLN'\r\n\t\tdocument.getElementById('vat23').innerHTML = vat.toFixed(2) + ' PLN'\r\n\t\tdocument.getElementById('calkowityBrutto').innerHTML = cenaBrutto.toFixed(2) + ' PLN'\r\n\t\t\r\n    \treturn res.rows[0].elements[0].distance.value;\r\n  \t});\r\n\r\n  } catch (error) {\r\n    return \"\"\r\n  }\r\n}\r\n\r\nwaitForElementToExist('.miejscowoscAdresClass').then(element => {\r\n\t\telement.addEventListener('change', event => {\r\n\t\t\tconsole.log('miejscowosc: ' + element.value);\r\n\t\t\tgetDistance(element.value)\r\n\t\t});\r\n});\r\n\r\nconsole.log('snippet loaded')<\/script>\n","protected":false},"excerpt":{"rendered":"<p>KALKULATOR KOSZT\u00d3W POKAZU Wybierz opcj\u0119 pokazu: Warsztaty z manipulacji poi (1-1,5h, grupy 5-10 os\u00f3b) Kraina marze\u0144 Kwiat Dziewanny Tosia znajduje Gwiazdk\u0119 Supernova Aurora Ogniste wesele Wpisz miejscowo\u015b\u0107 lub kod pocztowy: Przelicz koszty &nbsp; Koszty dojazdu netto: Koszty pokazu netto: Koszt ca\u0142kowity netto: VAT (23%): Koszt ca\u0142kowity brutto:<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-11947","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/isafira.pl\/index.php\/wp-json\/wp\/v2\/pages\/11947","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/isafira.pl\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/isafira.pl\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/isafira.pl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/isafira.pl\/index.php\/wp-json\/wp\/v2\/comments?post=11947"}],"version-history":[{"count":83,"href":"https:\/\/isafira.pl\/index.php\/wp-json\/wp\/v2\/pages\/11947\/revisions"}],"predecessor-version":[{"id":12302,"href":"https:\/\/isafira.pl\/index.php\/wp-json\/wp\/v2\/pages\/11947\/revisions\/12302"}],"wp:attachment":[{"href":"https:\/\/isafira.pl\/index.php\/wp-json\/wp\/v2\/media?parent=11947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}