{"id":233,"date":"2020-10-16T12:30:30","date_gmt":"2020-10-16T12:30:30","guid":{"rendered":"https:\/\/fac.quovizweb4.com\/?page_id=233"},"modified":"2024-03-19T15:04:42","modified_gmt":"2024-03-19T15:04:42","slug":"test-calculator","status":"publish","type":"page","link":"https:\/\/fac.quovizweb4.com\/index.php\/test-calculator\/","title":{"rendered":"test Calculator"},"content":{"rendered":"\n<link rel='stylesheet' id='dataTable-css'\n    href='https:\/\/secu.quovizweb.com\/\/wp-content\/themes\/Quoviz-child\/calculator\/jquery.dataTables.min.css'\n    type='text\/css' media='all' \/>\n<link rel='stylesheet' id='dataTable-tools-css'\n    href='https:\/\/secu.quovizweb.com\/quoviz_views\/Quoviz-child\/calculator\/dataTables.tableTools.css' type='text\/css'\n    media='all' \/>\n<link rel='stylesheet' href='https:\/\/secu.quovizweb.com\/\/wp-content\/themes\/Quoviz-child\/calculator\/bootstrap.min.css'>\n<script type='text\/javascript'\n    src='https:\/\/secu.quovizweb.com\/quoviz_views\/Quoviz-child\/calculator\/jquery.dataTables.min.js' id='dataTable-js'>\n<\/script>\n<script type='text\/javascript'\n    src='https:\/\/secu.quovizweb.com\/quoviz_views\/Quoviz-child\/calculator\/dataTables.tableTools.min.js'\n    id='dataTable-tools-js'><\/script>\n\n<style type=\"text\/css\">\n    .DTTT_button.DTTT_button_copy,\n    .DTTT_button.DTTT_button_csv,\n    .DTTT_button.DTTT_button_xls,\n    .DTTT_button.DTTT_button_print {\n        display: none;\n    }\n\n    .form-control::placeholder {\n        color: #D1D5DB;\n    }\n\n    .form-control {\n        height: 40px;\n        font-size: 14px;\n        border-radius: 8px;\n        border: 2px solid #eee;\n        color: #D1D5DB;\n    }\n\n\n    .form-control:hover {\n        border-color: #ddd;\n    }\n\n    .form-control:focus {\n        border-color: #333;\n        box-shadow: none;\n\n    }\n\n    .html {\n        font-family: Barlow;\n    }\n\n    .default-btn {\n        background-color: #FF6B00;\n        color: white;\n        border: none;\n        font-weight: 600;\n        padding: 6px 22px;\n    }\n\n    .default-btn:hover {\n        background-color: white;\n        color: #FF6B00;\n    }\n\n    .default-btn-2 {\n        background-color: white;\n        color: #FF6B00;\n        border: 1px solid #FF6B00;\n        font-weight: 600;\n        padding: 6px 22px;\n    }\n\n    .default-btn-2:hover {\n        background-color: #FF6B00;\n        color: white;\n    }\n\n    input {\n        border-radius: 8px;\n    }\n<\/style>\n\n<script type=\"text\/javascript\">\n    \njQuery(document).ready(function() {\n\nvar t = null,\n\n    e = -1,\n\n    a = 1e8,\n\n    r = 100,\n\n    o = jQuery(\"#democalc-calculated-amount\");\n\n\n\nfunction n(t) {\n\n  \n\n    return t.toFixed(2)\n\n}\n\njQuery(\"#democalc-repayment-period-year\").on(\"change\", function() {\n\n    jQuery(\"#democalc-repayment-period\").val(12 * jQuery(this).val())\n\n}), jQuery(\"#democalc-repayment-period\").on(\"change\", function() {\n\n    jQuery(\"#democalc-repayment-period-year\").val(jQuery(this).val() \/ 12)\n\n}), jQuery(\"#democalc-form\").on(\"submit\", function(l) {\n\n    e = jQuery(\"#rate\").val();\n\n    console.log(e);\n\n    e= e\/100;\n\n    l.preventDefault(), (e <= 0 || isNaN(e)) &#038;&#038; (e = .01);\n\n    var u = jQuery(\"#democalc-loan-amount\").val();\n\n    var u = parseFloat(u.replace(\/,\/g, '')); \n\n    if (function(t) {\n\n            if (\"\" == t || t < 0) return alert(\"Incorrect Value Entered\"), !1;\n\n            return !0\n\n        }(u) &#038;&#038; function(t) {\n\n            if (t > a) return alert(\"The loan amount you entered exceeds the $\" + a + \"\\nmaximum limit for this type of loan.\"), !1;\n\n            if (t < r) return alert(\"The loan amount you entered is less than the $\" + r + \"\\nminimum amount for this type of loan.\"), !1;\n\n            return !0\n\n        }(u)) {\n\n        var c = jQuery(\"#democalc-repayment-period\").val();\n\n        if (!(c > 72)) {\n\n             console.log(\"E\"+e);\n\n            \/\/ console.log(\"C\"+c);\n\n            \/\/ console.log(\"U\"+u);\n\n          \n\n            \/\/ \/\/console.log(\"D\"+d);\n\n            var d = Math.pow(1 + e, c),\n\n                i = u * d * e \/ (d - 1);\n\n\n\n                \n\n            return isNaN(i) || i == Number.POSITIVE_INFINITY || i == Number.NEGATIVE_INFINITY ? o.text(\"Error!\") : (o.text(n(i)), jQuery(\"#democalc-generate-table\").is(\":checked\") ? function(e, a, r, o) {\n\n                var l = 0,\n\n                    u = \"\",\n\n                    c = new Date(jQuery(\"#democalc-start-date\").val()),\n\n                    d = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n\n                    i = jQuery(\"#democalc-result-table\");\n\n                jQuery(\"#democal-table-heading\").show(), t && t.fnDestroy();\n\n                var e_date = null ;\n\n                for (var m = 0; m < r; m++) {\n\n                 \/\/alert(c.getMonth());\n\n                \n\n                    var y = o * a,\n\n                        s = e - y;\n\n                   \/\/ l += y, o -= s, u += \"<tr>\\t\\t\\t\\t\\t\\t\\t<td>\" + d[c.getMonth()] + \" \" + c.getDate() + \" \" + c.getFullYear() + \"<\/td>\\t\\t\\t\\t\\t\\t\\t<td> $\" + n(e) + \"<\/td>\\t\\t\\t\\t\\t\\t\\t<td> $\" + n(s) + \"<\/td>\\t\\t\\t\\t\\t\\t\\t<td> $\" + n(y) + \"<\/td>\\t\\t\\t\\t\\t\\t\\t<td> $\" + n(l) + \"<\/td>\\t\\t\\t\\t\\t\\t\\t<td> $\" + n(o) + \"<\/td>\\t\\t\\t\\t\\t\\t<\/tr>\", c.setMonth(c.getMonth() + 1)\n\n                    l += y, o -= s, u += \"<tr>\\t\\t\\t\\t\\t\\t\\t<td>\" + d[c.getMonth()] + \" \" + c.getDate() + \" \" + c.getFullYear() + \"<\/td>\\t\\t\\t\\t\\t\\t\\t<td> $\" + n(y) + \"<\/td>\\t\\t\\t\\t\\t\\t\\t<td> $\" + n(s) + \"<\/td>\\t\\t\\t\\t\\t\\t\\t<td> $\" + n(e) + \"<\/td>\\t\\t\\t\\t\\t\\t\\t<td> $\" + n(o) + \"<\/td>\\t\\t\\t\\t\\t\\t<\/tr>\", c.setMonth(c.getMonth() + 1)\n\n                    var mon = '';\n\n                    if(c.getMonth() == 0){\n\n                        mon = 12;\n\n                    }else{\n\n\n\n                       mon = c.getMonth()\n\n                    }\n\n                 }\n\n                 \n\n                 if(mon < 10){\n\n                    mon = '0'+mon;\n\n                 }\n\n                 var date_add_zero = c.getDate();\n\n                 if(date_add_zero < 10){\n\n                    date_add_zero = '0'+ date_add_zero;\n\n                 }\n\n                 e_date = date_add_zero+\"-\"+mon+\"-\"+c.getFullYear();\n\n\n\n                let USDollar = new Intl.NumberFormat('en-US', {\n\n                    style: 'currency',\n\n                    currency: 'USD',\n\n                 });\n\n                jQuery(\"#democalc-calculated-amount\").html(USDollar.format(jQuery(\"#democalc-calculated-amount\").html()));\n\n                jQuery(\".total-loan-amount\").html('$'+jQuery(\"#democalc-loan-amount\").val());\n\n                jQuery(\".int-rate\").html(jQuery(\"#rate\").val()+'%');\n\n                jQuery(\".month\").html(jQuery(\"#democalc-repayment-period\").val());\n\n                jQuery(\".end-date\").html(e_date);\n\n                jQuery(\"#democalc-result-table tbody\").html(u), i.show(), t = i.dataTable({\n\n                    bDestroy: !0,\n\n                    paging: !1,\n\n                    searching: !1,\n\n                    ordering: !1,\n\n                    dom: 'T<\"clear\">lfrtip',\n\n                    tableTools: {\n\n                        sSwfPath: \"calculator\/copy_csv_xls_pdf.swf\"\n\n                    }\n\n                })\n\n            }(i, e, c, u) : jQuery(\"#democalc-result-table\").hide()), e = -1, !1\n\n        }\n\n        alert(\"ERROR!Maximum Repayment Time: 72 Months\")\n\n    }\n\n})\n\n});\n<\/script>\n\n<div class=\"container mt-4\">\n    <div class=\"row main-content\">\n        <div class=\"col-md-6 col-lg-7 pb-4 mr-3\" style=\"background-color: #FFF; border-radius:8px; \">\n            <div class=\"row mb-4\">\n                <div class=\"col px-4 py-3\">\n                    <h4 class=\"m-0\" style=\"color: #545F71; font-weight:700;\">Loan Information<\/h4>\n                <\/div>\n            <\/div>\n            <div class=\"loan-calculator\" id=\"democalc\" style=\"color: #545F71;\">\n                <div class=\"calc-heading mb-3 px-3\">\n                    <div class=\"row\">\n                        <div class=\"col-md-6\">\n                            <p class=\"m-0\"> <strong>\n\n                                    <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\"\n                                        xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                                        <path\n                                            d=\"M5.63605 7.75735L7.05026 6.34314L12.7071 12L7.05029 17.6568L5.63608 16.2426L9.87869 12L5.63605 7.75735Z\"\n                                            fill=\"currentColor\" \/>\n                                        <path\n                                            d=\"M12.7071 6.34314L11.2929 7.75735L15.5356 12L11.2929 16.2426L12.7072 17.6568L18.364 12L12.7071 6.34314Z\"\n                                            fill=\"currentColor\" \/>\n                                    <\/svg>\n                                    <\/strong> <\/p>\n\n                        <\/div>\n                    <\/div>\n                <\/div>\n                <form id=\"democalc-form\" class=\"px-3\">\n\n                    <div class=\"form-group row\">\n\n                        <div class=\"col-md-4\">\n                        <label class=\"form-label spec-label\">Do you have a specific interest rate in mind?<\/label>\n                        <\/div>\n                        <div class=\"col-md-8\">\n\n                        <input type=\"number\" id=\"rate\" name=\"rate\" min=\"1\" max=\"24\" step=\"0.01\" class=\"form-control spec-input\" placeholder=\"Enter %\" required>\n<\/div>\n\n                        <\/div>\n\n\n                    <div class=\"form-group row\">\n                        <label for=\"democalc-loan-amount\" class=\"col-md-4 col-form-label\"><strong>Amount of the\n                                loan:<\/strong><\/label>\n                        <div class=\"col-md-8\">\n                            <input id=\"democalc-loan-amount\" type=\"text\" name=\"loan-amount\"\n                                class=\"loan-amount form-control\" placeholder=\"$TT 0.00\">\n                        <\/div>\n                    <\/div>\n                    <div class=\"form-group row\">\n                        <div class=\"col-md-4\">\n                            <strong>Repayment period:<\/strong>\n                            <p>Enter years or months<\/p>\n                        <\/div>\n                        <div class=\"col-md-4\">\n                            <label class=\"mb-1\" style=\"font-weight:500;\"> Years: <\/label>\n                            <input id=\"democalc-repayment-period-year\" class=\"form-control\" type=\"text\" placeholder=\"6\">\n                        <\/div>\n                        <div class=\"col-md-4\">\n                            <label class=\"mb-1\" style=\"font-weight:500;\"> Months:<\/label>\n                            <input id=\"democalc-repayment-period\" class=\"form-control\" type=\"text\" placeholder=\"72\">\n                        <\/div>\n                    <\/div>\n                    <div class=\"form-group row\">\n                        <label for=\"democalc-start-date\" class=\"col-md-4 col-form-label\"><strong>Loan start\n                                date:<\/strong><\/label>\n                        <div class=\"col-md-8\">\n                            <input type=\"date\" id=\"democalc-start-date\" class=\"form-control\" value=\"2023-03-11\">\n                        <\/div>\n                    <\/div>\n                    <div class=\"form-group\">\n                        <div class=\"form-check\">\n                            <input id=\"democalc-generate-table\" class=\"form-check-input\" type=\"checkbox\">\n                            <label class=\"form-check-label\" for=\"democalc-generate-table\">Generate Table<\/label>\n                        <\/div>\n                    <\/div>\n                    <div class=\"mt-4 align-btn\">\n                        <input type=\"submit\" id=\"democalc-btn-calculate\" class=\"btn-calculate btn default-btn\"\n                            style=\"border-radius: 6px\" value=\"Calculate\">\n                        <input class=\"btn-clear btn default-btn-2\" name=\"butReset\" type=\"reset\" value=\"Clear\"\n                            style=\"border-radius: 6px\">\n                    <\/div>\n                <\/form>\n            <\/div>\n        <\/div>\n\n        <div class=\"col-md-5 col-lg-4 d-flex flex-column justify-content-between\"\n            style=\"background-color: #234f80; color: #fff; border-radius:8px; min-height: 400px;\">\n            <!-- Top Section: Payment Information -->\n            <div class=\"px-4 py-3\" style=\"color: #fff;\">\n                <h4 class=\"m-0\" style=\"color: #fff; font-weight:600 \">Payment Information<\/h4>\n                <p class=\"mb-1 mt-2 \">Your monthly payment will be:<\/p>\n            <\/div>\n\n            <!-- Middle Section: Amount -->\n            <div class=\"px-4\" style=\"font-size: 60px; line-height: 60px; font-weight: 700;\">\n                <p id=\"democalc-calculated-amount\">$0.00<\/p>\n            <\/div>\n\n            <!-- Bottom Section: Need Help? -->\n            <div class=\"px-4 mb-3\">\n                <p class=\"mb-1\"><strong>Need Help?<\/strong><\/p>\n                <p>Contact one of our Customer Service Representatives at\n                    <a href=\"#\" target=\"_parent\" rel=\"noopener noreferrer\" style=\"color: #fff; border-bottom: 2px solid #fff; text-decoration: none\">\n                        <strong>+1 (868) 226-7328<\/strong>\n                    <\/a> for further assistance.\n                <\/p>\n            <\/div>\n        <\/div>\n\n\n        <div class=\"loan-cal-result col-12 mt-4\">\n            <div class=\"table-responsive\">\n                <table id=\"democalc-result-table\" class=\"table table-sm table-bordered\" style=\"display:none\">\n                    <h5 id=\"democal-table-heading\" style=\"display: none;\">Payment Table<\/h5>\n                    <thead>\n                        <tr class=\"table-info\">\n                            <th>Month \/ Year<\/th>\n                            <th>Payment<\/th>\n                            <th>Principal Paid<\/th>\n                            <th>Monthly Payment<\/th>\n                            <th>Balance<\/th>\n                        <\/tr>\n                    <\/thead>\n                    <tbody><\/tbody>\n                    <tfoot><\/tfoot>\n                <\/table>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Loan Information Do you have a specific interest rate in mind? Amount of the loan: Repayment period: Enter years or months Years: Months: Loan start date:<span class=\"excerpt-hellip\"> [\u2026]<\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"my.php","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/fac.quovizweb4.com\/index.php\/wp-json\/wp\/v2\/pages\/233"}],"collection":[{"href":"https:\/\/fac.quovizweb4.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/fac.quovizweb4.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/fac.quovizweb4.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fac.quovizweb4.com\/index.php\/wp-json\/wp\/v2\/comments?post=233"}],"version-history":[{"count":5,"href":"https:\/\/fac.quovizweb4.com\/index.php\/wp-json\/wp\/v2\/pages\/233\/revisions"}],"predecessor-version":[{"id":1784,"href":"https:\/\/fac.quovizweb4.com\/index.php\/wp-json\/wp\/v2\/pages\/233\/revisions\/1784"}],"wp:attachment":[{"href":"https:\/\/fac.quovizweb4.com\/index.php\/wp-json\/wp\/v2\/media?parent=233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}