(function ($) { // start of static values - update your values here var UsValgeneric = 12500; var UsValniche = 16000; var UsValother = 14000; var IndValgeneric = 3000; var IndValniche = 4000; var IndValother = 3500; var positionArray = [ "java developer", "dotnet developer", "full stack developer", "etl developer", "c++ programmer", "python developer", "bigdata developer", "ui developer", "r programmer", "sharepoint developer", "salesforce developer", "linux engineer", "windows engineer", "citrix engineer", "project manager", "scrum master", "agile coach", "business analyst", "system analyst", "manual tester", "automation tester", "performance tester", "etl tester", "sql dba", "db2 dba", "oracle apps dba", "oracle dba", "sybase dba", "aws engineer", "azure engineer", "google cloud engineer", "pivotal cloud engineer", "oracle cloud engineer", "aws architect", "azure architect", "google cloud architect", "oracle cloud architect", "sap functional consultant", "peoplesoft functional consultant", "jd edwards functional consultant", "salesforce administrator", "siebel administrator", "oracle apps technical consultant", "oracle apps functional consultant", "sap techno-functional consultant", "peoplesoft techno-functional consultant", "jd edwards techno-functional consultant", "sap abap", "sab basis", "peoplesoft technical consultant", "jd edwards technical consultant", "network administrator", ]; let positionCategory = { "full stack developer": "niche", "python developer": "niche", "bigdata developer": "niche", "r programmer": "niche", "devops engineer": "niche", "embedded engineer": "niche", "oracle apps dba": "niche", "azure engineer": "niche", "google cloud engineer": "niche", "pivotal cloud engineer": "niche", "azure architect": "niche", "google cloud architect": "niche", "oracle cloud architect": "niche", "sap functional consultant": "niche", "peoplesoft functional consultant": "niche", "salesforce administrator": "niche", "siebel administrator": "niche", "oracle apps functional consultant": "niche", "sap techno-functional consultant": "niche", "peoplesoft techno-functional consultant": "niche", "jd edwards techno-functional consultant": "niche", "peoplesoft technical consultant": "niche", "jd edwards technical consultant": "niche", "datacenter administrator": "niche", "solution architect": "niche", "enterprise architect": "niche", "security architect": "niche", "java developer": "generic", "dotnet developer": "generic", "etl developer": "generic", "c++ programmer": "generic", "ui developer": "generic", "sharepoint developer": "generic", "salesforce developer": "generic", "linux engineer": "generic", "windows engineer": "generic", "network engineer": "generic", "systems engineer": "generic", "infrastructure engineer": "generic", "citrix engineer": "generic", "project manager": "generic", "scrum master": "generic", "agile coach": "generic", "business analyst": "generic", "system analyst": "generic", "manual tester": "generic", "automation tester": "generic", "performance tester": "generic", "etl tester": "generic", "sql dba": "generic", "db2 dba": "generic", "oracle dba": "generic", "sybase dba": "generic", "aws engineer": "generic", "oracle cloud engineer": "generic", "aws architect": "generic", "oracle apps technical consultant": "generic", "sap abap": "generic", "sab basis": "generic", "network administrator": "generic", "unix administrator": "generic", "linux administrator": "generic", "aix administrator": "generic", "windows administrator": "generic", "technical architect": "generic", "data architect": "generic", "telecom engineer": "generic", "rf engineer": "generic", "avaya engineer": "generic", }; // end of static values - Dont change after this var usFactorVal; var indFactorVal; var experience; var consultant; var positionInput; var usFactorsValue = { Generic: UsValgeneric, Niche: UsValniche, Other: UsValother, }; var indiaFactorsValue = { Generic: IndValgeneric, Niche: IndValniche, Other: IndValother, }; $(window).ready(function () { $(document).on("keyup", ".position", function (e) { let target = $(this).parent(); let positionVal = $(this).val().toLowerCase().trim(); if (positionVal.length > 0) { let positionTyped = positionArray.filter((item) => { return item.toLowerCase().indexOf(positionVal) !== -1; }); if (positionTyped.length > 0) { target.find(".searchList li").remove(); positionTyped.forEach((item) => { let elements = `
  • ${item}
  • `; target.find(".searchList").append(elements); }); errorMessage( "Please Select from one of our closest suggestion(s)", "suggestion", target ); } else { target.find(".searchList li").remove(); target.find('.errorBox li[data-attribute="suggestion"]').remove(); } // remove error message target.find('.errorBox li[data-attribute="position"]').remove(); positionInput = positionVal; } else { target.find(".searchList li").remove(); target.find('.errorBox li[data-attribute="suggestion"]').remove(); errorMessage( "Please Fill in the required Position", "position", target ); } calculateSavings(target); }); $(document).on("click", ".searchList li", function (e) { let target = $(this).parent().parent(); let selectedPosition = $(this)[0].dataset.attribute; target.find(".position").val(selectedPosition); target.find(".searchList li").remove(); positionInput = selectedPosition; // remove error message target.find('.errorBox li[data-attribute="position"]').remove(); target.find('.errorBox li[data-attribute="suggestion"]').remove(); calculateSavings(target); }); $(document).on("keyup", ".experience", function (e) { let target = $(this).parent(); let x = checkIfNumber(e.target.value); if (x && x > 0) { experience = x; target.find('.errorBox li[data-attribute="experience"]').remove(); calculateSavings(target); } else { errorMessage( "Please Fill in the Experience in Digits or a value greater than zero", "experience", target ); } checkifSuggestion(target); }); $(document).on("keyup", ".consultant", function (e) { let target = $(this).parent(); let x = checkIfNumber(e.target.value); if (x && x > 0) { consultant = x; target.find('.errorBox li[data-attribute="consultant"]').remove(); calculateSavings(target); } else { errorMessage( "Please Fill in the Consultant in Digits or a value greater than zero", "consultant", target ); } checkifSuggestion(target); }); function checkifSuggestion(target) { let x = target.find(".searchList li").length; if (x > 0) { errorMessage( "Please Select from one of our closest suggestion(s)", "suggestion", target ); } else { target.find('.errorBox li[data-attribute="suggestion"]').remove(); } } function checkIfNumber(val) { let x = parseFloat(val); if (!isNaN(x)) { return x; } else { return false; } } function errorMessage(text, attr, target) { target.find(`.errorBox li[data-attribute="${attr}"]`).remove(); let msg = `
  • ${text}
  • `; target.find(".errorBox").append(msg); } function calculateSavings(target) { let savingsBox = target.find(".savings"); if ( target.find(".errorBox li").length < 1 && positionInput && experience && consultant ) { let x = positionCategory[positionInput]; console.log(x); if (x && x == "generic") { usFactorVal = usFactorsValue.Generic; indFactorVal = indiaFactorsValue.Generic; } else if (x && x == "niche") { usFactorVal = usFactorsValue.Niche; indFactorVal = indiaFactorsValue.Niche; } else { usFactorVal = usFactorsValue.Other; indFactorVal = indiaFactorsValue.Other; } // console.log(usFactorVal) // console.log(indFactorVal) let usCost = usFactorVal * experience * consultant; let indCost = indFactorVal * experience * consultant; let savings = usCost - indCost; $(savingsBox).text(savings); } } $(document).on("click", ".addBtn", function () { let x = $(".savingCalc").clone(); $(".savingFormBox").append(x[0]); // reset new form let len = $(".savingFormBox").children().length; $(".savingCalc")[len - 1].reset(); let svnTxt = $(".savingCalc")[len - 1]; $(svnTxt).find(".savings").text(0); // reset variables experience = 0; consultant = 0; positionInput = ""; }); $(document).on("click", ".totalSavings", function () { let x = $(".savings"); let arr = []; if (x.length > 0) { for (let i = 0; i < x.length; i++) { let textFn = $(x[i]).text(); arr.push(parseFloat(textFn)); } let sumVal = arr.reduce((total, num) => { return total + num; }); $(".totalSavingsVal").text(sumVal); } }); // end of block }); })(jQuery.noConflict());
    Support & Downloads

    Quisque actraqum nunc no dolor sit ametaugue dolor. Lorem ipsum dolor sit amet, consyect etur adipiscing elit.

    s f

    Contact Info

    Savings Calculator

      Savings: 0

        X
        Click to add another position

        The scale of your requirements necessitate personalized attention. Kindly write to us directly

        Need help with urgent requirements?