{"id":1106,"date":"2025-08-28T16:51:28","date_gmt":"2025-08-28T13:21:28","guid":{"rendered":"https:\/\/emif.ir\/?page_id=1106"},"modified":"2025-08-29T22:35:03","modified_gmt":"2025-08-29T19:05:03","slug":"%d8%aa%d8%b3%d8%aa-%d9%85%d8%a7%d9%86%d8%af%d9%87-%d8%b4%d9%87%d8%b1%db%8c%d9%87-2","status":"publish","type":"page","link":"https:\/\/emif.ir\/?page_id=1106","title":{"rendered":"\u067e\u06cc\u0634 \u0641\u0627\u06a9\u062a\u0648\u0631"},"content":{"rendered":"    <div id=\"invoice-form\" style=\"max-width:700px;margin:auto;font-family:tahoma;direction:rtl;text-align:right\">\n        <h2 style=\"text-align:center\">\u067e\u06cc\u0634 \u0641\u0627\u06a9\u062a\u0648\u0631<\/h2>\n\n        <label>\u0646\u0627\u0645 \u062f\u0627\u0646\u0634\u200c\u0622\u0645\u0648\u0632:<\/label>\n        <input type=\"text\" id=\"student_name\" style=\"width:100%;padding:8px;margin-bottom:10px\">\n\n        <label>\u06a9\u062f \u0645\u0644\u06cc:<\/label>\n        <input type=\"text\" id=\"student_code\" style=\"width:100%;padding:8px;margin-bottom:10px\">\n\n        <h4>\u0627\u0646\u062a\u062e\u0627\u0628 \u062e\u062f\u0645\u0627\u062a:<\/h4>\n        <div id=\"services\">\n            <label><input type=\"checkbox\" value=\"2000000\" data-name=\"\u06a9\u0627\u0631\u0628\u0631 \u0631\u0627\u06cc\u0627\u0646\u0647\"> \u06a9\u0627\u0631\u0628\u0631 \u0631\u0627\u06cc\u0627\u0646\u0647 (2,000,000)<\/label><br>\n            <label><input type=\"checkbox\" value=\"4000000\" data-name=\"\u06af\u0631\u0627\u0641\u06cc\u06a9 \u0631\u0627\u06cc\u0627\u0646\u0647\u200c\u0627\u06cc\"> \u06af\u0631\u0627\u0641\u06cc\u06a9 \u0631\u0627\u06cc\u0627\u0646\u0647\u200c\u0627\u06cc (4,000,000)<\/label><br>\n            <label><input type=\"checkbox\" value=\"2000000\" data-name=\"\u062a\u0627\u06cc\u067e \u0631\u0627\u06cc\u0627\u0646\u0647\u200c\u0627\u06cc\"> \u062a\u0627\u06cc\u067e \u0631\u0627\u06cc\u0627\u0646\u0647\u200c\u0627\u06cc (2,000,000)<\/label><br>\n            <label><input type=\"checkbox\" value=\"1100000\" data-name=\"\u0637\u0631\u0627\u062d\u06cc \u0633\u06cc\u0627\u0647 \u0648 \u0633\u0641\u06cc\u062f\"> \u0637\u0631\u0627\u062d\u06cc \u0633\u06cc\u0627\u0647 \u0648 \u0633\u0641\u06cc\u062f (1,100,000)<\/label><br>\n            <label><input type=\"checkbox\" value=\"1100000\" data-name=\"\u0637\u0631\u0627\u062d\u06cc \u0631\u0646\u06af\u06cc\"> \u0637\u0631\u0627\u062d\u06cc \u0631\u0646\u06af\u06cc (1,100,000)<\/label><br>\n            <label><input type=\"checkbox\" value=\"300000000\" data-name=\"\u0622\u0648\u0633\u0628\u06cc\u0644\u062f\u0648\u0646\u06af\"> \u0622\u0648\u0633\u0628\u06cc\u0644\u062f\u0648\u0646\u06af (300,000,000)<\/label><br>\n            <label><input type=\"checkbox\" value=\"100000000\" data-name=\"\u067e\u0630\u06cc\u0631\u0634 \u062f\u0627\u0646\u0634\u06af\u0627\u0647\"> \u067e\u0630\u06cc\u0631\u0634 \u062f\u0627\u0646\u0634\u06af\u0627\u0647 (100,000,000)<\/label><br>\n            <label><input type=\"checkbox\" value=\"800000000\" data-name=\"\u062c\u0627\u0628 \u0622\u0641\u0631 \u0622\u0644\u0645\u0627\u0646\"> \u062c\u0627\u0628 \u0622\u0641\u0631 \u0622\u0644\u0645\u0627\u0646 (800,000,000)<\/label><br>\n            <label><input type=\"checkbox\" value=\"500000000\" data-name=\"\u062c\u0627\u0628 \u0622\u0641\u0631 \u0631\u0648\u0645\u0627\u0646\u06cc\"> \u062c\u0627\u0628 \u0622\u0641\u0631 \u0631\u0648\u0645\u0627\u0646\u06cc (500,000,000)<\/label>\n        <\/div>\n\n        <p><strong>\u0645\u062c\u0645\u0648\u0639 \u0634\u0647\u0631\u06cc\u0647:<\/strong> <span id=\"total_fee\">0<\/span> \u062a\u0648\u0645\u0627\u0646<\/p>\n\n        <label>\u062a\u0639\u062f\u0627\u062f \u0627\u0642\u0633\u0627\u0637:<\/label>\n        <select id=\"installments\">\n            <option value=\"1\">1<\/option>\n            <option value=\"2\">2<\/option>\n            <option value=\"3\">3<\/option>\n            <option value=\"4\">4<\/option>\n            <option value=\"5\">5<\/option>\n            <option value=\"6\">6<\/option>\n        <\/select>\n\n        <p><strong>\u0645\u0628\u0644\u063a \u0647\u0631 \u0642\u0633\u0637:<\/strong> <span id=\"per_installment\">0<\/span> \u062a\u0648\u0645\u0627\u0646<\/p>\n\n        <button onclick=\"showInvoice()\" style=\"margin-top:20px;padding:10px 20px;background:#0073e6;color:#fff;border:none;border-radius:8px;cursor:pointer\">\n            \u0646\u0645\u0627\u06cc\u0634 \u067e\u06cc\u0634 \u0641\u0627\u06a9\u062a\u0648\u0631\n        <\/button>\n\n        <div id=\"invoice-preview-container\" style=\"margin-top:30px;display:none;\">\n            <div id=\"invoice-preview\" style=\"border:1px solid #ccc;padding:20px;border-radius:10px;background:#fafafa\"><\/div>\n\n            <div style=\"text-align:center;margin-top:20px;\">\n                <button onclick=\"printInvoice()\" style=\"padding:10px 20px;background:#4CAF50;color:white;border:none;border-radius:5px;cursor:pointer;\">\n                    \u0686\u0627\u067e \u0631\u0633\u06cc\u062f\n                <\/button>\n            <\/div>\n        <\/div>\n    <\/div>\n\n    <script>\n        function calculateInvoice() {\n            let checkboxes = document.querySelectorAll('#services input[type=checkbox]');\n            let total = 0;\n            checkboxes.forEach(chk => { if(chk.checked) total += parseInt(chk.value); });\n            document.getElementById('total_fee').innerText = total.toLocaleString();\n\n            let installments = parseInt(document.getElementById('installments').value);\n            let per_installment = installments > 0 ? Math.floor(total \/ installments) : 0;\n            document.getElementById('per_installment').innerText = per_installment.toLocaleString();\n        }\n\n        document.addEventListener(\"DOMContentLoaded\", function () {\n            document.querySelectorAll('#services input, #installments').forEach(el => {\n                el.addEventListener('change', calculateInvoice);\n            });\n        });\n\n        function showInvoice() {\n            let name = document.getElementById(\"student_name\").value;\n            let code = document.getElementById(\"student_code\").value;\n            let total = document.getElementById(\"total_fee\").innerText;\n            let perInstall = document.getElementById(\"per_installment\").innerText;\n            let installments = document.getElementById(\"installments\").value;\n\n            let services = [];\n            document.querySelectorAll('#services input:checked').forEach(chk => {\n                services.push(chk.getAttribute(\"data-name\") + \" (\" + parseInt(chk.value).toLocaleString() + \")\");\n            });\n\n            let html = `\n                <h3 style=\"text-align:center\">\u067e\u06cc\u0634 \u0641\u0627\u06a9\u062a\u0648\u0631<\/h3>\n                <p><strong>\u0646\u0627\u0645 \u062f\u0627\u0646\u0634\u200c\u0622\u0645\u0648\u0632:<\/strong> ${name}<\/p>\n                <p><strong>\u06a9\u062f \u0645\u0644\u06cc:<\/strong> ${code}<\/p>\n                <table style=\"width:100%;border-collapse:collapse;margin:15px 0\">\n                    <tr style=\"background:#eee\">\n                        <th style=\"border:1px solid #ccc;padding:8px\">\u0631\u062f\u06cc\u0641<\/th>\n                        <th style=\"border:1px solid #ccc;padding:8px\">\u062e\u062f\u0645\u062a<\/th>\n                        <th style=\"border:1px solid #ccc;padding:8px\">\u0645\u0628\u0644\u063a<\/th>\n                    <\/tr>`;\n\n            services.forEach((srv, i) => {\n                let parts = srv.split(\" (\");\n                html += `<tr>\n                    <td style=\"border:1px solid #ccc;padding:8px;text-align:center\">${i+1}<\/td>\n                    <td style=\"border:1px solid #ccc;padding:8px\">${parts[0]}<\/td>\n                    <td style=\"border:1px solid #ccc;padding:8px\">${parts[1]}<\/td>\n                <\/tr>`;\n            });\n\n            html += `<\/table>\n                <p><strong>\u062c\u0645\u0639 \u06a9\u0644:<\/strong> ${total} \u062a\u0648\u0645\u0627\u0646<\/p>\n                <p><strong>\u062a\u0639\u062f\u0627\u062f \u0627\u0642\u0633\u0627\u0637:<\/strong> ${installments} &nbsp;&nbsp; <strong>\u0645\u0628\u0644\u063a \u0647\u0631 \u0642\u0633\u0637:<\/strong> ${perInstall} \u062a\u0648\u0645\u0627\u0646<\/p>\n                <div style=\"display:flex;justify-content:space-between;margin-top:40px\">\n                    <div style=\"text-align:center\">\n                        <p>\u0627\u0645\u0636\u0627\u0621 \u0645\u062f\u06cc\u0631\u0639\u0627\u0645\u0644<\/p>\n                        <p>\u0645\u0648\u0633\u06cc \u0627\u06cc\u0631\u0627\u0646\u06cc \u0646\u0645\u06cc\u0646<\/p>\n                    <\/div>\n                    <div style=\"text-align:center\">\n                        <p>\u0627\u0645\u0636\u0627\u0621 \u062f\u0627\u0646\u0634\u200c\u0622\u0645\u0648\u0632<\/p>\n                        <p>______________<\/p>\n                    <\/div>\n                <\/div>\n                <div id=\"qrcode\" style=\"margin-top:20px;text-align:center\"><\/div>\n            `;\n\n            let preview = document.getElementById(\"invoice-preview\");\n            preview.innerHTML = html;\n            document.getElementById(\"invoice-preview-container\").style.display = \"block\";\n\n            let qrText = \"\u0631\u0633\u06cc\u062f \u062b\u0628\u062a\u200c\u0646\u0627\u0645\\n\u0646\u0627\u0645: \" + name + \"\\n\u06a9\u062f \u0645\u0644\u06cc: \" + code + \"\\n\u0645\u0628\u0644\u063a \u06a9\u0644: \" + total + \" \u062a\u0648\u0645\u0627\u0646\";\n            let qrContainer = document.getElementById(\"qrcode\");\n            qrContainer.innerHTML = \"\";\n            new QRCode(qrContainer, { text: qrText, width: 120, height: 120 });\n        }\n\n        function printInvoice() {\n            let content = document.getElementById(\"invoice-preview\").innerHTML;\n            let win = window.open('', '', 'height=800,width=1000');\n            win.document.write('<html><head><title>\u0686\u0627\u067e \u0631\u0633\u06cc\u062f<\/title><style>body{font-family:tahoma;direction:rtl;text-align:right;} table{width:100%;border-collapse:collapse;} th, td{border:1px solid #ccc;padding:8px;} th{background:#eee;} <\/style><\/head><body>');\n            win.document.write(content);\n            win.document.write('<\/body><\/html>');\n            win.document.close();\n            win.print();\n        }\n    <\/script>\n    \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1106","page","type-page","status-publish"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u067e\u06cc\u0634 \u0641\u0627\u06a9\u062a\u0648\u0631 -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/emif.ir\/?page_id=1106\" \/>\n<meta property=\"og:locale\" content=\"fa_IR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u067e\u06cc\u0634 \u0641\u0627\u06a9\u062a\u0648\u0631 -\" \/>\n<meta property=\"og:url\" content=\"https:\/\/emif.ir\/?page_id=1106\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-29T19:05:03+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u0632\u0645\u0627\u0646 \u062a\u0642\u0631\u06cc\u0628\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u062f\u0646\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 \u062f\u0642\u06cc\u0642\u0647\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/emif.ir\/?page_id=1106\",\"url\":\"https:\/\/emif.ir\/?page_id=1106\",\"name\":\"\u067e\u06cc\u0634 \u0641\u0627\u06a9\u062a\u0648\u0631 -\",\"isPartOf\":{\"@id\":\"https:\/\/emif.ir\/#website\"},\"datePublished\":\"2025-08-28T13:21:28+00:00\",\"dateModified\":\"2025-08-29T19:05:03+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/emif.ir\/?page_id=1106#breadcrumb\"},\"inLanguage\":\"fa-IR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/emif.ir\/?page_id=1106\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/emif.ir\/?page_id=1106#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u062e\u0627\u0646\u0647\",\"item\":\"https:\/\/emif.ir\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u067e\u06cc\u0634 \u0641\u0627\u06a9\u062a\u0648\u0631\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/emif.ir\/#website\",\"url\":\"https:\/\/emif.ir\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/emif.ir\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fa-IR\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u067e\u06cc\u0634 \u0641\u0627\u06a9\u062a\u0648\u0631 -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/emif.ir\/?page_id=1106","og_locale":"fa_IR","og_type":"article","og_title":"\u067e\u06cc\u0634 \u0641\u0627\u06a9\u062a\u0648\u0631 -","og_url":"https:\/\/emif.ir\/?page_id=1106","article_modified_time":"2025-08-29T19:05:03+00:00","twitter_card":"summary_large_image","twitter_misc":{"\u0632\u0645\u0627\u0646 \u062a\u0642\u0631\u06cc\u0628\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u062f\u0646":"1 \u062f\u0642\u06cc\u0642\u0647"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/emif.ir\/?page_id=1106","url":"https:\/\/emif.ir\/?page_id=1106","name":"\u067e\u06cc\u0634 \u0641\u0627\u06a9\u062a\u0648\u0631 -","isPartOf":{"@id":"https:\/\/emif.ir\/#website"},"datePublished":"2025-08-28T13:21:28+00:00","dateModified":"2025-08-29T19:05:03+00:00","breadcrumb":{"@id":"https:\/\/emif.ir\/?page_id=1106#breadcrumb"},"inLanguage":"fa-IR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/emif.ir\/?page_id=1106"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/emif.ir\/?page_id=1106#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u062e\u0627\u0646\u0647","item":"https:\/\/emif.ir\/"},{"@type":"ListItem","position":2,"name":"\u067e\u06cc\u0634 \u0641\u0627\u06a9\u062a\u0648\u0631"}]},{"@type":"WebSite","@id":"https:\/\/emif.ir\/#website","url":"https:\/\/emif.ir\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/emif.ir\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fa-IR"}]}},"_links":{"self":[{"href":"https:\/\/emif.ir\/index.php?rest_route=\/wp\/v2\/pages\/1106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/emif.ir\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/emif.ir\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/emif.ir\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/emif.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1106"}],"version-history":[{"count":7,"href":"https:\/\/emif.ir\/index.php?rest_route=\/wp\/v2\/pages\/1106\/revisions"}],"predecessor-version":[{"id":1137,"href":"https:\/\/emif.ir\/index.php?rest_route=\/wp\/v2\/pages\/1106\/revisions\/1137"}],"wp:attachment":[{"href":"https:\/\/emif.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}