www.indusservices.ae
Open in
urlscan Pro
108.166.181.239
Public Scan
Submitted URL: http://www.indusservices.ae/assets/js/store.js?ver=3
Effective URL: https://www.indusservices.ae/assets/js/store.js?ver=3
Submission: On August 30 via api from US — Scanned from US
Effective URL: https://www.indusservices.ae/assets/js/store.js?ver=3
Submission: On August 30 via api from US — Scanned from US
Form analysis
0 forms found in the DOMText Content
/*version 2.4*/ var $ = jQuery.noConflict(); var hl_end_content_pos; var locations; var global_plot_marker=[]; /*var today = new Date().toISOString().slice(0, 16); document.getElementsByName("date")[0].min = today;*/ jQuery.fn.exists = function(){return this.length>0;} jQuery(document).ready(function() { if ( $("#date").exists() ) { var date_field_value_flag=0; document.getElementById('date').valueAsDate = new Date(); var time_to_dsp="00:00"; var dt = new Date(); var time = dt.getHours() + ":" + dt.getMinutes(); var time_arr = time.split(':'); var time_interval=parseInt($('#time_int').val()); var start_time=(moment.utc(time,'HH:mm').add(time_interval,'minutes').format('HH:mm')); var start_time_arr = start_time.split(':'); var end_time = $('#end_time_int').val(); var end_time_arr = end_time.split(':'); var time_check=parseInt(start_time_arr[0]); var end_time_check=parseInt(end_time_arr[0]); end_time_check=end_time_check-1; i=0; var time_gap=60; if(time_interval<500){ while(time_check<end_time_check) { date_field_value_flag=1; if(i==0){ time_to_dsp=(moment.utc(time,'HH:mm').add(time_interval,'minutes').format('HH:mm')); var time_to_dsp_arr=time_to_dsp.split(':'); var hrs=(time_to_dsp_arr[0]); var mnts=parseInt((time_to_dsp_arr[1])); if(mnts>15){ mnts="30"; }else{ mnts="00"; } //new deletable code var start_time = $('#start_time_int').val(); start_time=(moment.utc(start_time,'HH:mm').add(time_interval,'minutes').format('HH:mm')); var start_time_arr = start_time.split(':'); if(hrs<parseInt((start_time_arr[0]))){ hrs=(start_time_arr[0]); mnts=(start_time_arr[1]); } //new deletable code ends time_to_dsp = hrs+ ":" + mnts; }else{ time_to_dsp=(moment.utc(time,'HH:mm').add(time_gap,'minutes').format('HH:mm')); } $('#cars').append($('<option>', { value: time_to_dsp, text : time_to_dsp })); time=time_to_dsp; time_check_arr = time.split(':'); time_check=parseInt(time_check_arr[0]); i=1; } } //++++new code for date and time checks current time passed then set next day if(date_field_value_flag==0){ var currentDate = new Date(); currentDate.setDate(currentDate.getDate() + 1); document.getElementById('date').valueAsDate = currentDate; var time_to_dsp="00:00"; var dt = new Date(); var time = $('#start_time_int').val(); var time_arr = time.split(':'); var time_interval=60; //alert(time_arr); var start_time=(moment.utc(time,'HH:mm').add(time_interval,'minutes').format('HH:mm')); //alert(start_time); var start_time_arr = start_time.split(':'); var end_time = $('#end_time_int').val(); var end_time_arr = end_time.split(':'); var time_check=parseInt(start_time_arr[0]); var end_time_check=parseInt(end_time_arr[0]); var time_gap=0; //alert(time_check); //alert(end_time_check); i=0; end_time_check=end_time_check-1; while(time_check<end_time_check) { if(i==0){ time_to_dsp=(moment.utc(time,'HH:mm').add(time_gap,'minutes').format('HH:mm')); }else{ time_to_dsp=(moment.utc(time,'HH:mm').add(time_interval,'minutes').format('HH:mm')); } //alert(time_to_dsp); $('#cars').append($('<option>', { value: time_to_dsp, text : time_to_dsp })); //alert(time_to_dsp); time=time_to_dsp; time_check_arr = time.split(':'); time_check=parseInt(time_check_arr[0]); //alert(time_check); i=1; } } //----new code for date and time checks current time passed then set next day }else{ } //time code $("#date").change(function(){ $('#cars').val(""); $('#cars') .find('option') .remove() .end() .append('<option value="n/a">Please Select Time</option>') .val('') ; var GivenDate = $("#date").val(); var CurrentDate = new Date(); GivenDate = new Date(GivenDate); if(GivenDate > CurrentDate){ var time_to_dsp="00:00"; var dt = new Date(); var time = $('#start_time_int').val(); var time_arr = time.split(':'); var time_interval=60; //alert(time_arr); var start_time=(moment.utc(time,'HH:mm').add(time_interval,'minutes').format('HH:mm')); //alert(start_time); var start_time_arr = start_time.split(':'); var end_time = $('#end_time_int').val(); var end_time_arr = end_time.split(':'); var time_check=parseInt(start_time_arr[0]); var end_time_check=parseInt(end_time_arr[0]); var time_gap=0; //alert(time_check); //alert(end_time_check); i=0; end_time_check=end_time_check-1; while(time_check<end_time_check) { if(i==0){ time_to_dsp=(moment.utc(time,'HH:mm').add(time_gap,'minutes').format('HH:mm')); }else{ time_to_dsp=(moment.utc(time,'HH:mm').add(time_interval,'minutes').format('HH:mm')); } //alert(time_to_dsp); $('#cars').append($('<option>', { value: time_to_dsp, text : time_to_dsp })); //alert(time_to_dsp); time=time_to_dsp; time_check_arr = time.split(':'); time_check=parseInt(time_check_arr[0]); //alert(time_check); i=1; } }else{ //alert('Given date is not greater than the current date.'); var time_to_dsp="00:00"; var dt = new Date(); var time = dt.getHours() + ":" + dt.getMinutes(); var time_arr = time.split(':'); var time_interval=parseInt($('#time_int').val()); //alert(time_arr); var start_time=(moment.utc(time,'HH:mm').add(time_interval,'minutes').format('HH:mm')); //alert(start_time); var start_time_arr = start_time.split(':'); var end_time = $('#end_time_int').val(); var end_time_arr = end_time.split(':'); var time_check=parseInt(start_time_arr[0]); var end_time_check=parseInt(end_time_arr[0]); //alert(time_check); //alert(end_time_check); var time_gap=60; end_time_check=end_time_check-1; i=0; if(time_interval<500){ while(time_check<end_time_check) { if(i==0){ time_to_dsp=(moment.utc(time,'HH:mm').add(time_interval,'minutes').format('HH:mm')); var time_to_dsp_arr=time_to_dsp.split(':'); var hrs=(time_to_dsp_arr[0]); var mnts=parseInt((time_to_dsp_arr[1])); if(mnts>15){ mnts="30"; }else{ mnts="00"; } //new deletable code var start_time = $('#start_time_int').val(); start_time=(moment.utc(start_time,'HH:mm').add(time_interval,'minutes').format('HH:mm')); var start_time_arr = start_time.split(':'); if(hrs<parseInt((start_time_arr[0]))){ hrs=(start_time_arr[0]); mnts=(start_time_arr[1]); } //new deletable code ends time_to_dsp = hrs+ ":" + mnts; }else{ time_to_dsp=(moment.utc(time,'HH:mm').add(time_gap,'minutes').format('HH:mm')); } //alert(time_to_dsp); $('#cars').append($('<option>', { value: time_to_dsp, text : time_to_dsp })); //alert(time_to_dsp); time=time_to_dsp; time_check_arr = time.split(':'); time_check=parseInt(time_check_arr[0]); //alert(time_check); i=1; } } //var addition_time= moment.utc(time,'hh:mm').add(30,'minutes').format('hh:mm'); //alert(addition_time); } }); //time code ends //hl_end_content_pos = parseFloat($('.footer-wrap').position().top)+50; var website_date_picker_format="yy-mm-dd"; if ( $("#website_date_picker_format").exists()){ website_date_picker_format= $("#website_date_picker_format").val(); } dump(website_date_picker_format); jQuery(".j_date").datepicker({ //dateFormat: 'yy-mm-dd' , dateFormat: website_date_picker_format, altFormat: "yy-mm-dd", changeMonth: true, changeYear: true , minDate: 0, prevText: js_lang.datep_1, nextText: js_lang.datep_2, currentText: js_lang.datep_3, monthNames: [js_lang.January,js_lang.February,js_lang.March,js_lang.April,js_lang.May,js_lang.June, js_lang.July,js_lang.August,js_lang.September,js_lang.October,js_lang.November,js_lang.December], monthNamesShort: [js_lang.Jan, js_lang.Feb, js_lang.Mar, js_lang.Apr, js_lang.May, js_lang.Jun, js_lang.Jul, js_lang.Aug, js_lang.Sep, js_lang.Oct, js_lang.Nov, js_lang.Dec], dayNames: [js_lang.Sunday, js_lang.Monday, js_lang.Tuesday, js_lang.Wednesday, js_lang.Thursday, js_lang.Friday, js_lang.Saturday], dayNamesShort: [js_lang.Sun, js_lang.Mon, js_lang.Tue, js_lang.Wed, js_lang.Thu, js_lang.Fri, js_lang.Sat], dayNamesMin: [js_lang.Su,js_lang.Mo,js_lang.Tu,js_lang.We,js_lang.Th,js_lang.Fr,js_lang.Sa], isRTL: false, onSelect : function( element, object ) { var original_id=$(this).data("id"); dump(original_id); var altFormat = $(this).datepicker('option', 'altFormat'); var currentDate = $(this).datepicker('getDate'); var formatedDate = $.datepicker.formatDate(altFormat, currentDate); dump(formatedDate); $("#"+original_id).val(formatedDate); if ( $(".time_list").exists() ){ callAjax("loadTimeList", "date_selected="+ formatedDate + "&merchant_id=" + merchant_information.merchant_id ); } else { loadSkedMenu( $("#delivery_date").val() ); } } }); jQuery(".j_date2").datepicker({ //dateFormat: 'yy-mm-dd' , dateFormat: website_date_picker_format, altFormat: "yy-mm-dd", changeMonth: true, changeYear: true , //minDate: 0, prevText: js_lang.datep_1, nextText: js_lang.datep_2, currentText: js_lang.datep_3, monthNames: [js_lang.January,js_lang.February,js_lang.March,js_lang.April,js_lang.May,js_lang.June, js_lang.July,js_lang.August,js_lang.September,js_lang.October,js_lang.November,js_lang.December], monthNamesShort: [js_lang.Jan, js_lang.Feb, js_lang.Mar, js_lang.Apr, js_lang.May, js_lang.Jun, js_lang.Jul, js_lang.Aug, js_lang.Sep, js_lang.Oct, js_lang.Nov, js_lang.Dec], dayNames: [js_lang.Sunday, js_lang.Monday, js_lang.Tuesday, js_lang.Wednesday, js_lang.Thursday, js_lang.Friday, js_lang.Saturday], dayNamesShort: [js_lang.Sun, js_lang.Mon, js_lang.Tue, js_lang.Wed, js_lang.Thu, js_lang.Fri, js_lang.Sat], dayNamesMin: [js_lang.Su,js_lang.Mo,js_lang.Tu,js_lang.We,js_lang.Th,js_lang.Fr,js_lang.Sa], isRTL: false, onSelect : function( element, object ) { var original_id=$(this).data("id"); dump(original_id); var altFormat = $(this).datepicker('option', 'altFormat'); var currentDate = $(this).datepicker('getDate'); var formatedDate = $.datepicker.formatDate(altFormat, currentDate); dump(formatedDate); $("#"+original_id).val(formatedDate); } }); /** update 2.4 */ var booking_mindate=1; if ( $("#accept_booking_sameday").exists() ){ if ( $("#accept_booking_sameday").val()==2){ booking_mindate=0; } } /** update 2.4 */ jQuery(".date_booking").datepicker({ //dateFormat: 'yy-mm-dd' , dateFormat: website_date_picker_format, altFormat: "yy-mm-dd", changeMonth: true, changeYear: true , minDate: booking_mindate, prevText: js_lang.datep_1, nextText: js_lang.datep_2, currentText: js_lang.datep_3, monthNames: [js_lang.January,js_lang.February,js_lang.March,js_lang.April,js_lang.May,js_lang.June, js_lang.July,js_lang.August,js_lang.September,js_lang.October,js_lang.November,js_lang.December], monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', js_lang.Jul, js_lang.Aug, js_lang.Sep, js_lang.Oct, js_lang.Nov, js_lang.Dec], dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], dayNamesMin: [js_lang.Su,js_lang.Mo,js_lang.Tu,js_lang.We,js_lang.Th,js_lang.Fr,js_lang.Sa], isRTL: false, onSelect : function( element, object ) { var original_id=$(this).data("id"); dump(original_id); var altFormat = $(this).datepicker('option', 'altFormat'); var currentDate = $(this).datepicker('getDate'); var formatedDate = $.datepicker.formatDate(altFormat, currentDate); dump(formatedDate); $("#"+original_id).val(formatedDate); } }); var show_period=false; if ( $("#website_time_picker_format").exists() ){ if ( $("#website_time_picker_format").val()=="12"){ show_period=true; } } if ( $("#theme_time_pick").val() ==""){ jQuery('.timepick').timepicker({ showPeriod: show_period, hourText: js_lang.Hour, minuteText: js_lang.Minute, amPmText: [js_lang.AM, js_lang.PM], }); jQuery('#booking_time').timepicker({ showPeriod: show_period, hourText: js_lang.Hour, minuteText: js_lang.Minute, amPmText: [js_lang.AM, js_lang.PM], }); } }); $(window).scroll(function() { if ( hl_get_scroll_position() ) { $(".back-top").show(); } else { $(".back-top").fadeOut("slow"); } }); function hl_get_scroll_position() { var total_scrol_height=$(window).scrollTop() + $(window).height(); if( $(window).scrollTop() + $(window).height() == $(document).height()) { } if ( total_scrol_height >= hl_end_content_pos){ return true; } return false; } function clear_elements(ele) { $("#"+ele).find(':input').each(function() { switch(this.type) { case 'password': case 'select-multiple': case 'select-one': case 'text': case 'textarea': $(this).val(''); break; case 'checkbox': case 'radio': this.checked = false; } }); $(".preview").remove(); } $.validate({ language : jsLanguageValidator, form : '#forms', onError : function() { }, onSuccess : function() { form_submit(); return false; } }); /*$.validate({ language : jsLanguageValidator, form : '#forms-search', onError : function() { }, onSuccess : function() { return true; } });*/ $.validate({ language : jsLanguageValidator, form : '#form-signup', onError : function() { }, onSuccess : function() { form_submit('form-signup'); return false; } }); $.validate({ language : jsLanguageValidator, form : '#frm-creditcard', onError : function() { }, onSuccess : function() { form_submit('frm-creditcard'); return false; } }); $.validate({ language : jsLanguageValidator, form : '#frm-resume-signup', onError : function() { }, onSuccess : function() { form_submit('frm-resume-signup'); return false; } }); $.validate({ language : jsLanguageValidator, form : '#frm-book', onError : function() { }, onSuccess : function() { form_submit('frm-book'); return false; } }); /*$.validate({ form : '#frm-fooditem', onError : function() { }, onSuccess : function() { alert('d2'); form_submit('frm-fooditem'); return false; } });*/ $.validate({ language : jsLanguageValidator, form : '#frm-delivery', onError : function() { }, onSuccess : function() { form_submit('frm-delivery'); return false; } }); function busy(e) { if (e) { $('body').css('cursor', 'wait'); } else $('body').css('cursor', 'auto'); if (e) { NProgress.set(0.0); NProgress.inc(); } else { NProgress.done(); } } function scroll(id){ if( $('#'+id).is(':visible') ) { $('html,body').animate({scrollTop: $("#"+id).offset().top-100},'slow'); } } function scroll_class(id){ if( $('.'+id).is(':visible') ) { $('html,body').animate({scrollTop: $("."+id).offset().top-100},'slow'); } } function toogle(id , bool , caption) { $('#'+id).attr("disabled", bool ); $("#"+id).val(caption); } function rm_notices() { $(".uk-alert").remove(); } function form_submit(formid) { rm_notices(); if ( formid ) { var form_id=formid; } else { var form_id=$("form").attr("id"); } var btn=$('#'+form_id+' input[type="submit"]'); var btn_cap=btn.val(); btn.attr("disabled", true ); btn.val(js_lang.processing); busy(true); var params=$("#"+form_id).serialize(); params+= addValidationRequest(); var action=$('#'+form_id).find("#action").val(); if ( action == "placeOrder" || action == "InitPlaceOrder" ){ params+="&cc_id="+$(".cc_id:checked").val(); } if ( action == "merchantPayment" ){ params+="&cc_id="+$(".cc_id:checked").val(); } if ( action=="addReviews"){ if ( $("#initial_review_rating").val()=="" ){ uk_msg(js_lang.trans_1); busy(false); btn.attr("disabled", false ); btn.val(btn_cap); return; } } /*if(!empty(csrf_token)){ params+="&csrf_token="+csrf_token; }*/ switch(action) { case "clientLogin": case "clientLoginModal": case "merchantSignUp": case "merchantSignUp2": if ( $("#RecaptchaField1").exists() ){ var googleResponse = $("#RecaptchaField1").find(".g-recaptcha-response").val(); if (!googleResponse) { busy(false); uk_msg(js_lang.trans_52); btn.attr("disabled", false ); btn.val(btn_cap); busy(false); return; } } break; case "clientRegistrationModal": case "clientRegistration": if ( $("#RecaptchaField2").exists() ){ var googleResponse = $("#RecaptchaField2").find(".g-recaptcha-response").val(); dump(googleResponse); if (!googleResponse) { busy(false); uk_msg(js_lang.trans_52); btn.attr("disabled", false ); btn.val(btn_cap); busy(false); return; } } break; case "placeOrder": $(".place_order").css({ 'pointer-events' : 'none' }); break; } dump(action); console.log(params); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); btn.attr("disabled", false ); btn.val(btn_cap); //scroll(form_id); if (data.code==1){ if(action=="clientLogin"){ $('#show_login_msg_success').html(data.msg); $('#show_login_msg_success').show(); $('#show_login_msg').hide(); setTimeout(function() { $('#show_login_msg_success').fadeOut('fast'); }, 5000); }else if(action=="forgotPassword"){ $('#show_forgot_msg').html(data.msg); $('#show_forgot_msg').show(); $('#show_forgot_msg_error').hide(); setTimeout(function() { $('#show_forgot_msg').fadeOut('fast'); }, 5000); }else if(action=="FBRegister"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("cleanerhomecleanData"); localStorage.removeItem("datedeschomecleanData"); localStorage.removeItem("hourscleanDatahour"); localStorage.removeItem("totalhomecleanData"); }else if(action=="maidClean"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("cleanermaidcleanData"); localStorage.removeItem("datedescmaidcleanData"); localStorage.removeItem("hours_maidcleanDatahour"); localStorage.removeItem("totalmaidcleanData"); }else if(action=="ClientCCList"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("deepcleancat"); localStorage.removeItem("datedescdeepcleanData"); localStorage.removeItem("deepcleanappsize"); localStorage.removeItem("deepcleanvillsize"); localStorage.removeItem("deepcleanoffsize"); localStorage.removeItem("deepcleansize"); }else if(action=="mover"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("movecleancat"); localStorage.removeItem("mov_type"); localStorage.removeItem("movecleanappsize"); localStorage.removeItem("movecleanvillsize"); localStorage.removeItem("movecleanoffsize"); localStorage.removeItem("datedescmovecleanData"); localStorage.removeItem("deepcleansize"); }else if(action=="storage_cleaner"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("storagecleancat"); //localStorage.removeItem("mov_type"); localStorage.removeItem("storagecleanappsize"); localStorage.removeItem("storagecleanvillsize"); localStorage.removeItem("storagecleanoffsize"); localStorage.removeItem("datedescstoragecleanData"); localStorage.removeItem("deepcleansize"); }else if(action=="paintQuote"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("paintcleancat_quote"); localStorage.removeItem("datedescpaintquotecleanData"); localStorage.removeItem("paintcleanappsize"); localStorage.removeItem("paintcleanvillsize"); //localStorage.removeItem("deepcleanoffsize"); //localStorage.removeItem("deepcleansize"); }else if(action=="remodelQuote"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("remodelcleancat_quote"); localStorage.removeItem("datedescremodelquotecleanData"); localStorage.removeItem("remodelcleanappsize"); localStorage.removeItem("remodelcleanvillsize"); //localStorage.removeItem("deepcleanoffsize"); //localStorage.removeItem("deepcleansize"); }else if(action=="poolcleanQuote"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("poolcleantype"); localStorage.removeItem("datedescpoolcleanData"); }else if(action=="reshedule_order"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.reload(); }else if(action=="cancel_order_indus"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.reload(); }else if(action=="carpQuote"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("carp_service_type"); localStorage.removeItem("datedesccarpquotecleanData"); }else if(action=="acQuote"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("ac_type"); localStorage.removeItem("ac_unit"); localStorage.removeItem("ac_service_type"); localStorage.removeItem("datedescacpquotecleanData"); }else if(action=="pestQuote"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("pest_house_type"); localStorage.removeItem("pest_type_quote"); localStorage.removeItem("pest_unit_quote"); localStorage.removeItem("datedescpestquotecleanData"); }else if(action=="electQuote"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("elect_type_quote"); localStorage.removeItem("datedescelectquotecleanData"); }else if(action=="plumbQuote"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("plumb_type_quote"); localStorage.removeItem("datedescplumbquotecleanData"); }else if(action=="applianceQuote"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("appliance_type"); localStorage.removeItem("appliance_unit"); localStorage.removeItem("appliance_service_type"); localStorage.removeItem("datedescappliancequotecleanData"); }else if(action=="itemQuote"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("item_need"); localStorage.removeItem("item_type"); localStorage.removeItem("datedescitemquotecleanData"); }else if(action=="junkQuote"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("junk_need"); localStorage.removeItem("junk_type"); localStorage.removeItem("datedescjunkquotecleanData"); }else if(action=="gardenQuote"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("garden_type"); localStorage.removeItem("datedescgardenquotecleanData"); }else if(action=="handQuote"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("hand_service_type"); localStorage.removeItem("datedeschandquotecleanData"); }else if(action=="sofaClean"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("steamseatsprice"); localStorage.removeItem("totalsofacleanDatashamp"); localStorage.removeItem("sofacleantype"); localStorage.removeItem("shampseatsprice"); localStorage.removeItem("totalsofacleanDatasteam"); localStorage.removeItem("datedescsofacleanData"); }else if(action=="paintClean"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("villabedsprice"); localStorage.removeItem("totalpaintcleanDatavilla"); localStorage.removeItem("paintcleantype"); localStorage.removeItem("appartbedsprice"); localStorage.removeItem("totalpaintcleanDataappart"); localStorage.removeItem("datedescpaintcleanData"); }else if(action=="remodelClean"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("villabedsprice_remodel"); localStorage.removeItem("totalremodelcleanDatavilla"); localStorage.removeItem("remodelcleantype"); localStorage.removeItem("appartbedsprice_remodel"); localStorage.removeItem("totalremodelcleanDataappart"); localStorage.removeItem("datedescremodelcleanData"); }else if(action=="sanitClean"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("sanitcleantype"); localStorage.removeItem("appartbedsprice_sanit"); localStorage.removeItem("totalsanitcleanDataappart"); localStorage.removeItem("villabedsprice_sanit"); localStorage.removeItem("totalsanitcleanDatavilla"); localStorage.removeItem("datedescsanitcleanData"); }else if(action=="deepCleanorder"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("deepcleantypeorder"); localStorage.removeItem("appartbedsprice_deepcleanorder"); localStorage.removeItem("totalcleanDataappart_deepcleanorder"); localStorage.removeItem("villabedsprice_deepcleanorder"); localStorage.removeItem("totalcleanDatavilla_deepcleanorder"); localStorage.removeItem("datedesccleanData_deepcleanorder"); }else if(action=="pestClean"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("pestcleantype"); localStorage.removeItem("appartbedsprice_pest"); localStorage.removeItem("pest_kill_type"); localStorage.removeItem("totalpestcleanDataappart_pest"); localStorage.removeItem("villabedsprice_pest"); localStorage.removeItem("totalpestcleanDatavilla_pest"); localStorage.removeItem("datedescpestcleanData"); }else if(action=="carpetClean"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("carpetcleantype"); localStorage.removeItem("srugpieceprice"); localStorage.removeItem("totalcarpetcleanDatasrug"); localStorage.removeItem("mrugpieceprice"); localStorage.removeItem("totalcarpetcleanDatamrug"); localStorage.removeItem("mrugpieceprice"); localStorage.removeItem("totalcarpetcleanDatamrug"); localStorage.removeItem("lrugpieceprice"); localStorage.removeItem("totalcarpetcleanDatalrug"); localStorage.removeItem("datedesccarpetcleanData"); }else if(action=="carpClean"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("datedesccarpcleanData"); localStorage.removeItem("carphoursprice"); localStorage.removeItem("totalcarpcleanData"); }else if(action=="plumbClean"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("datedescplumbcleanData"); localStorage.removeItem("plumbhoursprice"); localStorage.removeItem("totalplumbcleanData"); }else if(action=="electClean"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("datedescelectcleanData"); localStorage.removeItem("electhoursprice"); localStorage.removeItem("totalelectcleanData"); }else if(action=="handClean"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/ordercompletion"; localStorage.removeItem("datedeschandcleanData"); localStorage.removeItem("handhoursprice"); localStorage.removeItem("totalhandcleanData"); }else if(action=="addreview_indus"||action=="addreview_indus_quotes"){ uk_msg_sucess(data.msg); //window.location.href = window.location.origin+"/store/chkout_homecleaning2"; window.location.href = window.location.origin+"/store/mybookings"; }else{ uk_msg_sucess(data.msg); } if(action=="ItemBankDepositVerification"){ $(".box-grey").html( "<p class=\"bg-success\">"+data.msg+"</p>" ); return; } if ( action=="forgotPassword"){ if (data.details.verification_type=="sms"){ setTimeout(function () { window.location.href= data.details.url; }, 2501); return; } $(".section-forgotpass").hide(); $("#username-email").val(''); return; } if ( action=="clientRegistration"){ if ( $("#verification").exists() ){ window.location.href=sites_url+"/verification/?checkout=true&id="+data.details; return; } if ( $("#theme_enabled_email_verification").exists() ){ window.location.href=sites_url+"/emailverification/?checkout=true&id="+data.details; return; } } if ( action=="addAddressBook" || action=="addAddressBookLocation"){ if (typeof data.details === "undefined" || data.details==null ) { } else { window.location.replace( data.details ); } } if ( $("#redirect").length>=1 ){ if (typeof data.details === "undefined" || data.details==null ) { window.location.replace( $("#redirect").val() ); } else { window.location.replace( $("#redirect").val()+"/?id="+data.details ); } } if( action=="verifyMobileCode" || action=="verifyEmailCode"){ if ( $("#redirect").exists() ){ window.location.href=$("#redirect").val(); return; } window.location.href=home_url; return; } if ( action=="clientLogin"){ if (typeof data.details.redirect === "undefined" || data.details.redirect==null || data.details.redirect=="" ) { if ( $("#single_page").exists() ){ window.location.href=sites_url+"/"; return; } } else { window.location.href = data.details.redirect; } } if ( action=="subscribeNewsletter"){ $("#subscriber_email").val(""); } if ( action=="bookATable" || action=="bankDepositVerification" ){ clear_elements('frm-book'); } if (action=="bankDepositVerification"){ clear_elements('forms'); } if ( action=="addToCart" ){ if ( $(".back-mobile").exists() ){ dump('back-mobile'); var back_url=$(".back-mobile").attr("href"); dump(back_url); window.location.href=back_url; return; } close_fb(); load_item_cart(); } if ( action=="addCreditCard"){ load_cc_list(); } if ( action=="addCreditCardMerchant"){ load_cc_list_merchant(); } if ( action == "placeOrder" ){ console.debug(data.details.payment_type); showPreloader(1); switch (data.details.payment_type) { case "pyp": case "paypal": window.location.href = sites_url+"/paypalinit/?id="+data.details.order_id ; break; case "stp": case "stripe": window.location.href = sites_url+"/stripeinit/?id="+data.details.order_id; break; case "mcd": //case "mercadopago": window.location.href = sites_url+"/mercadoinit/?id="+data.details.order_id; break; case "pyl": window.location.href = sites_url+"/paylineinit/?id="+data.details.order_id; break; case "ide": window.location.href = sites_url+"/sisowinit/?id="+data.details.order_id; break; case "payu": window.location.href = sites_url+"/payuinit/?id="+data.details.order_id; break; case "pys": window.location.href = sites_url+"/payserainit/?id="+data.details.order_id; break; case "bcy": window.location.href = sites_url+"/bcyinit/?id="+data.details.order_id; break; case "epy": window.location.href = sites_url+"/epyinit/?id="+data.details.order_id; break; case "atz": window.location.replace(sites_url+"/atzinit/?id="+data.details.order_id); break; case "btr": window.location.href = sites_url+"/btrinit/?id="+data.details.order_id; break; case "mol": window.location.href = sites_url+"/mollieinit/?id="+data.details.order_id; break; case "ip8": window.location.href = sites_url+"/ip8init/?id="+data.details.order_id; break; case "mri": window.location.href = sites_url+"/monerisinit/?id="+data.details.order_id; break; case "cod": case "ocr": case "obd": case "pyr": window.location.replace(sites_url+"/receipt/?id="+data.details.order_id); break; default: window.location.href = data.details.payment_link; break; } } if ( action=="clientLoginModal"){ load_top_menu(); close_fb(); } if ( action=="clientRegistrationModal"){ if ( $("#verification").exists() ){ window.location.href=sites_url+"/verification/?id="+data.details; return; } if ($("#theme_enabled_email_verification").exists()){ window.location.href=home_url+"/emailverification/?id="+data.details; return; } if ( $("#single_page").exists() ){ window.location.href=sites_url; } else { load_top_menu(); close_fb(); } } if ( action=="addReviews"){ //uk_msg_sucess(data.msg); load_reviews(); //load_ratings(); //$(".write-review").addClass("active"); $(".review-input-wrap").slideToggle("fast"); $("#review_content").val(''); $('.raty-stars').raty({ score:0, readOnly: false, path: sites_url+'/assets/vendor/raty/images', click: function (score, evt) { $("#initial_review_rating").val(score); } }); return; } if ( action=="updateReview"){ load_reviews(); close_fb(); } if ( action=="paypalCheckoutPayment"){ showPreloader(1); window.location.replace(sites_url+"/receipt/?id="+data.details.order_id); } /*merchant signup*/ if (action=="merchantSignUp"){ showPreloader(1); window.location.href = sites_url+"/merchantsignup/?Do=step3&token="+data.details; } if ( action=="merchantSignUp2"){ showPreloader(1); window.location.href = sites_url+"/merchantsignup/?Do=thankyou2&token="+data.details; } if ( action=="merchantPayment"){ if ($("#renew").val()==1 && $("#payment_opt:checked").val() =="ocr" ){ window.location.href = sites_url+"/renewsuccesful"; } else { switch ( $("#payment_opt:checked").val() ) { case "pyp": case "stp": case "mcd": case "pyl": case "ide": case "payu": case "obd": case "pys": case "bcy": case "epy": case "atz": case "btr": case "mol": case "mri": case "rzr": case "vog": case "ipay": case "pipay": case "jampie": case "wing": case "paymill": case "strip_ideal": case "ipay_africa": case "dixipay": case "payulatam": case "paypal_v2": case "mercadopago": case "mollie": window.location.href=data.details; showPreloader(true); break; default: window.location.href=sites_url+"/merchantsignup?Do=step4&token="+data.details; break; } } } if ( action=="merchantPaymentPaypal"){ if ($("#renew").val()==1){ window.location.replace(sites_url+"/renewsuccesful"); } else { if ( $("#merchant_email_verification").val()=="yes" ){ window.location.replace(sites_url+"/merchantsignup/?Do=thankyou2&token="+data.details); } else { window.location.replace(sites_url+"/merchantsignup/?Do=step4&token="+data.details); } } } if (action=="activationMerchant"){ window.location.replace(sites_url+"/merchantsignup/?Do=thankyou1&token="+data.details); } if ( action=="changePassword"){ $(".change-pass-btn").attr("disabled",true); $(".change-pass-btn").css({"opacity":"0.5"}); } if ( action=="merchantResumeSignup"){ window.location.replace(data.details); return; } if (action=="setAddress"){ //console.debug("setAddress"); window.location.reload(); return; } if ( action=="InitPlaceOrder"){ showPreloader(1); window.location.href=data.details; } if ( action=="addReviewToOrder"){ $(".review_wrap").html( '<p class="text-success">'+data.msg+'<p>' ); } if(action=="driverSignup"){ window.location.href=data.details; } } else if ( data.code==3 ) { if ( action=="clientLogin"){ window.location.href=sites_url+"/verification/?id="+data.details; } else { uk_msg(data.msg); } } else if ( data.code==4 ) { if ( action=="clientLogin"){ window.location.href=sites_url+"/emailverification/?id="+data.details; } else { uk_msg(data.msg); //alert("error"); } } else { switch(action){ case "placeOrder": case "InitPlaceOrder": $(".place_order").css({ 'pointer-events' : 'auto' }); break; } if (typeof captcha_site_key === "undefined" || captcha_site_key==null || captcha_site_key=="" ) { } else { recaptchav3(); } if(action=="clientLogin"){ $('#show_login_msg').html(data.msg); $('#show_login_msg').show(); setTimeout(function() { $('#show_login_msg').fadeOut('fast'); }, 5000); // <-- time in milliseconds }else if(action=="forgotPassword"){ $('#show_forgot_msg_error').html(data.msg); $('#show_forgot_msg_error').show(); setTimeout(function() { $('#show_forgot_msg_error').fadeOut('fast'); }, 5000); }else{ uk_msg(data.msg); } //alert("error"); } }, // failed error: function(){ btn.attr("disabled", false ); btn.val(btn_cap); busy(false); //$("#"+form_id).before("<p class=\"uk-alert uk-alert-danger\">ERROR:</p>"); /*$("#"+form_id).before("<p class=\"uk-alert uk-alert-danger\">ERROR</p>"); setTimeout(function () { $(".uk-alert-danger").fadeOut(); }, 4000); scroll_class('uk-alert');*/ $(".place_order").css({ 'pointer-events' : 'auto' }); uk_msg("ERROR"); } }); } var otable; jQuery(document).ready(function() { // alert("here"); if( $('.chosen').is(':visible') ) { //$(".chosen").chosen(); $(".chosen").chosen({ allow_single_deselect:true, no_results_text: js_lang.trans_33, placeholder_text_single: js_lang.trans_32, placeholder_text_multiple: js_lang.trans_32 }); } if ( $(".icheck").exists() ) { $('.icheck').iCheck({ checkboxClass: 'icheckbox_minimal', radioClass: 'iradio_flat' }); } if( $('#bar-rating').is(':visible') ) { $('#bar-rating').barrating('show', { initialRating: $("#initial_rating").val(), showValues:false, showSelectedRating:true, onSelect:function(value, text) { if( $('#review_content').is(':visible') ) { $("#initial_review_rating").val(value) } else { $("#initial_review_rating").val(value) //add_rating(value, $("#merchant_id").val() ); } } }); var x=1; $( ".br-widget a" ).each(function( index ) { $(this).addClass("level-"+x++); }); } $( document ).on( "click", ".avatar-view", function() { document.getElementById('single_uploadfile').click(); }); $( document ).on( "click", "#star5", function() { alert("here"); }); $( document ).on( "click", ".menu-category", function() { var i=$(this).find("i"); if (i.hasClass("fa-chevron-up")){ i.removeClass("fa-chevron-up"); i.addClass("fa-chevron-down"); } else { i.addClass("fa-chevron-up"); i.removeClass("fa-chevron-down"); } var parent=$(this).parent(); var ul=parent.find("ul"); ul.slideToggle("fast"); }); $( document ).on( "click", ".menu-item", function() { /*if ( !$(".order-list-wrap").exists()){ return; } */ /** check if the item is available*/ if ( $(this).hasClass("item_not_available")){ uk_msg(js_lang.trans_51); return; } if ( $("#merchant_close_store").exists() ){ if ( $("#merchant_close_store").val()=="yes"){ var close_msg=$("#merchant_close_msg").val(); uk_msg(close_msg); return; } } /** auto add item if food is single */ var id=$(this).attr("rel"); var single=$(this).data("single"); if ( single==2){ if ( $("#website_disbaled_auto_cart").val()!="yes"){ if ( $("#disabled_website_ordering").val()=="yes"){ return; } $item_size_token = ''; if ((typeof $(this).data("item_size_token") !== "undefined") && ( $(this).data("item_size_token") !== null)) { $item_size_token = $(this).data("item_size_token"); } single_food_item_add(id, $(this).data("price"), $(this).data("size") , $(this).data("category_id"), $(this).data("size_id") , $(this).data("discount"), $item_size_token ); return; } } /*mobile issue*/ if ( $(this).hasClass("mbile")){ var mbile_url=sites_url+"/item/?item_id="+id+"&mtid="+ $("#merchant_id").val(); mbile_url+= "&slug="+$("#restaurant_slug").val(); mbile_url+= "&category_id="+ $(this).data("category_id"); window.location.href=mbile_url; return; } var params="action=viewFoodItem¤tController=store&item_id="+id+"&tbl=viewFoodItem"; params+="&category_id=" + $(this).data("category_id"); open_fancy_box(params); }); $( document ).on( "click", ".edit_item", function() { if ( $(".pts_amount").is(':visible') ){ uk_msg_sucess(js_lang.you_cannot_edit_order); return; } var id=$(this).attr("rel"); var row=$(this).data("row"); var params="action=viewFoodItem¤tController=store&item_id="+id+"&tbl=viewFoodItem&row="+row; open_fancy_box(params); }); /* $(".view-item-wrap").niceScroll( { cursorcolor:"#E57871", cursorwidth:"7px", autohidemode:"leave" }); $(".view-item-wrap").mouseover(function() { $(".view-item-wrap").getNiceScroll().resize(); });*/ //$('.numeric_only').keyup(function () { $( document ).on( "keyup", ".numeric_only", function() { this.value = this.value.replace(/[^0-9\.]/g,''); }); $( document ).on( "click", ".special-instruction", function() { $(".notes-wrap").slideToggle("fast"); }); $( document ).on( "click", ".qty-plus", function() { qty=parseFloat( $("#qty").val())+1; ////console.debug(qty); if (isNaN(qty)){ qty=1; } $("#qty").val( qty ); }); $( document ).on( "click", ".qty-minus", function() { var qty=$("#qty").val()-1; if (qty<=0){ qty=1; } $("#qty").val( qty ); }); $( document ).on( "click", ".qty-addon-plus", function() { var parent=$(this).parent().parent(); var child=parent.find(".addon_qty"); var qty=parseFloat(child.val())+1; if (isNaN(qty)){ qty=1; } dump("qty=>"+qty); child.val( qty ); }); $( document ).on( "click", ".qty-addon-minus", function() { var parent=$(this).parent().parent(); var child=parent.find(".addon_qty"); var qty=parseFloat(child.val())-1; if (qty<=0){ qty=1; } child.val( qty ); }); $( document ).on( "click", ".sub_item_name", function() { var addon_type=$(this).attr("rel"); if ( addon_type=="multiple"){ var parent=$(this).parent().parent(); var child=parent.find(".quantity-wrap-small"); if ($(this).is(":checked")){ child.show(); } else { child.hide(); } } if ( addon_type=="custom"){ var data_id=$(this).data("id"); var data_option=$(this).data("option"); var total_multi_selected=$(".sub_item_name_"+data_id+":checked").length; if ( data_option == ""){ return; } if ( total_multi_selected > data_option ){ uk_msg(js_lang.trans_2+" "+" "+ data_option +" "+js_lang.trans_3); $(this).attr("checked",false); } } }); $( document ).on( "click", ".add_to_cart", function() { /*var cooking_ref=$("#cooking_ref:checked").length; if ( cooking_ref<=0){ uk_msg("Cooking ref is required"); return; } var ingredients=$("#ingredients:checked").length; if ( ingredients<=0){ uk_msg("Ingredients is required"); return; }*/ //var price=$("#price:checked").length; var price=$(".item_price:checked").length; console.debug(price); if (price<=0){ if ( !$("#two_flavors").exists()) { uk_msg(js_lang.trans_29); $("#price_wrap").focus(); return; } } /** two flavors */ if ( $("#two_flavors").exists()) { var sub_item=$(".sub_item:checked").length; dump(sub_item); if ( sub_item<2){ uk_msg(js_lang.trans_46); return; } } /** check if addon is required */ if ( $(".require_addon").exists()){ $(".req_addon_msg").remove(); var addon_err=''; $('.require_addon').each(function () { if ( $(this).val()==2 ) { var required_addon_id=$(this).data("id"); var required_addon_name=$(this).data("name"); dump(required_addon_id); /*remove sub item with no values*/ addon_type=$(".sub_item_name_"+required_addon_id).data("type"); dump("addon_type=>"+addon_type); dump(".sub_item_name_"+required_addon_id); if ( addon_type=="select"){ var required_addon_selected=$(".sub_item_name_"+required_addon_id+" :selected").val(); dump("=>"+required_addon_selected); if ( empty(required_addon_selected) || required_addon_selected=="0"){ addon_err=js_lang.trans_47+" - "+required_addon_name +"<br/>"; $(".require_addon_"+required_addon_id).after( "<p class=\"req_addon_msg text-danger text-small top10\">"+addon_err+"</p>").fadeIn("slow"); } } else { var required_addon_selected=$(".sub_item_name_"+required_addon_id+":checked").length; dump(required_addon_selected); if ( required_addon_selected <=0){ addon_err=js_lang.trans_47+" - "+required_addon_name +"<br/>"; $(".require_addon_"+required_addon_id).after( "<p class=\"req_addon_msg text-danger text-small top10\">"+addon_err+"</p>").fadeIn("slow"); } } } }); if ( addon_err!=""){ //uk_msg(addon_err); return; } } form_submit('frm-fooditem'); }); if( $('.item-order-wrap').is(':visible') ) { load_item_cart(); } $( document ).on( "click", ".delete_item", function() { if ( $(".pts_amount").is(':visible') ){ uk_msg_sucess(js_lang.you_cannot_edit_order); return; } var ans=confirm(js_lang.trans_4); if (ans){ var row=$(this).data("row"); delete_item(row); } }); $( document ).on( "click", ".edit_item", function() { var row=$(this).data("row"); ////console.debug(row); }); /************** CHECK OUT ***************/ $( document ).on( "click", ".checkout", function() { var subtotal= parseFloat($("#subtotal_order").val()); if ( $("#delivery_type").val()=="delivery"){ if ( $("#minimum_order").length>=1){ var minimum= parseFloat($("#minimum_order").val()); if (isNaN(subtotal)){ subtotal=0; } if (isNaN(minimum)){ minimum=0; } dump(minimum + "=>" + subtotal ) ; if ( minimum>subtotal){ uk_msg(js_lang.trans_5+" "+ $("#minimum_order_pretty").val()); return; } if ( $("#merchant_maximum_order").exists() ){ console.debug("max"); var merchant_maximum_order= parseFloat($("#merchant_maximum_order").val()); if ( subtotal>merchant_maximum_order){ uk_msg(js_lang.trans_31+" "+ $("#merchant_maximum_order_pretty").val()); return; } } } } if ( $("#delivery_type").val()=="pickup"){ if ( $("#merchant_minimum_order_pickup").exists()){ var minimum= parseFloat($("#merchant_minimum_order_pickup").val()); if (isNaN(subtotal)){ subtotal=0; } if (isNaN(minimum)){ minimum=0; } if ( minimum>subtotal){ uk_msg(js_lang.trans_5+" "+ $("#merchant_minimum_order_pickup_pretty").val()); return; } } if ( $("#merchant_maximum_order_pickup").exists() ){ var merchant_maximum_order= parseFloat($("#merchant_maximum_order_pickup").val()); if ( subtotal>merchant_maximum_order){ uk_msg(js_lang.trans_31+" "+ $("#merchant_maximum_order_pickup_pretty").val()); return; } } } switch ($("#delivery_type").val()) { case "delivery": if ( $("#is_ok_delivered").val()==2){ //if(!empty(distance_error)){ if ((typeof distance_error !== "undefined") && ( distance_error !== null)) { uk_msg(distance_error); } else { uk_msg(js_lang.trans_15+" "+$("#merchant_delivery_miles").val() + " "+$("#unit_distance").val()); } return; } if ( $("#delivery_date").val()==""){ uk_msg(js_lang.trans_43); $("#delivery_date").focus(); return; } if ( $("#merchant_required_delivery_time").exists()){ if ( $("#merchant_required_delivery_time").val()=="yes"){ if ( $("#delivery_time").val()==""){ var delivery_asap=$("#delivery_asap:checked").val(); dump(delivery_asap); if ( delivery_asap!=1){ uk_msg(js_lang.trans_44); $("#delivery_time").focus(); return; } } } } break; case "dinein": var dinein_suborder= parseFloat($("#subtotal_order").val()); dinein_minimum = parseFloat(dinein_minimum); dinein_max = parseFloat(dinein_max); if(dinein_minimum>0){ if ( dinein_minimum>dinein_suborder ){ uk_msg(js_lang.trans_5 + " "+ $("#minimum_order_dinein").val() ); return; } } if(dinein_max>0){ if ( dinein_max<dinein_suborder ){ uk_msg(js_lang.trans_31 + " "+ $("#maximum_order_dinein").val() ); return; } } if ( $("#delivery_date").val()==""){ uk_msg(js_lang.trans_42); $("#delivery_date").focus(); return; } if ( $("#delivery_time").val()==""){ uk_msg(js_lang.dinein_time_is_required); $("#delivery_time").focus(); return; } break; case "pickup": if ( $("#delivery_date").val()==""){ uk_msg(js_lang.trans_42); $("#delivery_date").focus(); return; } /*if ( $("#delivery_time").val()==""){ uk_msg(js_lang.trans_41); $("#delivery_time").focus(); return; } */ break; } var params="delivery_type="+$("#delivery_type").val()+"&delivery_date="+$("#delivery_date").val(); params+="&delivery_time="+$("#delivery_time").val(); params+="&delivery_asap="+$("#delivery_asap:checked").val(); params+="&merchant_id="+$("#merchant_id").val(); if (typeof merchant_opt_contact_delivery === "undefined" || merchant_opt_contact_delivery==null ) { // } else { params+="&opt_contact_delivery="+$("#opt_contact_delivery:checked").val(); } params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: "action=setDeliveryOptions¤tController=store&tbl=setDeliveryOptions&"+params, dataType: 'json', success: function(data){ busy(false); if (data.code==1) { window.location.href=sites_url+"/checkout/"; } else { uk_msg(data.msg); } }, error: function(){ busy(false); } }); }); $('#delivery_asap').on('ifChecked', function(event){ $("#delivery_time").val(''); }); $('.payment_opt').on('ifChecked', function(event){ $(".credit_card_wrap").slideToggle("fast"); }); $('.payment_opt').on('ifUnchecked', function(event){ $(".credit_card_wrap").slideToggle("fast"); }); $( document ).on( "click", ".cc-add", function() { $(".cc-add-wrap").slideToggle("fast"); }); if( $('.payment-option-page').is(':visible') ) { load_cc_list(); } if( $('.merchant-payment-option').is(':visible') ) { load_cc_list_merchant(); } /************ PLACE ORDER ***************/ $( document ).on( "click", ".place_order", function() { if ( $("#minimum_order").length>=1){ var minimum= parseFloat($("#minimum_order").val()); var subtotal= parseFloat($("#subtotal_order").val()); if (isNaN(subtotal)){ subtotal=0; } if (isNaN(minimum)){ minimum=0; } if ( minimum>subtotal){ uk_msg(js_lang.trans_5+" "+ $("#minimum_order_pretty").val()); return; } } if ( $("#maximum_order").exists() ){ var subtotal= parseFloat($("#subtotal_order").val()); var maximum_order = parseFloat($("#maximum_order").val()); if(!empty(subtotal)){ if ( maximum_order<subtotal){ uk_msg(js_lang.trans_31+" "+ $("#maximum_order_pretty").val()); return; } } } /** if checkout is guest type */ if ( $("#is_guest_checkout").exists() ){ if ( $("#map_address_toogle").exists()){ if ( $("#map_address_toogle").val()==2 ){ $("#street").removeAttr("data-validation"); $("#city").removeAttr("data-validation"); $("#state").removeAttr("data-validation"); } } } var payment_type=$(".payment_option:checked").val(); if ( $(".payment_option:checked").length<=0 ){ uk_msg(js_lang.trans_6); return; } if ( $("#contact_phone").exists() ){ var p = $("#contact_phone").val(); if ( p.length <=6){ uk_msg(js_lang.trans_7); $("#contact_phone").focus(); return; } } if ( payment_type =="ccr" || payment_type =="ocr"){ if ( $(".cc_id:checked").length<=0 ){ //uk_msg(js_lang.trans_8); // return; } } if ( payment_type=="pyr"){ var selected_payment_provider_name=$("#payment_provider_name:checked").length; if ( selected_payment_provider_name<=0){ // uk_msg(js_lang.trans_40); // return; } } /** check if client move the marker */ if ( $("#map_address_toogle").exists()){ if ( $("#map_address_toogle").val()==2 ){ if ( $("#map_address_lat").val()==""){ uk_msg(js_lang.trans_48); return; } } } if ( $(".capcha-wrapper").exists() ){ var google_resp = $(".capcha-wrapper").find(".g-recaptcha-response").val(); dump(google_resp); if (!google_resp) { uk_msg(js_lang.trans_52); return; } } /*check if merchant sms oder verification is required*/ if ( $("#order_sms_code").exists()){ if ( $("#order_sms_code").val()=="" ){ uk_msg(js_lang.trans_53); $("#order_sms_code").focus(); return; } else { $("#client_order_sms_code").val( $("#order_sms_code").val() ); $("#client_order_session").val( $(".send-order-sms-code").data("session")); } } /*CHECK IF MAP SELECTION IS REQUIRED*/ if (typeof transaction_type === "undefined" || transaction_type==null || transaction_type=="" || transaction_type=="null" || transaction_type=="undefined" ) { } else { if(transaction_type=="delivery"){ if(enabled_map_selection_delivery==1){ if ( $("#map_accurate_address_lat").val()=="" ){ uk_msg(js_lang.select_from_map); return; } } } } /*APPEND SUB TOTAL TO THE FORM*/ $("#frm-delivery").append( '<input type="hidden" name="x_subtotal" value="'+ $("#subtotal_order2").val() +'" >' ); $("#frm-delivery").submit(); //$(".place_order").css({ 'pointer-events' : 'none' }); //form_submit('frm-delivery'); }); /*ANIMATE*/ /* $('.animated').appear(function(){ var element = $(this); var animation = element.data('animation'); var animationDelay = element.data('delay'); if (animationDelay) { setTimeout(function(){ element.addClass( animation + " visible" ); element.removeClass('hiding'); if (element.hasClass('counter')) { } }, animationDelay); }else { element.addClass( animation + " visible" ); element.removeClass('hiding'); if (element.hasClass('counter')) { } } },{accY: -1});*/ /*LOOP THRU STEPS*/ $( ".order-steps li" ).each(function( index ) { var current=$(this); var link= current.find("a"); if ( current.hasClass("active") ){ } else { link.attr("href","javascript:;") link.addClass("inactive"); } }); $('.filter_by').on('ifChecked', function(event){ dump('d2'); research_merchant(); }); $('.filter_by').on('ifUnchecked', function(event){ dump('d3'); research_merchant(); }); $('.filter_by_radio').on('ifChecked', function(event){ $(".filter_minimum_clear").show(); research_merchant(); }); $( document ).on( "click", ".button_filter", function() { $(".frm_search_name_clear").show(); research_merchant(); }); $( document ).on( "change", ".sort-results", function() { var sort_filter=$(this).val(); if (!empty(sort_filter)){ dump(sort_filter); $("#sort_filter").val(sort_filter); research_merchant(); } }); $( document ).on( "change", ".citychange", function() { var params="action=indus_city¤tController=store&selected_city="+$(".citychange").val(); params+= addValidationRequest(); var baseURL = window.location.origin; // Define the link you want to open relative to the base URL // Combine base URL and link var link = "?city=Dubai"; // Open the link in a new tab if($(".citychange").val()=='1'){ link = "?city=Dubai"; }else{ link = "?city=Abu Dhabi"; } var fullURL = baseURL + link; window.open(fullURL, "_self"); // busy(true); // $.ajax({ // type: "POST", // url: ajax_url, // data: params, // dataType: 'json', // success: function(data){ // busy(false); // if (data.code==1){ // window.location.reload(); // } else { // } // }, // error: function(){ // busy(false); // } // }); }); $( document ).on( "click", ".login-link", function() { $(".section1").hide(); $(".section2").fadeIn(); }); $( document ).on( "click", ".signup-link", function() { $(".section3").fadeIn(); $(".section2").hide(); $(".section1").hide(); }); $( document ).on( "click", ".back-link", function() { $(".section1").fadeIn(); $(".section2").hide(); $(".section3").hide(); $(".section-forgotpass").hide(); }); $( document ).on( "click", ".fc-close", function() { close_fb(); }); $( document ).on( "click", ".remove-rating", function() { var params="action=removeRating¤tController=store&merchant_id="+$("#merchant_id").val(); params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); if (data.code==1){ load_ratings(); $('#bar-rating').barrating('clear'); $(".br-widget a").removeClass("br-selected"); $(".rating_handle").addClass("hide"); } else { uk_msg(data.msg); } }, error: function(){ busy(false); } }); }); $( document ).on( "click", ".write-review", function() { if ( $(this).hasClass("active") ){ ////console.debug('d2'); $(".review-content-wrap").slideToggle("fast"); } else { $(".review-content-wrap").slideToggle("fast"); } }); /*if ( $(".merchant-review-wrap").exists() ){ load_reviews(); }*/ $( document ).on( "click", ".map-li", function() { var locations; if ( $("#google_map_wrap").text()=="" ){ if (typeof $("#merchant_map_latitude").val() === "undefined" || $("#merchant_map_latitude").val()==null || $("#merchant_map_latitude").val()=="" ) { $("#google_map_wrap").html("<p class=\"uk-text-muted\">"+js_lang.trans_9+"</p>"); return; } locations=[[$("#map_title").val(),$("#merchant_map_latitude").val(),$("#merchant_map_longtitude").val(),16]]; initializeMarker(locations); } }); $( document ).on( "click", ".uk-tab-responsive a", function() { var locations; if ( $("#google_map_wrap").text()=="" ){ if (typeof $("#merchant_map_latitude").val() === "undefined" || $("#merchant_map_latitude").val()==null || $("#merchant_map_latitude").val()=="" ) { $("#google_map_wrap").html("<p class=\"uk-text-muted\">"+js_lang.trans_9+"</p>"); return; } locations=[[$("#map_title").val(),$("#merchant_map_latitude").val(),$("#merchant_map_longtitude").val(),16]]; initializeMarker(locations); } }); $( document ).on( "click", ".top_sigin", function() { var params="action=loginModal&tbl=loginModal&do-action=sigin¤tController=store"; open_fancy_box(params); }); $( document ).on( "click", ".top_signup", function() { var params="action=loginModal&tbl=loginModal&do-action=sigin¤tController=store"; open_fancy_box(params); }); $( document ).on( "click", ".edit-review", function() { var id=$(this).data("id"); var params="action=editReview¤tController=store&tbl=editReview&id="+id+"&web_session_id="+$("#web_session_id").val(); open_fancy_box(params); }); $( document ).on( "click", ".delete-review", function() { var id=$(this).data("id"); var q=confirm(js_lang.trans_10); if (q){ delete_review(id); } }); $( document ).on( "click", ".print-receipt", function() { $('#receipt-content').printElement(); }); $( document ).on( "click", ".view-receipt", function() { var params="action=viewReceipt¤tController=store&tbl=viewReceipt&id="+ $(this).data("id"); open_fancy_box(params); }); $( document ).on( "click", ".add-to-cart", function() { var id=$(this).data("id"); var a=confirm(js_lang.trans_11); if (a){ add_to_order(id); } }); $( document ).on( "click", ".search-box-wrap a", function() { if ( $(this).hasClass("filter_minimum_clear") ){ return; } if ( $(this).hasClass("frm_search_name_clear") ){ return; } var i=$(this).find(".fa"); if ( i.hasClass("fa-caret-up") ){ i.removeClass("fa-caret-up"); i.addClass("fa-caret-down"); } else { i.removeClass("fa-caret-down"); i.addClass("fa-caret-up"); } var parent=$(this).parent(); var child=parent.find(".uk-list"); child.slideToggle("fast"); }); $( document ).on( "click", ".next_step_free_payment", function() { next_step_free_payment($(this).data("token")); }); $( document ).on( "click", ".row_del", function() { var ans=confirm(js_lang.deleteWarning); if (ans){ row_delete( $(this).attr("rev"),$("#tbl").val(), $(this)); } }); $( document ).on( "click", ".filter_minimum_clear", function() { $(".filter_minimum").attr("checked",false); $('.filter_minimum').iCheck('update'); $(this).hide(); research_merchant(); }); $( document ).on( "click", ".frm_search_name_clear", function() { $(".filter_name").val(''); $(this).hide(); research_merchant(); }); /*contact map*/ if ( $("#map_latitude").length>=1 ){ if (typeof $("#map_latitude").val() === "undefined" || $("#map_longitude").val()==null ) { $("#google_map_wrap").html("<p class=\"uk-text-muted\">Map not available</p>"); return; } locations=[[$("#map_title").val(),$("#map_latitude").val(),$("#map_longitude").val(),16]]; initializeMarker(locations); } $( document ).on( "click", ".fb-link-login", function() { ////console.debug('d2'); checkLoginState(); }); $( document ).on( "click", ".forgot-pass-link", function() { $(".section-forgotpass").fadeIn(); $(".section3").hide(); $(".section2").hide(); $(".section1").hide(); }); next_bg(); $( document ).on( "click", ".resume-app-link", function() { $(".frm-resume-signup").slideToggle("fast"); }); $( document ).on( "click", ".resend-activation-code", function() { resend_activation_code( $("#token").val() ); }); if ( $("#merchant_header").length>=1 ){ var merchant_header=upload_url+"/"+$("#merchant_header").val(); //console.debug(merchant_header); $('#menu-with-bg').css('background-image', 'url(' + merchant_header + ')'); } $( document ).on( "click", ".apply_voucher", function() { if ( $("#voucher_code").val()!="" ){ apply_voucher(); } else { uk_msg(js_lang.trans_22); } }); if( $('#restaurant-mini-list').is(':visible') ) { var t=$("#tab-left-content li:first-child").find(".links"); //geocode_address(t.data("id")); var lat=t.data("lat"); var lng=t.data("long"); if (isNaN(lat) && isNaN(lng)){ geocode_address(t.data("id")); } else { //locations=[['test',lat,lng,18]]; locations=[['',lat,lng,18]]; geocode_address2(locations); } } $( document ).on( "click", ".view-map", function() { var lat=$(this).data("lat"); var lng=$(this).data("long"); if (isNaN(lat) && isNaN(lng)){ geocode_address($(this).data("id")); } else { var merchantname=$(this).data("merchantname"); locations=[[merchantname,lat,lng,18]]; geocode_address2(locations); } }); }); /*END DOCU*/ /*function table2() { var params=$("#frm_table_list2").serialize(); if(!empty(current_panel)){ params+="¤t_panel="+current_panel; } params+= addValidationRequest(); epp_table2 = $('#table_list2').dataTable({ "bProcessing": true, "bServerSide": true, "sAjaxSource": ajax_url+"?"+params, "aaSorting": [[ 0, "desc" ]], "oLanguage":{ "sProcessing": "<p>Processing.. <i class=\"fa fa-spinner fa-spin\"></i></p>" }, "oLanguage": { "sEmptyTable": js_lang.tablet_1, "sInfo": js_lang.tablet_2, "sInfoEmpty": js_lang.tablet_3, "sInfoFiltered": js_lang.tablet_4, "sInfoPostFix": "", "sInfoThousands": ",", "sLengthMenu": js_lang.tablet_5, "sLoadingRecords": js_lang.tablet_6, "sProcessing": js_lang.tablet_7, "sSearch": js_lang.tablet_8, "sZeroRecords": js_lang.tablet_9, "oPaginate": { "sFirst": js_lang.tablet_10, "sLast": js_lang.tablet_11, "sNext": js_lang.tablet_12, "sPrevious": js_lang.tablet_13 }, "oAria": { "sSortAscending": js_lang.tablet_14, "sSortDescending": js_lang.tablet_15 } } }); }*/ function table_reload() { epp_table.fnReloadAjax(); epp_table2.fnReloadAjax(); } function table_reload_with_params(new_params) { var params=$("#frm_table_list").serialize(); epp_table.fnReloadAjax( ajax_url+"?"+params+new_params ); epp_table2.fnReloadAjax( ajax_url+"?"+params+new_params ); } function research_merchant() { var filter_delivery_type=''; var filter_cuisine=''; var filter_promo=''; var filter_minimum=''; var filter_name=''; /*$('input:checkbox.filter_delivery_type').each(function () { var sThisVal = (this.checked ? $(this).val() : ""); if ( sThisVal !=""){ filter_delivery_type+=sThisVal+","; } });*/ filter_delivery_type = $(".filter_delivery_type:checked").val(); $('input:checkbox.filter_cuisine').each(function () { var sThisVal = (this.checked ? $(this).val() : ""); if ( sThisVal !=""){ filter_cuisine+=sThisVal+","; } }); $('input:checkbox.filter_promo').each(function () { var sThisVal = (this.checked ? $(this).val() : ""); if ( sThisVal !=""){ filter_promo+=sThisVal+","; } }); filter_minimum=$(".filter_minimum:checked").val(); filter_name=$("#filter_name").val(); if (typeof filter_name === "undefined" || filter_name==null ) { filter_name=''; } var new_params=''; if (!empty(filter_delivery_type)){ new_params+="&filter_delivery_type="+filter_delivery_type; } if (!empty(filter_cuisine)){ new_params+="&filter_cuisine="+filter_cuisine; } if (!empty(filter_promo)){ new_params+="&filter_promo="+filter_promo; } if (!empty(filter_minimum)){ new_params+="&filter_minimum="+filter_minimum; } if (!empty(filter_name)){ new_params+="&filter_name="+filter_name; } sort_filter=$("#sort_filter").val(); if (!empty(sort_filter)){ new_params+="&sort_filter="+sort_filter; } if (!empty( $("#display_type").val() )){ new_params+="&display_type="+$("#display_type").val(); } if (!empty( $("#restaurant_name").val() )){ new_params+="&restaurant_name="+$("#restaurant_name").val(); } dump(new_params); window.location.href= $("#current_page_url").val() + new_params ; return false; } function open_fancy_box(params) { dump(params); params+= addValidationRequest(); var URL=ajax_url+"/?"+params; $.fancybox({ maxWidth:800, closeBtn : false, autoSize : true, padding :0, margin :2, modal:false, type : 'ajax', href : URL, openEffect :'elastic', closeEffect :'elastic', /*helpers: { overlay: { locked: false } }*/ }); } function open_fancy_box2(params) { params+= addValidationRequest(); var URL=ajax_url+"/?"+params; $.fancybox({ maxWidth:800, closeBtn : false, autoSize : true, padding :0, margin :2, modal:true, type : 'ajax', href : URL, openEffect :'elastic', closeEffect :'elastic' }); } function close_fb() { $.fancybox.close(); } function uk_msg(msg) { var n = noty({ text: msg, type : "warning" , theme : 'relax', layout : 'topCenter', timeout:3500, animation: { open: 'animated fadeInDown', // Animate.css class names close: 'animated fadeOut', // Animate.css class names } }); } function uk_msg_sucess(msg) { var n = noty({ text: msg, type : "success" , theme : 'relax', layout : 'topCenter', timeout:2500, animation: { open: 'animated fadeInDown', // Animate.css class names close: 'animated fadeOut', // Animate.css class names } }); } function load_item_cart() { var params="action=loadItemCart¤tController=store&merchant_id="+$("#merchant_id").val(); params+="&delivery_type="+$("#delivery_type").val(); if ( $("#cart_tip_percentage").exists() ){ params+="&cart_tip_percentage=" + $("#cart_tip_percentage").val(); } params+="¤t_page="+ current_page; params+="&card_fee="+ card_fee; if ((typeof card_percentage !== "undefined") && ( card_percentage !== null)) { params+="&card_percentage="+ card_percentage; } params+= addValidationRequest(); if (typeof merchant_opt_contact_delivery === "undefined" || merchant_opt_contact_delivery==null ) { // } else { $transaction_type = $("#delivery_type").val(); if($transaction_type=="delivery"){ $(".opt_contact_delivery_wrap").show(); } else { $(".opt_contact_delivery_wrap").hide(); } } busy(true); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); if( $('.cart-mobile-handle').is(':visible') ) { showMobileCartNos(); } if (data.code==1){ $(".item-order-wrap").html(data.details.html); $(".checkout").attr("disabled",false); $(".checkout").css({ 'pointer-events' : 'auto' }); //$(".checkout").addClass("uk-button-success"); $(".checkout").removeClass("disabled-button"); $(".voucher_wrap").show(); clearCartButton(1); $(function () { $('[data-toggle="tooltip"]').tooltip() }); } else { $(".item-order-wrap").html('<div class="center">'+data.msg+'</div>'); $(".checkout").attr("disabled",true); $(".checkout").css({ 'pointer-events' : 'none' }); //$(".checkout").removeClass("uk-button-success"); $(".checkout").addClass("disabled-button"); $(".voucher_wrap").hide(); clearCartButton(2); } }, error: function(){ busy(false); } }); } function delete_item(row) { var params="action=deleteItem&row="+row; params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); if (data.code==1){ load_item_cart(); } }, error: function(){ busy(false); } }); } function load_cc_list() { var htm=''; var params="action=loadCreditCardList¤tController=store"; params+="&is_guest_checkout="+$("#is_guest_checkout").val(); params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); if (data.code==1){ $.each(data.details, function( index, val ) { $(".uk-list-cc tr").remove(); /*htm+='<li>'; htm+='<div class="uk-grid">'; htm+='<div class="uk-width-1-2">'+val.credit_card_number+'</div>'; htm+='<div class="uk-width-1-2"> <input type="radio" name="cc_id" class="cc_id" value="'+val.cc_id+'"></div>'; htm+='</div>'; htm+='</li>';*/ htm+='<tr>'; htm+='<td>'+val.credit_card_number+'</td>'; htm+='<td><input type="radio" name="cc_id" class="cc_id" value="'+val.cc_id+'"></td>'; htm+='</tr>'; }); $(".uk-list-cc").append(htm); $(".cc-add-wrap").hide(); } }, error: function(){ busy(false); } }); } function load_cc_list_merchant() { var htm=''; var params="action=loadCreditCardListMerchant¤tController=store"; params+="&merchant_id="+$("#merchant_id").val(); params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); if (data.code==1){ $.each(data.details, function( index, val ) { $(".uk-list-cc tr").remove(); /*$(".uk-list-cc li").remove(); htm+='<li>'; htm+='<div class="uk-grid">'; htm+='<div class="uk-width-1-2">'+val.credit_card_number+'</div>'; htm+='<div class="uk-width-1-2"> <input type="radio" name="cc_id" class="cc_id" value="'+val.mt_id+'"></div>'; htm+='</div>'; htm+='</li>';*/ htm+='<tr>'; htm+='<td>'+val.credit_card_number+'</td>'; htm+='<td><input type="radio" name="cc_id" class="cc_id" value="'+val.mt_id+'"></td>'; htm+='</tr>'; }); $(".uk-list-cc").append(htm); $(".cc-add-wrap").hide(); } }, error: function(){ busy(false); } }); } function add_rating(value,merchant_id) { var params="action=addRating¤tController=store&value="+value+"&merchant_id="+merchant_id; params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); if (data.code==1){ $(".rating_handle").removeClass("hide"); load_ratings(); close_fb(); } else if( data.code==3) { uk_msg(data.msg); } else { $('#bar-rating').barrating('clear'); var params="action=loginModal&tbl=loginModal¤tController=store&do-action=rating&rating="+value; open_fancy_box(params); } }, error: function(){ busy(false); } }); } function load_ratings() { var params="action=loadRatings¤tController=store&merchant_id="+$("#merchant_id").val(); params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); if (data.code==1){ $(".votes_counter").html(data.details.votes+" Votes"); $(".rate-wrap h6").html(data.details.ratings); } }, error: function(){ busy(false); } }); } function load_top_menu() { var params="action=loadTopMenu¤tController=store"; params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); if (data.code==1){ $(".section-to-menu-user").append(data.details); $(".top_signup").remove(); $(".top_sigin").remove(); } }, error: function(){ busy(false); } }); } function load_reviews() { var params="action=loadReviews¤tController=store&merchant_id="+$("#merchant_id").val(); params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); getRemainingReview(); if (data.code==1){ $(".merchant-review-wrap").html(data.details); initRating(); initReadMore(); } else { $(".merchant-review-wrap").html("<div class=\"uk-text-muted\">"+data.msg+"</div>"); } }, error: function(){ busy(false); } }); } function delete_review(id) { var params="action=deleteReview¤tController=store&id="+id+"&web_session_id="+$("#web_session_id").val(); params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); if (data.code==1){ load_reviews(); close_fb(); } else { uk_msg(data.msg); } }, error: function(){ busy(false); } }); } function add_to_order(order_id) { var params="action=addToOrder¤tController=store&order_id="+order_id; params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); if (data.code==1){ //window.location.replace(sites_url+"/menu/merchant/"+data.details.restaurant_slug); window.location.replace(sites_url+"/menu-"+data.details.restaurant_slug); } else { uk_msg(data.msg); } }, error: function(){ busy(false); } }); } function next_step_free_payment(token) { var params="action=merchantFreePayment¤tController=store&token="+token; params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); if ( $("#merchant_email_verification").val()=="yes" ){ window.location.replace(sites_url+"/merchantsignup/?Do=thankyou2&token="+token); } else { window.location.replace(sites_url+"/merchantsignup/?Do=step4&token="+token); } }, error: function(){ busy(false); } }); } function row_delete(id,tbl,object) { var form_id=$("form").attr("id"); rm_notices(); busy(true); var params="action=rowDelete&tbl="+tbl+"&row_id="+id+"&whereid="+$("#whereid").val(); params+= addValidationRequest(); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); if (data.code==1){ $("#"+form_id).before("<div class=\"uk-alert uk-alert-success\">"+data.msg+"</div>"); tr=object.closest("tr"); tr.fadeOut("slow"); } else { $("#"+form_id).before("<div class=\"uk-alert uk-alert-danger\">"+data.msg+"</div>"); } }, error: function(){ busy(false); $("#"+form_id).before("<div class=\"uk-alert uk-alert-danger\">"+js_lang.trans_14+"</div>"); } }); } /*============================================================= START GOOGLE MAP MARKER =============================================================*/ function initializeMarker(locations){ window.map = new google.maps.Map(document.getElementById('google_map_wrap'), { mapTypeId: google.maps.MapTypeId.ROADMAP, scrollwheel: false //styles: [ {stylers: [ { "saturation":-100 }, { "lightness": 0 }, { "gamma": 0.5 }]}] }); var infowindow = new google.maps.InfoWindow(); var bounds = new google.maps.LatLngBounds(); for (i = 0; i < locations.length; i++) { if ( $("#map_marker").exists() ){ var image=upload_url+"/"+$("#map_marker").val(); marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), map: map , icon:image }); } else { marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), map: map }); } bounds.extend(marker.position); google.maps.event.addListener(marker, 'click', (function (marker, i) { return function () { infowindow.setContent(locations[i][0]); infowindow.open(map, marker); } })(marker, i)); } map.fitBounds(bounds); var listener = google.maps.event.addListener(map, "idle", function () { map.setZoom(16); google.maps.event.removeListener(listener); }); } function initializeMarkerNew(locations,divname,zoom_value){ window.map = new google.maps.Map(document.getElementById(divname), { mapTypeId: google.maps.MapTypeId.ROADMAP, scrollwheel: false }); var contentString=[]; for (i = 0; i < locations.length; i++) { //dump(locations); contentString[i]='<div class="marker-info-wrap">'; contentString[i]+=locations[i][6]; contentString[i]+="<div>"+js_lang.trans_35+" : "+locations[i][0]+"</div>"; contentString[i]+="<div>"+js_lang.trans_36+" : "+locations[i][4]+"</div>"; contentString[i]+="<a href=\""+sites_url+"/menu/merchant/"+locations[i][5]+"\" >"+js_lang.trans_37+"</a>"; contentString[i]+="</div>"; var infowindow = new google.maps.InfoWindow({ content: contentString[i] }); var bounds = new google.maps.LatLngBounds(); var image=upload_url+"/"+$("#map_marker").val(); if ( $("#map_marker").exists() ){ marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), map: map, icon: image }); } else { marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), map: map }); } google.maps.event.addListener(marker, 'click', (function (marker, i) { return function () { infowindow.setContent(contentString[i]); infowindow.open(map,marker); } })(marker, i)); bounds.extend(marker.position); } dump("zoom=>"+zoom_value); if (typeof zoom_value === "undefined" || zoom_value==null ) { zoom_value=10; } dump("zoom=>"+zoom_value); map.fitBounds(bounds); var listener = google.maps.event.addListener(map, "idle", function () { map.setZoom(zoom_value); /** focus on the map location */ if ( focus_lat!=""){ dump("focus_lat->"+focus_lat); dump("focus_lng->"+focus_lng); var position = new google.maps.LatLng(focus_lat,focus_lng); map.setCenter(position); } google.maps.event.removeListener(listener); }); } /*============================================================= END GOOGLE MAP MARKER =============================================================*/ function fb_register(object) { var fb_params=''; $.each( object, function( key, value ) { fb_params+=key+"="+value+"&"; }); rm_notices(); busy(true); var params="action=FBRegister¤tController=store&"+fb_params+"&YII_CSRF_TOKEN="+$("#YII_CSRF_TOKEN").val(); params+= addValidationRequest(); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); if (data.code==1){ load_top_menu(); if(!empty(data.details)){ if (!empty(data.details.redirectverify)){ uk_msg_sucess(data.msg); if ($("#redirect").exists()){ window.location.href = data.details.redirectverify+"&checkout=true"; } else { window.location.href = data.details.redirectverify; } return; } } if ( $(".section-checkout").exists() ){ window.location.href = $("#redirect").val(); } if ( $("#single_page").exists() ){ if ((typeof data.details.redirect !== "undefined") && ( data.details.redirect !== null)) { window.location.href=data.details.redirect; } else { window.location.href=home_url; } } close_fb(); } else { uk_msg(data.msg); } }, error: function(){ busy(false); } }); } /*CHANGE BACKGROUND*/ //var handle_bg=setInterval(next_bg, 5000); var backgrounds = [ sites_url+"/assets/images/b-1.jpg", sites_url+"/assets/images/b-2.jpg", sites_url+"/assets/images/b-3.jpg", sites_url+"/assets/images/b-4.jpg", sites_url+"/assets/images/b-5.jpg", sites_url+"/assets/images/b-6.jpg", ]; function next_bg() { var numLow = 1; var numHigh = 6; var adjustedHigh = (parseFloat(numHigh) - parseFloat(numLow)) + 1; var numRand = Math.floor(Math.random()*adjustedHigh) + parseFloat(numLow); var bg_img=backgrounds[numRand]; ////console.debug(bg_img); if (typeof bg_img === "undefined" || bg_img==null ) { } else { $(".banner-wrap").addClass("bg-fadein"); $(".banner-wrap").css('background', 'url(' + bg_img + ')'); } } function resend_activation_code(token) { $(".resend-activation-code").css({ 'pointer-events' : 'none' }); var params="action=resendActivationCode¤tController=store&token="+token; params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ $(".resend-activation-code").css({ 'pointer-events' : 'auto' }); busy(false); if (data.code==1){ uk_msg_sucess(data.msg); } else { uk_msg(data.msg); } }, error: function(){ $(".resend-activation-code").css({ 'pointer-events' : 'auto' }); busy(false); } }); } function apply_voucher() { var action="applyVoucher"; if ( $(".apply_voucher").text()==js_lang.trans_23 ){ action="removeVoucher"; } if ( action=="removeVoucher"){ var a=confirm("Are you sure?"); if (!a){ return; } } var code = $("#voucher_code").val(); var params="action="+action+"¤tController=store&voucher_code="+code+"&merchant_id="+$("#merchant_id").val(); params+="&sub_total=" + $("#subtotal_order2").val(); params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); if (data.code==1){ //console.debug(action); load_item_cart(); if ( action=="removeVoucher"){ $(".apply_voucher").text(js_lang.trans_24); $("#voucher_code").show(); } else { $("#voucher_code").hide(); $(".apply_voucher").text(js_lang.trans_23); } /*if ( $(".tip_percentage").html()!="0%" ){ setTimeout( function(){ if($(".tips.active").data("type")=="tip"){ var tip=$(".tips.active").data("tip"); var tip_percentage = tip*100; var cart_subtotal=$("#subtotal_order2").val() var tip_raw = tip*cart_subtotal; dump(tip_raw.toFixed(2)); display_tip(tip_percentage,tip_raw.toFixed(2)); } else { } } , 1000); }*/ } else { uk_msg(data.msg); } }, error: function(){ busy(false); } }); } /*************************************** GET CURRENT LOCATION ***************************************/ jQuery(document).ready(function() { if ( $("#google_auto_address").val()=="yes" ){ } else { if (typeof map_provider === "undefined" || map_provider==null ) { // } else { if(map_provider=="google.maps"){ if ( $("#google_default_country").val()=="yes" ){ $("#s").geocomplete({ country: $("#admin_country_set").val() }); $("#street").geocomplete({ country: $("#admin_country_set").val() }); } else { $("#s").geocomplete(); $("#street").geocomplete(); } } } } if ( $("#origin").exists() ){ if(useMapbox()){ mapbox_autocomplete(); } else { $("#origin").geocomplete({ country: $("#admin_country_set").val() }); } } function success_geo(position) { if ( $("#s").val()!=""){ return; } /*console.debug(position.coords.latitude); console.debug(position.coords.longitude); */ //getAddress(position.coords.latitude,position.coords.longitude); var lat=position.coords.latitude; var lng=position.coords.longitude; var latlng = new google.maps.LatLng(lat, lng); var geocoder = new google.maps.Geocoder(); geocoder.geocode({'latLng': latlng}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { //dump(results[0]); if (results[1]) { if (typeof results[0].formatted_address === "undefined" || results[0].formatted_address==null ) { $("#s").val(results[1].formatted_address); $(".st").val(results[1].formatted_address); } else { $("#s").val(results[0].formatted_address); $(".st").val(results[0].formatted_address); } } else { uk_msg(js_lang.trans_27); } } else { uk_msg(js_lang.trans_28 + " " + status); } }); } /*auto get geolocation*/ if ( $(".forms-search,#frm_address").exists() ) { if (navigator.geolocation) { if ( $("#disabled_share_location").val()==""){ dump('detect current location'); if(useMapbox()){ navigator.geolocation.getCurrentPosition(mapbox_geo); } else { navigator.geolocation.getCurrentPosition(success_geo); } } } else { //error('Geo Location is not supported'); } } function getAddress(lat,lng) { var params="action=geoReverse¤tController=store&lat="+lat+"&lng="+lng; params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); if (data.code==1){ if ( $("#s").val()==""){ $("#s").val(data.details); } } else { uk_msg(data.msg); } }, error: function(){ busy(false); } }); } $( document ).on( "click", ".get_direction_btn", function() { if ( $("#origin").val() ==""){ uk_msg(js_lang.trans_25); } else { $(".direction_output").css({"display":"none"}); if(useMapbox()){ var mapbox_geocoder_address = $(".geocoder input"); callAjax("mapbox_geocode","address="+ mapbox_geocoder_address.val() ); } else { display_direction(); } } }); //if( $('.rating-wrapper').is(':visible') ) { if ( $(".menu-left-content").exists() ) { if ( $("#from_address").val()=="" ){ if ( $("#customer_ask_address").val()!=2){ var delivery_type=$("#delivery_type").val(); if(delivery_type=="delivery"){ if ((typeof search_by_location !== "undefined") && ( search_by_location !== null)) { if(search_by_location!=1){ var params="action=enterAddress¤tController=store&tbl=enterAddress"; open_fancy_box2(params); } } } } } } $( document ).on( "click", ".change-address", function() { var params="action=enterAddress¤tController=store&tbl=enterAddress"; open_fancy_box(params); }); if ( $("#sisowbank").exists() ){ $("#sisowbank").addClass("grey-fields full-width"); } if ( $("#payuForm").exists() ){ if ( $("#hash").val()=="" ){ } else { $(".uk-button").attr("disabled",true); $(".uk-button").css({ 'pointer-events' : 'none' }); $("#payuForm").submit(); } } if ( $("#payu_status").exists() ){ $(".uk-button").attr("disabled",true); $(".uk-button").css({ 'pointer-events' : 'none' }); } jQuery.fn.exists = function(){return this.length>0;} if ( $("#is_merchant_open").exists() ){ if ( $("#is_merchant_open").val()==2 ){ var merchant_close_msg=$("#merchant_close_msg").val(); if (typeof merchant_close_msg === "undefined" || merchant_close_msg==null ) { merchant_close_msg(js_lang.trans_30); } else { uk_msg(merchant_close_msg); } } } $( document ).on( "click", "a.share", function(ev) { social_popup( $(this).attr("rel") ); ev.preventDefault(); return; }); $( document ).on( "change", "#delivery_type", function() { var delivery_type=$(this).val(); if ( delivery_type=="pickup"){ $(".delivery-asap").hide(); $("#delivery_time").attr("placeholder",js_lang.trans_38); $(".delivery-fee-wrap").hide(); $(".delivery-min").hide(); $(".pickup-min").show(); $(".dinein-min").hide(); } else if( delivery_type=="dinein") { $(".pickup-min").hide(); $(".delivery-min").hide(); $(".dinein-min").show(); $("#delivery_time").attr("placeholder",js_lang.dinein_time); $(".delivery-asap").hide(); } else { $(".delivery-asap").show(); $("#delivery_time").attr("placeholder",js_lang.trans_39); $(".delivery-fee-wrap").show(); $(".delivery-min").show(); $(".pickup-min").hide(); $(".dinein-min").hide(); } load_item_cart(); }); if( jQuery('#photo').is(':visible') ) { createUploader('photo','photo'); } if ( $("#search-tabs").exists()){ $( "#search-tabs" ).show(); $( "#search-tabs" ).tabs(); } if ( $(".fancybox").exists() ){ $(".fancybox").fancybox(); } $('.payment_cod').on('ifChecked', function(event){ $(".change_wrap").slideToggle("fast"); }); $('.payment_cod').on('ifUnchecked', function(event){ $(".change_wrap").slideToggle("fast"); }); if ( $(".is_holiday").exists()){ //uk_msg( $(".is_holiday").val() ); } if ( $(".merchant-gallery-wrap").exists()){ $('.merchant-gallery-wrap').magnificPopup({ delegate: 'a', type: 'image', closeOnContentClick: false, closeBtnInside: false, mainClass: 'mfp-with-zoom mfp-img-mobile', image: { verticalFit: true, titleSrc: function(item) { return ''; } }, gallery: { enabled: true }, zoom: { enabled: true, duration: 300, // don't foget to change the duration also in CSS opener: function(element) { return element.find('img'); } } }); } $('.payment_pyr').on('ifChecked', function(event){ $(".payment-provider-wrap").slideToggle("fast"); }); $('.payment_pyr').on('ifUnchecked', function(event){ $(".payment-provider-wrap").slideToggle("fast"); }); //isImageLoaded('featured-restaurant-list'); $( document ).on( "click", ".goto-category", function(ev) { var class_name= $(this).data("id"); dump(class_name); $(".goto-category").removeClass("active"); $(this).addClass("active"); scroll_class(class_name); }); }); /*END DOCU*/ function featuredListing() { if ( $(".bxslider").exists() ){ $(".bxslider").show(); $(".feature-merchant-loader").remove(); $('.bxslider').bxSlider({ minSlides: 8, maxSlides: 9, slideWidth: 150, slideMargin: 10, pager:false, onSliderLoad:function(currentIndex){ } }); } } function featuredListingMobile() { if ( $(".bxslider2").exists() ){ $('.bxslider2').bxSlider({ minSlides: 2, maxSlides: 3, slideWidth: 150, slideMargin: 10, pager:false, onSliderLoad:function(currentIndex){ } }); } if ( $(".bxslider3").exists() ){ $('.bxslider3').bxSlider({ minSlides: 1, maxSlides: 1, slideWidth: 150, slideMargin: 10, pager:false, onSliderLoad:function(currentIndex){ } }); } } function isImageLoaded(classname) { $('.'+classname).imagesLoaded() .always( function( instance ,image ) { //console.log('all images loaded'); featuredListing(); featuredListingMobile(); }) .done( function( instance ) { //console.log('all images successfully loaded'); }) .fail( function() { //console.log('all images loaded, at least one is broken'); }) .progress( function( instance, image ) { var result = image.isLoaded ? 'loaded' : 'broken'; var $item = $( image.img ).parent(); //dump($item); $item.removeClass('isloading'); //console.log( 'image is ' + result + ' for ' + image.img.src ); }); } function social_popup(url) { w=700; h=436; var left = (screen.width/2)-(w/2); var top = (screen.height/2)-(h/2); window.open(url, 'sharer','toolbar=0,status=0,width=700,height=436'+', top='+top+', left='+left); } /*$(window).load(function() { $('.flexslider').flexslider({ animation: "slide", animationLoop: false, itemWidth: 100, itemMargin: 5 }); });*/ function display_direction() { $(".direction_output").html(''); $(".direction_output").css({"min-height":"300px","display":"block"}); var directionsService = new google.maps.DirectionsService(); var directionsDisplay = new google.maps.DirectionsRenderer(); var map = new google.maps.Map(document.getElementById('merchant-map'), { zoom:7, mapTypeId: google.maps.MapTypeId.ROADMAP, scrollwheel: false }); directionsDisplay.setMap(map); directionsDisplay.setPanel(document.getElementById('direction_output')); var destination_location= $("#merchant_map_latitude").val()+","+$("#merchant_map_longtitude").val(); dump(destination_location); switch( $("#travel_mode").val() ) { case "DRIVING": var request = { origin: $("#origin").val(), destination: destination_location , travelMode: google.maps.DirectionsTravelMode.DRIVING }; break; case "WALKING": var request = { origin: $("#origin").val(), destination:destination_location , travelMode: google.maps.DirectionsTravelMode.WALKING }; break; case "BICYCLING": var request = { origin: $("#origin").val(), destination: destination_location , travelMode: google.maps.DirectionsTravelMode.BICYCLING }; break; case "TRANSIT": var request = { origin: $("#origin").val(), destination: destination_location , travelMode: google.maps.DirectionsTravelMode.TRANSIT }; break; } directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } else { uk_msg(js_lang.trans_26+" "+status) $(".direction_output").css({"display":"none"}); } }); } function geocode_address(address) { var geocoder; var map; geocoder = new google.maps.Geocoder(); var mapOptions = { scrollwheel: false, zoom: 18, //center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById('maps_side'), mapOptions); geocoder.geocode( { 'address': address}, function(results, status) { //console.debug(results[0].geometry.location.k); //console.debug(results[0].geometry.location.B); if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); if ( $("#map_marker").exists() ){ var image=upload_url+"/"+$("#map_marker").val(); var marker = new google.maps.Marker({ map: map, position: results[0].geometry.location, icon: image }); } else { var marker = new google.maps.Marker({ map: map, position: results[0].geometry.location }); } } else { uk_msg(status); } }); } function geocode_address2(locations) { window.map = new google.maps.Map(document.getElementById('maps_side'), { mapTypeId: google.maps.MapTypeId.ROADMAP, scrollwheel: false }); var infowindow = new google.maps.InfoWindow(); var bounds = new google.maps.LatLngBounds(); for (i = 0; i < locations.length; i++) { if ( $("#map_marker").exists() ){ var image=upload_url+"/"+$("#map_marker").val(); marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), map: map , icon: image }); } else { marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), map: map }); } bounds.extend(marker.position); google.maps.event.addListener(marker, 'click', (function (marker, i) { return function () { infowindow.setContent(locations[i][0]); infowindow.open(map, marker); } })(marker, i)); } map.fitBounds(bounds); var listener = google.maps.event.addListener(map, "idle", function () { map.setZoom(18); google.maps.event.removeListener(listener); }); } function dump(data) { console.debug(data); } dump2 = function(data) { alert(JSON.stringify(data)); }; function photo(data) { var img=''; $(".preview").show(); img+="<img src=\""+upload_url+"/"+data.details.file+"\" alt=\"\" title=\"\" class=\"uk-thumbnail uk-thumbnail-mini\" >"; img+="<input type=\"hidden\" name=\"photo\" value=\""+data.details.file+"\" >"; img+="<p><a href=\"javascript:rm_preview();\">"+js_lang.removeFeatureImage+"</a></p>"; $(".image_preview").html(img); $("#branch_code").removeAttr("data-validation"); $("#date_of_deposit").removeAttr("data-validation"); $("#time_of_deposit").removeAttr("data-validation"); $("#amount").removeAttr("data-validation"); } function rm_preview() { $(".image_preview").html(''); $("#branch_code").attr("data-validation",'required'); $("#date_of_deposit").attr("data-validation",'required'); $("#time_of_deposit").attr("data-validation",'required'); $("#amount").attr("data-validation",'required'); } function plotMerchantLocation(json) { if ( $(".search-map-wrap").exists() ){ var s=[]; var x=0; var y=1; $.each(json.aaData, function( index, val ) { s[x]=[ucwords(val[7]),parseFloat(val[5]),parseFloat(val[6]),y,val[8],val[9],val[10] ] x++; y++; }); $(".search-map-wrap").show(); initializeMarkerNew(s,'search-map-wrap'); } } function ucwords(str) { return (str + '') .replace(/^([a-z\u00E0-\u00FC])|\s+([a-z\u00E0-\u00FC])/g, function($1) { return $1.toUpperCase(); }); } $.validate({ language : jsLanguageValidator, form : '#frm-subscribe', onError : function() { }, onSuccess : function() { form_submit('frm-subscribe'); return true; } }); jQuery(document).ready(function() { if( $('#table_list').is(':visible') ) { table(); } if( $('#table_list2').is(':visible') ) { table2(); } $( "#officesizefield" ).keyup(function() { var value= $( "#officesizefield" ).val(); $('.offsize').text(value); $('#cleansize').val(value); localStorage.setItem('deepcleanoffsize', value); }); $( "#officesizefield_move" ).keyup(function() { var value= $( "#officesizefield_move" ).val(); $('.offsize').text(value); $('#cleansize').val(value); localStorage.setItem('movecleanoffsize', value); }); $( "#officesizefield_storage" ).keyup(function() { var value= $( "#officesizefield_storage" ).val(); $('.offsize').text(value); $('#cleansize').val(value); localStorage.setItem('storagecleanoffsize', value); }); //setting values in carpentry cleaning quotechkout from storage if (window.location.href.indexOf("chkout_carpcleaning_quote") != -1||window.location.href.indexOf("chkout_carpcleaning2quote") != -1) { if (localStorage.getItem("carp_service_type") != null) { var catvalue=localStorage.getItem("carp_service_type"); if(catvalue=="furniture repair"){ var $e = $("#booking_label_11"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Furniture Repair"); $('#carp_ser_type').val("furniture repair"); } if(catvalue=="Building and flooring"){ var $e = $("#booking_label_12"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Building and flooring"); $('#carp_ser_type').val("Building and flooring"); } if(catvalue=="General carpentry"){ var $e = $("#booking_label_13"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("General carpentry"); $('#carp_ser_type').val("General carpentry"); } if(catvalue=="Furniture paint and polish"){ var $e = $("#booking_label_14"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Furniture paint and polish"); $('#carp_ser_type').val("Furniture paint and polish"); } if(catvalue=="Cladding"){ var $e = $("#booking_label_15"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Cladding"); $('#carp_ser_type').val("Cladding"); } if(catvalue=="New Furniture Work"){ var $e = $("#booking_label_16"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("New Furniture Work"); $('#carp_ser_type').val("New Furniture Work"); } if(catvalue=="Custom Wardrobes and Cabinets"){ var $e = $("#booking_label_17"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Custom Wardrobes and Cabinets"); $('#carp_ser_type').val("Custom Wardrobes and Cabinets"); } if(catvalue=="Shop Counters and Displays"){ var $e = $("#booking_label_18"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Shop Counters and Displays"); $('#carp_ser_type').val("Shop Counters and Displays"); } if(catvalue=="Custom Shelves and Racks"){ var $e = $("#booking_label_19"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Custom Shelves and Racks"); $('#carp_ser_type').val("Custom Shelves and Racks"); } if(catvalue=="Custom Furniture and Outlets Carpentry Work"){ var $e = $("#booking_label_20"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Custom Furniture and Outlets Carpentry Work"); $('#carp_ser_type').val("Custom Furniture and Outlets Carpentry Work"); } if (localStorage.getItem("datedesccarpquotecleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedesccarpquotecleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } } //End setting values in carpentry cleaning quote chkout from storage //setting values in ac quotechkout from storage if (window.location.href.indexOf("chkout_acmain_quote") != -1||window.location.href.indexOf("chkout_accleaning2quote") != -1) { if (localStorage.getItem("ac_service_type") != null) { var ac_service_type=localStorage.getItem("ac_service_type"); if(ac_service_type=="ac cleaning"){ var $e = $("#booking_label_1"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("AC Cleaning"); $('#ac_ser_type').val("ac cleaning"); } if(ac_service_type=="ac repair"){ var $e = $("#booking_label_2"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("AC Repair"); $('#ac_ser_type').val("ac repair"); } if(ac_service_type=="ac installation"){ var $e = $("#booking_label_3"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("AC Installation"); $('#ac_ser_type').val("ac installation"); } if (localStorage.getItem("ac_type") != null) { var ac_type=localStorage.getItem("ac_type"); if(ac_type=="split ac"){ var $e = $("#booking_labell_1"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Split AC"); $('#ac_type').val("split ac"); } if(ac_type=="windows ac"){ var $e = $("#booking_labell_2"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Windows AC"); $('#ac_type').val("windows ac"); } if(ac_type=="central ac"){ var $e = $("#booking_labell_3"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Central AC (Duct)"); $('#ac_type').val("central ac"); } } if (localStorage.getItem("ac_unit") != null) { var ac_unit=localStorage.getItem("ac_unit"); if(ac_unit=="1"){ var $e = $("#booking_labelll_1"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.srans').text("1 Unit"); $('#ac_unit').val("1"); } if(ac_unit=="2"){ var $e = $("#booking_labelll_2"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.srans').text("2 Units"); $('#ac_unit').val("2"); } if(ac_unit=="3"){ var $e = $("#booking_labelll_3"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.srans').text("3 Units"); $('#ac_unit').val("3"); } if(ac_unit=="4"){ var $e = $("#booking_labelll_4"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.srans').text("4 Units"); $('#ac_unit').val("4"); } } if (localStorage.getItem("datedescacpquotecleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescacpquotecleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } } //End setting values in ac quote chkout from storage //setting values in pest quotechkout from storage if (window.location.href.indexOf("quoteforpest") != -1||window.location.href.indexOf("chkout_pestcleaning2quote") != -1) { if (localStorage.getItem("pest_house_type") != null) { var ac_service_type=localStorage.getItem("pest_house_type"); if(ac_service_type=="Appartment"){ var $e = $("#booking_label_1"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Appartment"); $('#ac_ser_type').val("Appartment"); } if(ac_service_type=="Villa"){ var $e = $("#booking_label_2"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Villa"); $('#ac_ser_type').val("Villa"); } if (localStorage.getItem("pest_type_quote") != null) { var ac_type=localStorage.getItem("pest_type_quote"); if(ac_type=="Cockroaches"){ var $e = $("#booking_labell_1"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Cockroaches"); $('#ac_type').val("Cockroaches"); } if(ac_type=="Bed Bugs"){ var $e = $("#booking_labell_2"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Bed Bugs"); $('#ac_type').val("Bed Bugs"); } if(ac_type=="Flies/mosquitoes"){ var $e = $("#booking_labell_3"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Flies/mosquitoes"); $('#ac_type').val("Flies/mosquitoes"); } if(ac_type=="Many types"){ var $e = $("#booking_labell_4"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Many types"); $('#ac_type').val("Many types"); } } if (localStorage.getItem("pest_unit_quote") != null) { var ac_unit=localStorage.getItem("pest_unit_quote"); if(ac_unit=="0"){ var $e = $("#booking_labelll_0"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.srans').text("Studio"); $('#ac_unit').val("0"); } if(ac_unit=="1"){ var $e = $("#booking_labelll_1"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.srans').text("1 Bed"); $('#ac_unit').val("1"); } if(ac_unit=="2"){ var $e = $("#booking_labelll_2"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.srans').text("2 Bed"); $('#ac_unit').val("2"); } if(ac_unit=="3"){ var $e = $("#booking_labelll_3"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.srans').text("3 Bed"); $('#ac_unit').val("3"); } if(ac_unit=="4"){ var $e = $("#booking_labelll_4"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.srans').text("4 Bed"); $('#ac_unit').val("4"); } } if (localStorage.getItem("datedescpestquotecleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescpestquotecleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } } //End setting values in pest quote chkout from storage //setting values in electrical quotechkout from storage if (window.location.href.indexOf("quoteforelectrical") != -1||window.location.href.indexOf("chkout_electricalcleaning2quote") != -1) { if (localStorage.getItem("elect_type_quote") != null) { if (localStorage.getItem("elect_type_quote") != null) { var ac_type=localStorage.getItem("elect_type_quote"); if(ac_type=="Wiring"){ var $e = $("#booking_labell_1"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Wiring"); $('#ac_type').val("Wiring"); } if(ac_type=="Outlet & Switches"){ var $e = $("#booking_labell_2"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Outlet & Switches"); $('#ac_type').val("Outlet & Switches"); } if(ac_type=="Lights and Fixtures"){ var $e = $("#booking_labell_3"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Lights and Fixtures"); $('#ac_type').val("Lights and Fixtures"); } if(ac_type=="Smart Switch"){ var $e = $("#booking_labell_4"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Smart Switch"); $('#ac_type').val("Smart Switch"); } if(ac_type=="Smart Thermostat"){ var $e = $("#booking_labell_5"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Smart Thermostat"); $('#ac_type').val("Smart Thermostat"); } if(ac_type=="Smart Camera"){ var $e = $("#booking_labell_6"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Smart Camera"); $('#ac_type').val("Smart Camera"); } if(ac_type=="Custom Job"){ var $e = $("#booking_labell_7"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Custom Job"); $('#ac_type').val("Custom Job"); } } if (localStorage.getItem("datedescelectquotecleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescelectquotecleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } } //End setting values in electrical quote chkout from storage //setting values in plumbing quotechkout from storage if (window.location.href.indexOf("quoteforplumbing") != -1||window.location.href.indexOf("chkout_plumbingcleaning2quote") != -1) { if (localStorage.getItem("plumb_type_quote") != null) { if (localStorage.getItem("plumb_type_quote") != null) { var ac_type=localStorage.getItem("plumb_type_quote"); if(ac_type=="Leaks"){ var $e = $("#booking_labell_1"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Leaks"); $('#ac_type').val("Leaks"); } if(ac_type=="Clogged Drains"){ var $e = $("#booking_labell_2"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Clogged Drains"); $('#ac_type').val("Clogged Drains"); } if(ac_type=="Toilet"){ var $e = $("#booking_labell_3"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Toilet"); $('#ac_type').val("Toilet"); } if(ac_type=="Water heater"){ var $e = $("#booking_labell_4"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Water heater"); $('#ac_type').val("Water heater"); } if(ac_type=="Faucets and Showers"){ var $e = $("#booking_labell_5"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Faucets and Showers"); $('#ac_type').val("Faucets and Showers"); } if(ac_type=="Custom Job"){ var $e = $("#booking_labell_6"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Custom Job"); $('#ac_type').val("Custom Job"); } } if (localStorage.getItem("datedescplumbquotecleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescplumbquotecleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } } //End setting values in plumbing quote chkout from storage //setting values in appliance quotechkout from storage if (window.location.href.indexOf("chkout_appliancemain_quote") != -1||window.location.href.indexOf("chkout_appliancecleaning2quote") != -1) { if (localStorage.getItem("appliance_service_type") != null) { var ac_service_type=localStorage.getItem("appliance_service_type"); if(ac_service_type=="Appliance Repair"){ var $e = $("#booking_label_1"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Appliance Repair"); $('#ac_ser_type').val("Appliance Repair"); } if(ac_service_type=="Appliance Installation"){ var $e = $("#booking_label_2"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Appliance Installation"); $('#ac_ser_type').val("Appliance Installation"); } if(ac_service_type=="Appliance Removal"){ var $e = $("#booking_label_3"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Appliance Removal"); $('#ac_ser_type').val("Appliance Removal"); } if (localStorage.getItem("appliance_type") != null) { var ac_type=localStorage.getItem("appliance_type"); if(ac_type=="Cooker"){ var $e = $("#booking_labell_1"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Cooker"); $('#ac_type').val("Cooker"); } if(ac_type=="Fridge"){ var $e = $("#booking_labell_2"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Fridge"); $('#ac_type').val("Fridge"); } if(ac_type=="Washing Machine"){ var $e = $("#booking_labell_3"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Washing Machine"); $('#ac_type').val("Washing Machine"); } if(ac_type=="Dish Washer"){ var $e = $("#booking_labell_4"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Dish Washer"); $('#ac_type').val("Dish Washer"); } } if (localStorage.getItem("appliance_unit") != null) { var ac_unit=localStorage.getItem("appliance_unit"); if(ac_unit=="1"){ var $e = $("#booking_labelll_1"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.srans').text("1 Unit"); $('#ac_unit').val("1"); } if(ac_unit=="2"){ var $e = $("#booking_labelll_2"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.srans').text("2 Units"); $('#ac_unit').val("2"); } if(ac_unit=="3"){ var $e = $("#booking_labelll_3"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.srans').text("3 Units"); $('#ac_unit').val("3"); } if(ac_unit=="4"){ var $e = $("#booking_labelll_4"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.srans').text("4 Units"); $('#ac_unit').val("4"); } } if (localStorage.getItem("datedescappliancequotecleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescappliancequotecleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } } //End setting values in appliance quote chkout from storage //setting values in item quotechkout from storage if (window.location.href.indexOf("chkout_item_quote") != -1||window.location.href.indexOf("chkout_item2quote") != -1) { if (localStorage.getItem("item_type") != null) { var item_type=localStorage.getItem("item_type"); if(item_type=="Furniture"){ var $e = $("#booking_label_1"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Furniture"); $('#item_type').val("Furniture"); } if(item_type=="Home appliance"){ var $e = $("#booking_label_2"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Home appliance"); $('#item_type').val("Home appliance"); } if (localStorage.getItem("item_need") != null) { var item_need=localStorage.getItem("item_need"); if(item_need=="Yes, I need"){ var $e = $("#booking_labell_1"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Yes, I need"); $('#item_need').val("Yes, I need"); } if(item_need=="No, I don't need"){ var $e = $("#booking_labell_2"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("No, I don't need"); $('#item_need').val("No, I don't need"); } } if (localStorage.getItem("datedescitemquotecleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescitemquotecleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } } //End setting values in item quote chkout from storage //setting values in junk quotechkout from storage if (window.location.href.indexOf("chkout_junk_quote") != -1||window.location.href.indexOf("chkout_junk2quote") != -1) { if (localStorage.getItem("junk_type") != null) { var item_type=localStorage.getItem("junk_type"); if(item_type=="Furniture"){ var $e = $("#booking_label_1"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Furniture"); $('#item_type').val("Furniture"); } if(item_type=="Home appliance"){ var $e = $("#booking_label_2"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Home appliance"); $('#item_type').val("Home appliance"); } if (localStorage.getItem("junk_need") != null) { var item_need=localStorage.getItem("junk_need"); if(item_need=="Yes, I need"){ var $e = $("#booking_labell_1"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("Yes, I need"); $('#item_need').val("Yes, I need"); } if(item_need=="No, I don't need"){ var $e = $("#booking_labell_2"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.bstans').text("No, I don't need"); $('#item_need').val("No, I don't need"); } } if (localStorage.getItem("datedescjunkquotecleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescjunkquotecleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } } //End setting values in junk quote chkout from storage //setting values in garden quotechkout from storage if (window.location.href.indexOf("chkout_garden_quote") != -1||window.location.href.indexOf("chkout_gardencleaning2quote") != -1) { if (localStorage.getItem("garden_type") != null) { var garden_type=localStorage.getItem("garden_type"); if(garden_type=="0-200 sqft"){ var $e = $("#booking_label_1"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("0-200 sqft"); $('#garden_type').val("0-200 sqft"); } if(garden_type=="200-400 sqft"){ var $e = $("#booking_label_2"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("200-400 sqft"); $('#garden_type').val("200-400 sqft"); } if(garden_type=="400-600 sqft"){ var $e = $("#booking_label_3"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("400-600 sqft"); $('#garden_type').val("400-600 sqft"); } if(garden_type=="more than 600 sqft"){ var $e = $("#booking_label_4"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("more than 600 sqft"); $('#garden_type').val("more than 600 sqft"); } if (localStorage.getItem("datedescgardenquotecleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescgardenquotecleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } } //End setting values in garden quote chkout from storage //setting values in handyman cleaning quotechkout from storage if (window.location.href.indexOf("chkout_handycleaning_quote") != -1||window.location.href.indexOf("chkout_handycleaning2_quote") != -1) { if (localStorage.getItem("hand_service_type") != null) { var catvalue=localStorage.getItem("hand_service_type"); if(catvalue=="furniture assembly"){ var $e = $("#booking_label_11"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Furniture Assembly"); $('#carp_ser_type').val("furniture assembly"); } if(catvalue=="Lights and Bulbs"){ var $e = $("#booking_label_12"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Lights and Bulbs"); $('#carp_ser_type').val("Lights and Bulbs"); } if(catvalue=="General Handyman"){ var $e = $("#booking_label_13"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("General Handyman"); $('#carp_ser_type').val("General Handyman"); } if(catvalue=="Hanging and mounting"){ var $e = $("#booking_label_14"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Hanging and mounting"); $('#carp_ser_type').val("Hanging and mounting"); } if(catvalue=="tv mounting"){ var $e = $("#booking_label_15"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Tv Mounting"); $('#carp_ser_type').val("tv mounting"); } if(catvalue=="Curtains and blinds"){ var $e = $("#booking_label_16"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Curtains and blinds"); $('#carp_ser_type').val("Curtains and blinds"); } if(catvalue=="Knob and lock services"){ var $e = $("#booking_label_17"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Knob and lock services"); $('#carp_ser_type').val("Knob and lock services"); } if(catvalue=="Sports equipment installation"){ var $e = $("#booking_label_18"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Sports equipment installation"); $('#carp_ser_type').val("Sports equipment installation"); } if(catvalue=="Custom jobs"){ var $e = $("#booking_label_18"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.catans').text("Custom jobs"); $('#carp_ser_type').val("Custom jobs"); } if (localStorage.getItem("datedeschandquotecleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedeschandquotecleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } } //End setting values in handyman cleaning quote chkout from storage //setting values in deep cleaning chkout from storage if (window.location.href.indexOf("chkout_deepcleaning") != -1) { if (localStorage.getItem("deepcleancat") != null) { var catvalue=localStorage.getItem("deepcleancat"); if(catvalue==110){ // check_hover_state('11','110','456'); //alert("appart"); var $p = $(".appartbox"); $p.css("background-color","#fcbd1b"); $p.css("color","white"); $('.catans').text("Appartment"); $('#cleantype').val("Appartment"); $('#appartmentvalues').show(); var appartvalue=localStorage.getItem("deepcleanappsize"); $('#appartmentans').show(); if(appartvalue==210){ $('.appsize').text("Studio"); $('#cleansize').val("Studio"); var $f = $(".apst"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==211){ $('.appsize').text("1 Bedroom Appartment"); $('#cleansize').val("1 Bedroom Appartment"); var $f = $(".ap1"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==212){ $('.appsize').text("2 Bedroom Appartment"); $('#cleansize').val("2 Bedroom Appartment"); var $f = $(".ap2"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==213){ $('.appsize').text("3 BedRoom Appartment"); $('#cleansize').val("3 BedRoom Appartment"); var $f = $(".ap3"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==214){ $('.appsize').text("4 Bedroom Appartment"); $('#cleansize').val("4 Bedroom Appartment"); var $f = $(".ap4"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==215){ $('.appsize').text("5 Bedroom Appartment"); $('#cleansize').val("5 Bedroom Appartment"); var $f = $(".ap5"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } } if(catvalue==111){ //check_hover_state('11','110','456'); //alert("villa"); var $c = $(".villabox"); $c.css("background-color","#fcbd1b"); $c.css("color","white"); $('.catans').text("Villa"); $('#cleantype').val("Villa"); $('#villavalues').show(); var villavalue=localStorage.getItem("deepcleanvillsize"); $('#villaans').show(); if(villavalue==310){ $('.villsize').text("2 Bedroom/House Villa"); $('#cleansize').val("2 Bedroom/House Villa"); var $g = $(".vil2"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } if(villavalue==311){ $('.villsize').text("3 Bedroom/House Villa"); $('#cleansize').val("3 Bedroom/House Villa"); var $g = $(".vil3"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } if(villavalue==312){ $('.villsize').text("4 Bedroom/House Villa"); $('#cleansize').val("4 Bedroom/House Villa"); var $g = $(".vil4"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } if(villavalue==313){ $('.villsize').text("5 Bedroom Appartment"); $('#cleansize').val("5 Bedroom Appartment"); var $g = $(".vil5"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } } if(catvalue==112){ //check_hover_state('11','110','456'); //alert("office"); var $d = $(".offbox"); $d.css("background-color","#fcbd1b"); $d.css("color","white"); $('.catans').text("Office"); $('#cleantype').val("Office"); $('#officevalues').show(); $('#officeans').show(); var officevalue=localStorage.getItem("deepcleanoffsize"); $('.offsize').text(officevalue); $('#cleansize').val(officevalue); $('#officesizefield').val(officevalue); } } if (localStorage.getItem("datedescdeepcleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescdeepcleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } //End setting values in deep cleaning chkout from storage //setting values in storage cleaning chkout from storage if (window.location.href.indexOf("chkout_storagecleaning") != -1) { if (localStorage.getItem("mov_type") != null) { var mov_type=localStorage.getItem("mov_type"); if(mov_type=="within city"){ var $e = $("#booking_1"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.movans').text("within city"); $('#mov_type').val("within city"); } if(mov_type=="to other city in UAE"){ var $e = $("#booking_2"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.movans').text("to other city in UAE"); $('#mov_type').val("to other city in UAE"); } if(mov_type=="within same building"){ var $e = $("#booking_3"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.movans').text("within same building"); $('#mov_type').val("within same building"); } } if (localStorage.getItem("storagecleancat") != null) { var catvalue=localStorage.getItem("storagecleancat"); if(catvalue==110){ // check_hover_state('11','110','456'); //alert("appart"); var $p = $(".appartbox"); $p.css("background-color","#fcbd1b"); $p.css("color","white"); $('.catans').text("Appartment"); $('#cleantype').val("Appartment"); $('#appartmentvalues').show(); var appartvalue=localStorage.getItem("storagecleanappsize"); $('#appartmentans').show(); if(appartvalue==210){ $('.appsize').text("Studio"); $('#cleansize').val("Studio"); var $f = $(".apst"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==211){ $('.appsize').text("1 Bedroom Appartment"); $('#cleansize').val("1 Bedroom Appartment"); var $f = $(".ap1"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==212){ $('.appsize').text("2 Bedroom Appartment"); $('#cleansize').val("2 Bedroom Appartment"); var $f = $(".ap2"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==213){ $('.appsize').text("3 BedRoom Appartment"); $('#cleansize').val("3 BedRoom Appartment"); var $f = $(".ap3"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==214){ $('.appsize').text("4 Bedroom Appartment"); $('#cleansize').val("4 Bedroom Appartment"); var $f = $(".ap4"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==215){ $('.appsize').text("5 Bedroom Appartment"); $('#cleansize').val("5 Bedroom Appartment"); var $f = $(".ap5"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==216){ $('.appsize').text("custom/selected item"); $('#cleansize').val("custom/selected item"); var $f = $(".ap6"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } } if(catvalue==111){ //check_hover_state('11','110','456'); //alert("villa"); var $c = $(".villabox"); $c.css("background-color","#fcbd1b"); $c.css("color","white"); $('.catans').text("Villa"); $('#cleantype').val("Villa"); $('#villavalues').show(); var villavalue=localStorage.getItem("storagecleanvillsize"); $('#villaans').show(); if(villavalue==310){ $('.villsize').text("2 Bedroom/House Villa"); $('#cleansize').val("2 Bedroom/House Villa"); var $g = $(".vil2"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } if(villavalue==311){ $('.villsize').text("3 Bedroom/House Villa"); $('#cleansize').val("3 Bedroom/House Villa"); var $g = $(".vil3"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } if(villavalue==312){ $('.villsize').text("4 Bedroom/House Villa"); $('#cleansize').val("4 Bedroom/House Villa"); var $g = $(".vil4"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } if(villavalue==313){ $('.villsize').text("5 Bedroom Appartment"); $('#cleansize').val("5 Bedroom Appartment"); var $g = $(".vil5"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } if(villavalue==314){ $('.villsize').text("custom/selected item"); $('#cleansize').val("custom/selected item"); var $g = $(".vil6"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } } if(catvalue==112){ //check_hover_state('11','110','456'); //alert("office"); var $d = $(".offbox"); $d.css("background-color","#fcbd1b"); $d.css("color","white"); $('.catans').text("Office"); $('#cleantype').val("Office"); $('#officevalues').show(); $('#officeans').show(); var officevalue=localStorage.getItem("storagecleanoffsize"); $('.offsize').text(officevalue); $('#cleansize').val(officevalue); $('#officesizefield').val(officevalue); } } if (localStorage.getItem("datedescstoragecleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescstoragecleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } //End setting values in storage cleaning chkout from storage //setting values in move cleaning chkout from storage if (window.location.href.indexOf("chkout_movecleaning") != -1) { if (localStorage.getItem("mov_type") != null) { var mov_type=localStorage.getItem("mov_type"); if(mov_type=="within city"){ var $e = $("#booking_1"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.movans').text("within city"); $('#mov_type').val("within city"); } if(mov_type=="to other city in UAE"){ var $e = $("#booking_2"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.movans').text("to other city in UAE"); $('#mov_type').val("to other city in UAE"); } if(mov_type=="within same building"){ var $e = $("#booking_3"); $e.css("background-color","#fcbd1b"); $e.css("color","white"); $('.movans').text("within same building"); $('#mov_type').val("within same building"); } } if (localStorage.getItem("movecleancat") != null) { var catvalue=localStorage.getItem("movecleancat"); if(catvalue==110){ // check_hover_state('11','110','456'); //alert("appart"); var $p = $(".appartbox"); $p.css("background-color","#fcbd1b"); $p.css("color","white"); $('.catans').text("Appartment"); $('#cleantype').val("Appartment"); $('#appartmentvalues').show(); var appartvalue=localStorage.getItem("movecleanappsize"); $('#appartmentans').show(); if(appartvalue==210){ $('.appsize').text("Studio"); $('#cleansize').val("Studio"); var $f = $(".apst"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==211){ $('.appsize').text("1 Bedroom Appartment"); $('#cleansize').val("1 Bedroom Appartment"); var $f = $(".ap1"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==212){ $('.appsize').text("2 Bedroom Appartment"); $('#cleansize').val("2 Bedroom Appartment"); var $f = $(".ap2"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==213){ $('.appsize').text("3 BedRoom Appartment"); $('#cleansize').val("3 BedRoom Appartment"); var $f = $(".ap3"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==214){ $('.appsize').text("4 Bedroom Appartment"); $('#cleansize').val("4 Bedroom Appartment"); var $f = $(".ap4"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==215){ $('.appsize').text("5 Bedroom Appartment"); $('#cleansize').val("5 Bedroom Appartment"); var $f = $(".ap5"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } } if(catvalue==111){ //check_hover_state('11','110','456'); //alert("villa"); var $c = $(".villabox"); $c.css("background-color","#fcbd1b"); $c.css("color","white"); $('.catans').text("Villa"); $('#cleantype').val("Villa"); $('#villavalues').show(); var villavalue=localStorage.getItem("movecleanvillsize"); $('#villaans').show(); if(villavalue==310){ $('.villsize').text("2 Bedroom/House Villa"); $('#cleansize').val("2 Bedroom/House Villa"); var $g = $(".vil2"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } if(villavalue==311){ $('.villsize').text("3 Bedroom/House Villa"); $('#cleansize').val("3 Bedroom/House Villa"); var $g = $(".vil3"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } if(villavalue==312){ $('.villsize').text("4 Bedroom/House Villa"); $('#cleansize').val("4 Bedroom/House Villa"); var $g = $(".vil4"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } if(villavalue==313){ $('.villsize').text("5 Bedroom Appartment"); $('#cleansize').val("5 Bedroom Appartment"); var $g = $(".vil5"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } } if(catvalue==112){ //check_hover_state('11','110','456'); //alert("office"); var $d = $(".offbox"); $d.css("background-color","#fcbd1b"); $d.css("color","white"); $('.catans').text("Office"); $('#cleantype').val("Office"); $('#officevalues').show(); $('#officeans').show(); var officevalue=localStorage.getItem("movecleanoffsize"); $('.offsize').text(officevalue); $('#cleansize').val(officevalue); $('#officesizefield').val(officevalue); } } if (localStorage.getItem("datedescmovecleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescmovecleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } //End setting values in move cleaning chkout from storage //setting values in paint cleaning quote chkout from storage if (window.location.href.indexOf("chkout_quote_paint") != -1||window.location.href.indexOf("chkout_paintquotecleaning2") != -1) { if (localStorage.getItem("paintcleancat_quote") != null) { var catvalue=localStorage.getItem("paintcleancat_quote"); if(catvalue==110){ // check_hover_state('11','110','456'); //alert("appart"); var $p = $(".appartbox"); $p.css("background-color","#fcbd1b"); $p.css("color","white"); $('.catans').text("Appartment"); $('#cleantype').val("Appartment"); $('#appartmentvalues').show(); var appartvalue=localStorage.getItem("paintcleanappsize"); $('#appartmentans').show(); if(appartvalue==210){ $('.appsize').text("Studio"); $('#cleansize').val("Studio"); var $f = $(".apst"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==211){ $('.appsize').text("1 Bedroom Appartment"); $('#cleansize').val("1 Bedroom Appartment"); var $f = $(".ap1"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==212){ $('.appsize').text("2 Bedroom Appartment"); $('#cleansize').val("2 Bedroom Appartment"); var $f = $(".ap2"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==213){ $('.appsize').text("3 BedRoom Appartment"); $('#cleansize').val("3 BedRoom Appartment"); var $f = $(".ap3"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==214){ $('.appsize').text("4 Bedroom Appartment"); $('#cleansize').val("4 Bedroom Appartment"); var $f = $(".ap4"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==215){ $('.appsize').text("5 Bedroom Appartment"); $('#cleansize').val("5 Bedroom Appartment"); var $f = $(".ap5"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } } if(catvalue==111){ //check_hover_state('11','110','456'); //alert("villa"); var $c = $(".villabox"); $c.css("background-color","#fcbd1b"); $c.css("color","white"); $('.catans').text("Villa"); $('#cleantype').val("Villa"); $('#villavalues').show(); var villavalue=localStorage.getItem("paintcleanvillsize"); $('#villaans').show(); if(villavalue==310){ $('.villsize').text("2 Bedroom/House Villa"); $('#cleansize').val("2 Bedroom/House Villa"); var $g = $(".vil2"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } if(villavalue==311){ $('.villsize').text("3 Bedroom/House Villa"); $('#cleansize').val("3 Bedroom/House Villa"); var $g = $(".vil3"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } if(villavalue==312){ $('.villsize').text("4 Bedroom/House Villa"); $('#cleansize').val("4 Bedroom/House Villa"); var $g = $(".vil4"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } if(villavalue==313){ $('.villsize').text("5 Bedroom Appartment"); $('#cleansize').val("5 Bedroom Appartment"); var $g = $(".vil5"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } } if(catvalue==112){ //check_hover_state('11','110','456'); //alert("office"); var $d = $(".offbox"); $d.css("background-color","#fcbd1b"); $d.css("color","white"); $('.catans').text("Office"); $('#cleantype').val("Office"); $('#officevalues').show(); $('#officeans').show(); var officevalue=localStorage.getItem("deepcleanoffsize"); $('.offsize').text(officevalue); $('#cleansize').val(officevalue); $('#officesizefield').val(officevalue); } } if (localStorage.getItem("datedescpaintquotecleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescpaintquotecleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } //End setting values in paint cleaning quote chkout from storage //setting values in remodel cleaning quote chkout from storage if (window.location.href.indexOf("chkout_quote_remodel") != -1||window.location.href.indexOf("chkout_remodelquotecleaning2") != -1) { if (localStorage.getItem("remodelcleancat_quote") != null) { var catvalue=localStorage.getItem("remodelcleancat_quote"); if(catvalue==110){ // check_hover_state('11','110','456'); //alert("appart"); var $p = $(".appartbox"); $p.css("background-color","#fcbd1b"); $p.css("color","white"); $('.catans').text("Appartment"); $('#cleantype').val("Appartment"); $('#appartmentvalues').show(); var appartvalue=localStorage.getItem("remodelcleanappsize"); $('#appartmentans').show(); if(appartvalue==210){ $('.appsize').text("Bathroom"); $('#cleansize').val("Bathroom"); var $f = $(".apst"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==211){ $('.appsize').text("Kitchen"); $('#cleansize').val("Kitchen"); var $f = $(".ap1"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==212){ $('.appsize').text("Flooring"); $('#cleansize').val("Flooring"); var $f = $(".ap2"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==213){ $('.appsize').text("Masonary work"); $('#cleansize').val("Masonary work"); var $f = $(".ap3"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==214){ $('.appsize').text("Minor repair"); $('#cleansize').val("Minor repair"); var $f = $(".ap4"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } if(appartvalue==215){ $('.appsize').text("Gypsum work"); $('#cleansize').val("Gypsum work"); var $f = $(".ap5"); $f.css("background-color","#fcbd1b"); $f.css("color","white"); } } if(catvalue==111){ //check_hover_state('11','110','456'); //alert("villa"); var $c = $(".villabox"); $c.css("background-color","#fcbd1b"); $c.css("color","white"); $('.catans').text("Villa"); $('#cleantype').val("Villa"); $('#villavalues').show(); var villavalue=localStorage.getItem("remodelcleanvillsize"); $('#villaans').show(); if(villavalue==310){ $('.villsize').text("Bathroom"); $('#cleansize').val("Bathroom"); var $g = $(".vil2"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } if(villavalue==311){ $('.villsize').text("Kitchen"); $('#cleansize').val("Kitchen"); var $g = $(".vil3"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } if(villavalue==312){ $('.villsize').text("Flooring"); $('#cleansize').val("Flooring"); var $g = $(".vil4"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } if(villavalue==313){ $('.villsize').text("Masonary work"); $('#cleansize').val("Masonary work"); var $g = $(".vil5"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } if(villavalue==314){ $('.villsize').text("Minor repairs"); $('#cleansize').val("Minor repairs"); var $g = $(".vil6"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } if(villavalue==315){ $('.villsize').text("Gypsum work"); $('#cleansize').val("Gypsum work"); var $g = $(".vil7"); $g.css("background-color","#fcbd1b"); $g.css("color","white"); } } if(catvalue==112){ //check_hover_state('11','110','456'); //alert("office"); var $d = $(".offbox"); $d.css("background-color","#fcbd1b"); $d.css("color","white"); $('.catans').text("Office"); $('#cleantype').val("Office"); $('#officevalues').show(); $('#officeans').show(); var officevalue=localStorage.getItem("deepcleanoffsize"); $('.offsize').text(officevalue); $('#cleansize').val(officevalue); $('#officesizefield').val(officevalue); } } if (localStorage.getItem("datedescremodelquotecleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescremodelquotecleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } //End setting values in paint remodel quote chkout from storage //setting values in pool cleaning if (window.location.href.indexOf("chkout_poolcleaning") != -1) { if (localStorage.getItem("poolcleantype") != null) { var poolcleantype=localStorage.getItem("poolcleantype"); if (poolcleantype=='cleaning'){ var $p = $("#booking_label_12"); $p.css("background-color","white"); $p.css("color","black"); var $p1 = $("#booking_label_11"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); //localStorage.setItem('poolcleantype', "cleaning"); $('#poolcleantype').val("cleaning"); $('.catans').text("Cleaning"); }else{ var $p = $("#booking_label_11"); $p.css("background-color","white"); $p.css("color","black"); var $p1 = $("#booking_label_12"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); //localStorage.setItem('poolcleantype', "maintenance and repair"); $('#poolcleantype').val("maintenance and repair"); $('.catans').text("Maintenance and Repair"); } } if (localStorage.getItem("datedescpoolcleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescpoolcleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } //end setting values in pool cleaning //setting values in Sofa cleaning chkout from storage if (window.location.href.indexOf("chkout_sofacleaning") != -1) { if (localStorage.getItem("sofacleantype") != null) { var sofatype=localStorage.getItem("sofacleantype"); if (sofatype=='shampoo'){ //alert("shampoo"); $('.totalcleanersneeded').text("shampoo"); $('#sofa_clean_type').val("shampoo"); $('.shampooseats').show(); var $p1 = $("#booking_label_11"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); var arr = JSON.parse( localStorage.getItem('shampseatsprice') ); $.each(arr, function(index, element) { if(index=="shamp_price"){ $('#shampoo_price').val(element); //$('#cleaners_price_indus').val(element); }else{ //$('#total_cleaners').val(element); $('#total_shampoo').val(element); //$('.totalcleanersneeded').html(element); var $p = $("#indusshampoo"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } }); if (localStorage.getItem("totalsofacleanDatashamp") != null) { var arr = JSON.parse( localStorage.getItem('totalsofacleanDatashamp') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } }else{ //alert("steam"); $('#sofa_clean_type').val("steam"); $('.steamseats').show(); $('.totalcleanersneeded').text("steam"); var $p1 = $("#booking_label_12"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); var arr = JSON.parse( localStorage.getItem('steamseatsprice') ); $.each(arr, function(index, element) { if(index=="steam_price"){ $('#steam_price').val(element); //$('#cleaners_price_indus').val(element); }else{ //$('#total_cleaners').val(element); $('#total_steam').val(element); //$('.totalcleanersneeded').html(element); var $p = $("#indussteam"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } }); if (localStorage.getItem("totalsofacleanDatasteam") != null) { var arr = JSON.parse( localStorage.getItem('totalsofacleanDatasteam') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } } } if (localStorage.getItem("datedescsofacleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescsofacleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } }else{ } //End setting values in Sofa cleaning chkout from storage //setting values in pest cleaning chkout from storage if (window.location.href.indexOf("chkout_pestcleaning") != -1) { if (localStorage.getItem("pestcleantype") != null) { var pest_type=localStorage.getItem("pestcleantype"); if (pest_type=='appartment'){ $('.totalcleanersneeded').text("appartment"); $('#pest_clean_type').val("appartment"); $('.shampooseats').show(); var $p1 = $("#booking_label_11"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); var arr = JSON.parse( localStorage.getItem('appartbedsprice_pest') ); $.each(arr, function(index, element) { if(index=="price"){ $('#shampoo_price').val(element); //$('#cleaners_price_indus').val(element); }else{ //$('#total_cleaners').val(element); $('#total_beds').val(element); //$('.totalcleanersneeded').html(element); var $p = $("#indusappart"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } }); if (localStorage.getItem("totalpestcleanDataappart_pest") != null) { //alert("appartment here"); var arr = JSON.parse( localStorage.getItem('totalpestcleanDataappart_pest') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } }else{ $('#pest_clean_type').val("villa"); $('.steamseats').show(); $('.totalcleanersneeded').text("villa"); var $p1 = $("#booking_label_12"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); var arr = JSON.parse( localStorage.getItem('villabedsprice_pest') ); $.each(arr, function(index, element) { if(index=="price"){ $('#steam_price').val(element); //$('#cleaners_price_indus').val(element); }else{ //$('#total_cleaners').val(element); $('#total_beds').val(element); //$('.totalcleanersneeded').html(element); var $p = $("#indusvilla"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } }); if (localStorage.getItem("totalpestcleanDatavilla_pest") != null) { var arr = JSON.parse( localStorage.getItem('totalpestcleanDatavilla_pest') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } } if (localStorage.getItem("datedescpestcleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescpestcleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } if (localStorage.getItem("pest_kill_type") != null) { var pest=localStorage.getItem("pest_kill_type"); if(pest=="cockroaches"){ var $p1 = $("#booking_label_1"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); $('#kill_types').val("cockroaches"); $('.pesttype').text("cockroaches"); }else if(pest=="bed bugs"){ var $p1 = $("#booking_label_2"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); $('#kill_types').val("bed bugs"); $('.pesttype').text("bed bugs"); }else if(pest=="flies/mosquitoes"){ var $p1 = $("#booking_label_3"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); $('#kill_types').val("flies/mosquitoes"); $('.pesttype').text("flies/mosquitoes"); }else{ var $p1 = $("#booking_label_4"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); $('#kill_types').val("many types"); $('.pesttype').text("many types"); } } }else{ } } //End setting values in pest cleaning chkout from storage //setting values in painting chkout from storage if (window.location.href.indexOf("chkout_paintcleaning") != -1) { if (localStorage.getItem("paintcleantype") != null) { var sofatype=localStorage.getItem("paintcleantype"); if (sofatype=='appartment'){ //alert("shampoo"); $('.totalcleanersneeded').text("appartment"); $('#paint_clean_type').val("appartment"); $('.shampooseats').show(); var $p1 = $("#booking_label_11"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); var arr = JSON.parse( localStorage.getItem('appartbedsprice') ); $.each(arr, function(index, element) { if(index=="price"){ $('#appart_price').val(element); //$('#cleaners_price_indus').val(element); }else{ //$('#total_cleaners').val(element); $('#total_appart').val(element); //$('.totalcleanersneeded').html(element); var $p = $("#indusappart"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } }); if (localStorage.getItem("totalpaintcleanDataappart") != null) { var arr = JSON.parse( localStorage.getItem('totalpaintcleanDataappart') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } } else{ //alert("steam"); $('#paint_clean_type').val("villa"); $('.steamseats').show(); $('.totalcleanersneeded').text("villa"); var $p1 = $("#booking_label_12"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); var arr = JSON.parse( localStorage.getItem('villabedsprice') ); $.each(arr, function(index, element) { if(index=="price"){ $('#villa_price').val(element); //$('#cleaners_price_indus').val(element); }else{ //$('#total_cleaners').val(element); $('#total_villa').val(element); //$('.totalcleanersneeded').html(element); var $p = $("#indusvilla"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } }); if (localStorage.getItem("totalpaintcleanDatavilla") != null) { var arr = JSON.parse( localStorage.getItem('totalpaintcleanDatavilla') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } } if (localStorage.getItem("datedescpaintcleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescpaintcleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } } //End setting values in painting chkout from storage //setting values in remodel chkout from storage if (window.location.href.indexOf("chkout_remodelcleaning") != -1) { if (localStorage.getItem("remodelcleantype") != null) { var sofatype=localStorage.getItem("remodelcleantype"); if (sofatype=='appartment'){ //alert("shampoo"); $('.totalcleanersneeded').text("appartment"); $('#paint_clean_type').val("appartment"); $('.shampooseats').show(); var $p1 = $("#booking_label_11"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); var arr = JSON.parse( localStorage.getItem('appartbedsprice_remodel') ); $.each(arr, function(index, element) { if(index=="price"){ $('#appart_price').val(element); //$('#cleaners_price_indus').val(element); }else{ //$('#total_cleaners').val(element); $('#total_appart').val(element); //$('.totalcleanersneeded').html(element); var $p = $("#indusappart"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } }); if (localStorage.getItem("totalremodelcleanDataappart") != null) { var arr = JSON.parse( localStorage.getItem('totalremodelcleanDataappart') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } } else{ //alert("steam"); $('#paint_clean_type').val("villa"); $('.steamseats').show(); $('.totalcleanersneeded').text("villa"); var $p1 = $("#booking_label_12"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); var arr = JSON.parse( localStorage.getItem('villabedsprice_remodel') ); $.each(arr, function(index, element) { if(index=="price"){ $('#villa_price').val(element); //$('#cleaners_price_indus').val(element); }else{ //$('#total_cleaners').val(element); $('#total_villa').val(element); //$('.totalcleanersneeded').html(element); var $p = $("#indusvilla"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } }); if (localStorage.getItem("totalremodelcleanDatavilla") != null) { var arr = JSON.parse( localStorage.getItem('totalremodelcleanDatavilla') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } } if (localStorage.getItem("datedescremodelcleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescremodelcleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } } //End setting values in remodel chkout from storage //setting values in sanitizer chkout from storage if (window.location.href.indexOf("chkout_sanitcleaning") != -1) { if (localStorage.getItem("sanitcleantype") != null) { var sofatype=localStorage.getItem("sanitcleantype"); if (sofatype=='appartment'){ //alert("shampoo"); $('.totalcleanersneeded').text("appartment"); $('#paint_clean_type').val("appartment"); $('.shampooseats').show(); var $p1 = $("#booking_label_11"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); var arr = JSON.parse( localStorage.getItem('appartbedsprice_sanit') ); $.each(arr, function(index, element) { if(index=="price"){ $('#appart_price').val(element); //$('#cleaners_price_indus').val(element); }else{ //$('#total_cleaners').val(element); $('#total_appart').val(element); //$('.totalcleanersneeded').html(element); var $p = $("#indusappart"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } }); if (localStorage.getItem("totalsanitcleanDataappart") != null) { var arr = JSON.parse( localStorage.getItem('totalsanitcleanDataappart') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } } else{ //alert("steam"); $('#paint_clean_type').val("villa"); $('.steamseats').show(); $('.totalcleanersneeded').text("villa"); var $p1 = $("#booking_label_12"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); var arr = JSON.parse( localStorage.getItem('villabedsprice_sanit') ); $.each(arr, function(index, element) { if(index=="price"){ $('#villa_price').val(element); //$('#cleaners_price_indus').val(element); }else{ //$('#total_cleaners').val(element); $('#total_villa').val(element); //$('.totalcleanersneeded').html(element); var $p = $("#indusvilla"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } }); if (localStorage.getItem("totalsanitcleanDatavilla") != null) { var arr = JSON.parse( localStorage.getItem('totalsanitcleanDatavilla') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } } if (localStorage.getItem("datedescsanitcleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescsanitcleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } } //End setting values in sanitizer chkout from storage //setting values in deepcleanorder chkout from storage if (window.location.href.indexOf("deepservorder") != -1) { //alert("here"); if (localStorage.getItem("deepcleantypeorder") != null) { var sofatype=localStorage.getItem("deepcleantypeorder"); if (sofatype=='appartment'){ //alert("shampoo"); $('.totalcleanersneeded').text("appartment"); $('#paint_clean_type').val("appartment"); $('.shampooseats').show(); var $p1 = $("#booking_label_11"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); var arr = JSON.parse( localStorage.getItem('appartbedsprice_deepcleanorder') ); $.each(arr, function(index, element) { if(index=="price"){ $('#appart_price').val(element); //$('#cleaners_price_indus').val(element); }else{ //$('#total_cleaners').val(element); $('#total_appart').val(element); //$('.totalcleanersneeded').html(element); var $p = $("#indusappart"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } }); if (localStorage.getItem("totalcleanDataappart_deepcleanorder") != null) { var arr = JSON.parse( localStorage.getItem('totalcleanDataappart_deepcleanorder') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } } else{ //alert("steam"); $('#paint_clean_type').val("villa"); $('.steamseats').show(); $('.totalcleanersneeded').text("villa"); var $p1 = $("#booking_label_12"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); var arr = JSON.parse( localStorage.getItem('villabedsprice_deepcleanorder') ); $.each(arr, function(index, element) { if(index=="price"){ $('#villa_price').val(element); //$('#cleaners_price_indus').val(element); }else{ //$('#total_cleaners').val(element); $('#total_villa').val(element); //$('.totalcleanersneeded').html(element); var $p = $("#indusvilla"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } }); if (localStorage.getItem("totalcleanDatavilla_deepcleanorder") != null) { var arr = JSON.parse( localStorage.getItem('totalcleanDatavilla_deepcleanorder') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } } if (localStorage.getItem("datedesccleanData_deepcleanorder") != null) { var arr = JSON.parse( localStorage.getItem('datedesccleanData_deepcleanorder') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } } //End setting values in deepcleanorder chkout from storage //setting values in carpet cleaning from storage if (window.location.href.indexOf("chkout_carpetcleaning") != -1) { if (localStorage.getItem("carpetcleantype") != null) { var cleantype=localStorage.getItem("carpetcleantype"); if (cleantype=='small rugs'){ //alert("small rugs"); $('.totalcleanersneeded').text("Small Rugs"); $('#carpet_clean_type').val("small rugs"); $('.srugpiece').show(); var $p1 = $("#booking_label_11"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); var arr = JSON.parse( localStorage.getItem('srugpieceprice') ); $.each(arr, function(index, element) { if(index=="rug_price"){ $('#rug_price').val(element); //$('#cleaners_price_indus').val(element); }else{ //$('#total_cleaners').val(element); $('#total_rug').val(element); $('.totalcarpetscleaned').text(element+" piece(s)"); //$('.totalcleanersneeded').html(element); var $p = $("#indussrug"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } }); if (localStorage.getItem("totalcarpetcleanDatasrug") != null) { var arr = JSON.parse( localStorage.getItem('totalcarpetcleanDatasrug') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } }else if(cleantype=='medium sized carpet'){ //alert("steam"); //alert("medium rugs"); $('#carpet_clean_type').val("medium sized carpet"); $('.mrugpiece').show(); $('.totalcleanersneeded').text("Medium Sized Carpet"); var $p1 = $("#booking_label_12"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); var arr = JSON.parse( localStorage.getItem('mrugpieceprice') ); $.each(arr, function(index, element) { if(index=="rug_price"){ $('#rug_price').val(element); //$('#cleaners_price_indus').val(element); }else{ //$('#total_cleaners').val(element); $('#total_rug').val(element); $('.totalcarpetscleaned').text(element+" piece(s)"); //$('.totalcleanersneeded').html(element); var $p = $("#indusmrug"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } }); if (localStorage.getItem("totalcarpetcleanDatamrug") != null) { var arr = JSON.parse( localStorage.getItem('totalcarpetcleanDatamrug') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } }else{//for third //alert("large rugs"); //alert("steam"); $('#carpet_clean_type').val("large carpet"); $('.lrugpiece').show(); $('.totalcleanersneeded').text("Large Carpet"); var $p1 = $("#booking_label_13"); $p1.css("background-color","#fcbd1b"); $p1.css("color","white"); var arr = JSON.parse( localStorage.getItem('lrugpieceprice') ); $.each(arr, function(index, element) { if(index=="rug_price"){ $('#rug_price').val(element); //$('#cleaners_price_indus').val(element); }else{ //$('#total_cleaners').val(element); $('#total_rug').val(element); $('.totalcarpetscleaned').text(element+" piece(s)"); //$('.totalcleanersneeded').html(element); var $p = $("#induslrug"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } }); if (localStorage.getItem("totalcarpetcleanDatalrug") != null) { var arr = JSON.parse( localStorage.getItem('totalcarpetcleanDatalrug') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } } } if (localStorage.getItem("datedesccarpetcleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedesccarpetcleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } }else{ } //End setting values in carpet cleaning from storage //setting values in carpentry cleaning from storage if (window.location.href.indexOf("chkout_carpcleaning") != -1) { if (localStorage.getItem("carphoursprice") != null) { var arr = JSON.parse( localStorage.getItem('carphoursprice') ); $.each(arr, function(index, element) { if(index=="total_hours"){ $('#total_hours_indus').val(element); $('.totalcarpetscleaned').text(element+" hour(s)"); //$('.totalcleanersneeded').html(element); var $p = $("#induscarphours"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); }else{ } }); if (localStorage.getItem("totalcarpcleanData") != null) { var arr = JSON.parse( localStorage.getItem('totalcarpcleanData') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } if (localStorage.getItem("datedesccarpcleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedesccarpcleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } } //End setting values in carpentry cleaning from storage //setting values in Plumbing cleaning from storage if (window.location.href.indexOf("chkout_plumbcleaning") != -1) { if (localStorage.getItem("plumbhoursprice") != null) { var arr = JSON.parse( localStorage.getItem('plumbhoursprice') ); $.each(arr, function(index, element) { if(index=="total_hours"){ $('#total_hours_indus').val(element); $('.totalcarpetscleaned').text(element+" hour(s)"); //$('.totalcleanersneeded').html(element); var $p = $("#induscarphours"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); }else{ } }); if (localStorage.getItem("totalplumbcleanData") != null) { var arr = JSON.parse( localStorage.getItem('totalplumbcleanData') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } if (localStorage.getItem("datedescplumbcleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescplumbcleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } } //End setting values in Plumbing cleaning from storage //setting values in Electrical cleaning from storage if (window.location.href.indexOf("chkout_electcleaning") != -1) { if (localStorage.getItem("electhoursprice") != null) { var arr = JSON.parse( localStorage.getItem('electhoursprice') ); $.each(arr, function(index, element) { if(index=="total_hours"){ $('#total_hours_indus').val(element); $('.totalcarpetscleaned').text(element+" hour(s)"); //$('.totalcleanersneeded').html(element); var $p = $("#induscarphours"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); }else{ } }); if (localStorage.getItem("totalelectcleanData") != null) { var arr = JSON.parse( localStorage.getItem('totalelectcleanData') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } if (localStorage.getItem("datedescelectcleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescelectcleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } } //End setting values in Electrical cleaning from storage //setting values in handy cleaning from storage if (window.location.href.indexOf("chkout_handycleaning") != -1||window.location.href.indexOf("chkout_handcleaning2") != -1) { //alert("here"); if (localStorage.getItem("handhoursprice") != null) { var arr = JSON.parse( localStorage.getItem('handhoursprice') ); $.each(arr, function(index, element) { if(index=="total_hours"){ $('#total_hours_indus').val(element); $('.totalcarpetscleaned').text(element+" hour(s)"); //$('.totalcleanersneeded').html(element); var $p = $("#indushandhours"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); }else{ } }); if (localStorage.getItem("totalhandcleanData") != null) { var arr = JSON.parse( localStorage.getItem('totalhandcleanData') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ } }); $('.dsmsg').show(); } if (localStorage.getItem("datedeschandcleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedeschandcleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } } } //End setting values in handy cleaning from storage //setting values in home cleaning chkout from storage if (window.location.href.indexOf("chkout_homecleaning") != -1) { if (localStorage.getItem("cleanerhomecleanData") != null) { var arr = JSON.parse( localStorage.getItem('cleanerhomecleanData') ); $.each(arr, function(index, element) { if(index=="cleaner_price"){ $('#cleaners_price').val(element); $('#cleaners_price_indus').val(element); }else{ $('#total_cleaners').val(element); $('#total_cleaners_indus').val(element); $('.totalcleanersneeded').html(element); var $p = $("#indusclean"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } }); } if (localStorage.getItem("hourscleanDatahour") != null) { var arr = JSON.parse( localStorage.getItem('hourscleanDatahour') ); $.each(arr, function(index, element) { if(index=="hour_price"){ $('#hours_price').val(element); $('#hours_price_indus').val(element); }else{ $('#total_hours').val(element); $('#total_hours_indus').val(element); $('.totalhoursneeded').html(element); var $p = $("#indushours"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); $('.hourstodsp').show(); } }); } if (localStorage.getItem("datedeschomecleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedeschomecleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } if (localStorage.getItem("totalhomecleanData") != null) { var arr = JSON.parse( localStorage.getItem('totalhomecleanData') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else if(index=="material_price"){ $('.materialindus').html('AED'+element); //$('#total_indus').val(element); }else{ if(element==0){ var $p = $("#booking_label_21"); $p.css("background-color","#fcbd1b"); $p.css("color","white"); $('.materialstatus').html("No"); $('#statusofmaterial').val(0); $('#material_status_indus').val(0); }else{ var $p = $("#booking_label_22"); $p.css("background-color","#fcbd1b"); $p.css("color","white"); $('.materialstatus').html("Yes"); $('#statusofmaterial').val(1); $('#material_status_indus').val(1); } } }); } }else{ } //setting values in home cleaning chkout from storage //setting values in maid cleaning chkout from storage if (window.location.href.indexOf("chkout_maidcleaning") != -1) { if (localStorage.getItem("cleanermaidcleanData") != null) { var arr = JSON.parse( localStorage.getItem('cleanermaidcleanData') ); $.each(arr, function(index, element) { if(index=="cleaner_price"){ $('#cleaners_price').val(element); $('#cleaners_price_indus').val(element); }else{ $('#total_cleaners').val(element); $('#total_cleaners_indus').val(element); $('.totalcleanersneeded').html(element); var $p = $("#indusclean"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } }); } if (localStorage.getItem("hours_maidcleanDatahour") != null) { var arr = JSON.parse( localStorage.getItem('hours_maidcleanDatahour') ); $.each(arr, function(index, element) { if(index=="hour_price"){ $('#hours_price').val(element); $('#hours_price_indus').val(element); }else{ $('#total_hours').val(element); $('#total_hours_indus').val(element); $('.totalhoursneeded').html(element); var $p = $("#indushours"+element); $p.css("background-color","#fcbd1b"); $p.css("color","white"); $('.hourstodsp').show(); } }); } if (localStorage.getItem("datedescmaidcleanData") != null) { var arr = JSON.parse( localStorage.getItem('datedescmaidcleanData') ); $.each(arr, function(index, element) { if(index=="date"){ $('#date_indus').val(element); }else{ $('#desc_indus').val(element); } }); } if (localStorage.getItem("totalmaidcleanData") != null) { var arr = JSON.parse( localStorage.getItem('totalmaidcleanData') ); $.each(arr, function(index, element) { if(index=="subtotal"){ $('.subtotalindus').html('AED'+element); $('#subtotal_indus').val(element); }else if(index=="nettopay"){ $('#gtotal').val(element); $('#net_pay_indus').val(element); $('.dsmsg').show(); $('#gtotal').val(element); $('.grandtotal').html('AED'+element); }else if(index=="vat_amount"){ $('.vatindus').html('AED'+element); $('#vat_indus').val(element); }else if(index=="discount"){ $('.discountindus').html('AED'+element); $('#discount_indus').val(element); }else if(index=="total"){ $('.totalamountindus').html('AED'+element); $('#total_indus').val(element); }else{ if(element==0){ var $p = $("#booking_label_21"); $p.css("background-color","#fcbd1b"); $p.css("color","white"); $('.materialstatus').html("No"); $('#statusofmaterial').val(0); $('#material_status_indus').val(0); }else{ var $p = $("#booking_label_22"); $p.css("background-color","#fcbd1b"); $p.css("color","white"); $('.materialstatus').html("Yes"); $('#statusofmaterial').val(1); $('#material_status_indus').val(1); } } }); } }else{ } //setting values in maid cleaning chkout from storage if ( $("#hide_foodprice").exists() ){ if ( $("#hide_foodprice").val()=="yes"){ $(".food-price-wrap").hide(); $(".hide-food-price").hide(); //$(".right-menu-content").hide(); //$("#menu-wrap .grid-1").css({"width":"100%"}); } } $( document ).on( "click", ".close-receipt", function() { close_fb(); }); $( document ).on( "click", "#coapplyt", function() { var coupontxt=$('#coupontxt').val(); var coupontxt_db=$('#voucher_name').val(); var coupon_type=$('#coupon_type_indus').val(); var pay_method= $('input[name="payment_option"]:checked').val(); var delivery_amount=$('#cod_indus_amount').val(); coupontxt = coupontxt.toLowerCase(); coupontxt_db = coupontxt_db.toLowerCase(); if(coupontxt==''){ $('#cpnmsgfail').show(); } else{ if(coupontxt==coupontxt_db){ $('#cpnmsgfail').hide(); var total=$('#total_indus').val(); var subtotal=$('#subtotal_indus').val(); var vat_amount=$('#vat_indus').val(); var discount=$('#discount_indus').val(); var net_pay=$('#net_pay_indus').val(); var net_pay_latest=$('#net_pay_latest').val(); //voucher validations var min_order=parseInt($('#voucher_min_order').val()); var exp=$('#voucher_expiration').val(); var how_many_times_can_used=parseInt($('#voucher_used_once').val()); var used_voucher=parseInt($('#is_voc_used').val()); //var dateEntered = $('#voucher_expiration').val(); var dateEntered= new Date(Date.parse($("#voucher_expiration").val())); var currentDate = new Date(); if (dateEntered > currentDate) { } else { $('#cpnmsgfail').show(); $('#cpnmsgfail').html("Voucher has been Expired"); return false; } //return false; if(net_pay_latest!=""){ if(parseInt(net_pay_latest)>=min_order){ }else{ $('#cpnmsgfail').show(); $('#cpnmsgfail').html('This coupon is applicable on minimum amount of'+min_order+' AED'); //This coupon is applicable on minimum amount of 105 AED return false; } }else{ if(parseInt(net_pay)>=min_order){ }else{ $('#cpnmsgfail').show(); $('#cpnmsgfail').html("Minimum order is "+min_order+" for voucher"); return false; } } if(how_many_times_can_used==2){ if(used_voucher==1){ $('#cpnmsgfail').show(); $('#cpnmsgfail').html("Voucher is already used"); return false; } } //end voucher validations if(coupon_type=="percentage"){ //alert("here"); var voucheramount=$('#voucher_amount').val(); var vat=$('#vat_value').val(); //var discount_percent=$('#discount_indus').val(); //alert(total); //alert(voucheramount); discount=total*voucheramount/100; discount=discount.toFixed(2); //alert(discount); //alert(discount); $('#coupon_applied_indus').val(discount); $('.discountindus').html('AED'+discount); $('#discount_latest').val(discount); // var discount=$('#discount_latest').val(); // alert(discount); if(pay_method=="6"){ $('.cod_div').show(); $('.codchargestxt').html('AED'+delivery_amount); subtotal=(total-discount)+parseFloat(delivery_amount); }else{ $('.cod_div').hide(); subtotal=total-discount; } subtotal=subtotal.toFixed(2); $('#subtotal_latest').val(subtotal); $('.subtotalindus').html('AED'+subtotal); //alert(vat); vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('#vat_amount_latest').val(vat_amount); $('.vatindus').html('AED'+vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); $('#net_pay_latest').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').hide(); $('#cpnmsgsuc').show(); $('#cpnrmv').show(); $('#coupon_applied_indus').val(1); $("#coupontxt").attr('disabled','disabled'); } if(coupon_type=="fixed amount"){ var voucheramount=$('#voucher_amount').val(); var vat=$('#vat_value').val(); //var discount_percent=$('#discount_indus').val(); //alert(total); //alert(voucheramount); discount=parseFloat(voucheramount); //alert(discount); discount=discount.toFixed(2); $('#coupon_applied_indus').val(discount); //alert(discount); //alert(discount); $('.discountindus').html('AED'+discount); $('#discount_latest').val(discount); if(pay_method=="6"){ $('.cod_div').show(); $('.codchargestxt').html('AED'+delivery_amount); subtotal=(total-discount)+parseFloat(delivery_amount); }else{ $('.cod_div').hide(); subtotal=total-discount; } //subtotal=total-discount; subtotal=subtotal.toFixed(2); $('#subtotal_latest').val(subtotal); $('.subtotalindus').html('AED'+subtotal); //alert(vat); vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('#vat_amount_latest').val(vat_amount); $('.vatindus').html('AED'+vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); $('#net_pay_latest').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').hide(); $('#cpnrmv').show(); $('#cpnmsgsuc').show(); $('#coupon_applied_indus').val(1); $("#coupontxt").attr('disabled','disabled'); } }else{ $('#cpnmsgfail').show(); } } }); $( document ).on( "click", "#cpnrmv", function() { //alert("here"); var pay_method= $('input[name="payment_option"]:checked').val(); var delivery_amount=$('#cod_indus_amount').val(); var total=$('#total_indus').val(); var subtotal=$('#subtotal_indus').val(); var vat_amount=$('#vat_indus').val(); var discount=$('#discount_indus').val(); var net_pay=$('#net_pay_indus').val(); var vat=$('#vat_value').val(); //alert(discount); $('#discount_latest').val(discount); $('.discountindus').html('AED'+discount); if(pay_method=="6"){ $('.cod_div').show(); $('.codchargestxt').html('AED'+delivery_amount); subtotal=(total-discount)+parseFloat(delivery_amount); }else{ $('.cod_div').hide(); subtotal=total-discount; } //subtotal=total-discount; subtotal=subtotal.toFixed(2); $('#subtotal_latest').val(subtotal); $('.subtotalindus').html('AED'+subtotal); vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('#vat_amount_latest').val(vat_amount); $('.vatindus').html('AED'+vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); $('#net_pay_latest').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('#coupon_applied_indus').val(0); $('.dsmsg').show(); $('#cpnrmv').hide(); $('#cpnmsgsuc').hide(); $('#coupon_applied_indus').val("0"); $("#coupontxt").removeAttr('disabled'); }); $( document ).on( "click", ".payoption", function() { var pay_method= $('input[name="payment_option"]:checked').val(); var coupon_applied=$('#coupon_applied_indus').val(); var delivery_amount=$('#cod_indus_amount').val(); var coupon_type=$('#coupon_type_indus').val(); if(pay_method=="6"){ $('.cod_div').show(); if(coupon_applied=="1"){ var total=$('#total_indus').val(); var subtotal=$('#subtotal_indus').val(); var vat_amount=$('#vat_indus').val(); var discount=$('#discount_indus').val(); var net_pay=$('#net_pay_indus').val(); if(coupon_type=="percentage"){ var voucheramount=$('#voucher_amount').val(); var vat=$('#vat_value').val(); discount=total*voucheramount/100; discount=discount.toFixed(2); //$('#coupon_applied_indus').val(discount); $('.discountindus').html('AED'+discount); $('#discount_latest').val(discount); $('.codchargestxt').html('AED'+delivery_amount); subtotal=(total-discount)+parseFloat(delivery_amount); subtotal=subtotal.toFixed(2); $('#subtotal_latest').val(subtotal); $('.subtotalindus').html('AED'+subtotal); vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('#vat_amount_latest').val(vat_amount); $('.vatindus').html('AED'+vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); $('#net_pay_latest').val(nettopay); $('.grandtotal').html('AED'+nettopay); } if(coupon_type=="fixed amount"){ var voucheramount=$('#voucher_amount').val(); var vat=$('#vat_value').val(); //var discount_percent=$('#discount_indus').val(); //alert(total); //alert(voucheramount); discount=parseFloat(voucheramount); discount=discount.toFixed(2); //$('#coupon_applied_indus').val(discount); //alert(discount); $('.discountindus').html('AED'+discount); $('#discount_latest').val(discount); $('.codchargestxt').html('AED'+delivery_amount); subtotal=(total-discount)+parseFloat(delivery_amount); subtotal=subtotal.toFixed(2); $('#subtotal_latest').val(subtotal); $('.subtotalindus').html('AED'+subtotal); //alert(vat); vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('#vat_amount_latest').val(vat_amount); $('.vatindus').html('AED'+vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); $('#net_pay_latest').val(nettopay); $('.grandtotal').html('AED'+nettopay); } }else{ var total=$('#total_indus').val(); var subtotal=$('#subtotal_indus').val(); var vat_amount=$('#vat_indus').val(); var discount=$('#discount_indus').val(); var net_pay=$('#net_pay_indus').val(); var vat=$('#vat_value').val(); //alert(discount); $('.discountindus').html('AED'+discount); $('#discount_latest').val(discount); $('.codchargestxt').html('AED'+delivery_amount); subtotal=(total-discount)+parseFloat(delivery_amount); subtotal=subtotal.toFixed(2); $('#subtotal_latest').val(subtotal); $('.subtotalindus').html('AED'+subtotal); vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('#vat_amount_latest').val(vat_amount); $('.vatindus').html('AED'+vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); $('#net_pay_latest').val(nettopay); $('.grandtotal').html('AED'+nettopay); } }else{ $('.cod_div').hide(); if(coupon_applied=="1"){ var total=$('#total_indus').val(); var subtotal=$('#subtotal_indus').val(); var vat_amount=$('#vat_indus').val(); var discount=$('#discount_indus').val(); var net_pay=$('#net_pay_indus').val(); if(coupon_type=="percentage"){ var voucheramount=$('#voucher_amount').val(); var vat=$('#vat_value').val(); discount=total*voucheramount/100; discount=discount.toFixed(2); //$('#coupon_applied_indus').val(discount); $('#discount_latest').val(discount); $('.discountindus').html('AED'+discount); $('.codchargestxt').html('AED'+delivery_amount); $('#cod_div').hide(); subtotal=(total-discount); subtotal=subtotal.toFixed(2); $('#subtotal_latest').val(subtotal); $('.subtotalindus').html('AED'+subtotal); vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('#vat_amount_latest').val(vat_amount); $('.vatindus').html('AED'+vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); $('#net_pay_latest').val(nettopay); $('.grandtotal').html('AED'+nettopay); } if(coupon_type=="fixed amount"){ var voucheramount=$('#voucher_amount').val(); var vat=$('#vat_value').val(); //var discount_percent=$('#discount_indus').val(); //alert(total); //alert(voucheramount); discount=total-voucheramount; discount=discount.toFixed(2); //$('#coupon_applied_indus').val(discount); //alert(discount); $('#discount_latest').val(discount); $('.discountindus').html('AED'+discount); $('.codchargestxt').html('AED'+delivery_amount); subtotal=(total-discount)+parseFloat(delivery_amount); subtotal=subtotal.toFixed(2); $('#subtotal_latest').val(subtotal); $('.subtotalindus').html('AED'+subtotal); //alert(vat); vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('#vat_amount_latest').val(vat_amount); $('.vatindus').html('AED'+vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); $('#net_pay_latest').val(nettopay); $('.grandtotal').html('AED'+nettopay); } }else{ var total=$('#total_indus').val(); var subtotal=$('#subtotal_indus').val(); var vat_amount=$('#vat_indus').val(); var discount=$('#discount_indus').val(); var net_pay=$('#net_pay_indus').val(); var vat=$('#vat_value').val(); //alert(discount); $('.discountindus').html('AED'+discount); $('#discount_latest').val(discount); subtotal=total-discount; subtotal=subtotal.toFixed(2); $('#subtotal_latest').val(subtotal); $('.subtotalindus').html('AED'+subtotal); vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('#vat_amount_latest').val(vat_amount); $('.vatindus').html('AED'+vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); $('#net_pay_latest').val(nettopay); $('.grandtotal').html('AED'+nettopay); } } }); if ( $(".mobile_inputs").exists()){ if ( $("#mobile_country_code").exists()){ $(".mobile_inputs").intlTelInput({ autoPlaceholder: false, defaultCountry: $("#mobile_country_code").val(), autoHideDialCode:false, nationalMode:false, autoFormat:false, //onlyCountries: ["ph"], utilsScript: sites_url+"/assets/vendor/intel/lib/libphonenumber/build/utils.js" }); } else { $(".mobile_inputs").intlTelInput({ autoPlaceholder: false, autoHideDialCode:false, nationalMode:false, autoFormat:false, //onlyCountries: ["ph"], utilsScript: sites_url+"/assets/vendor/intel/lib/libphonenumber/build/utils.js", }); } } $( document ).on( "click", ".ui-timepicker a", function() { if ( $("#frm-book").exists()){ $("#booking_time").removeAttr("style"); var parent=$("#booking_time").parent(); parent.find(".form-error").remove(); } }); $( document ).on( "click", ".beforeloginchkhome", function() { $('#show_valiation_msg').hide(); var total=$('#gtotal').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; var description=$('#description').val(); //alert(description); if(total==''){ $('#show_valiation_msg').show(); return false; } if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedeschomecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedeschomecleanData", JSON.stringify(datedeschomecleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_sofaclean", function() { $('#show_valiation_msg').hide(); var total=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescsofacleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescsofacleanData", JSON.stringify(datedescsofacleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".resch", function() { //alert("here"); //$('#reschedule_modal').modal('toggle'); $('#reschedule_modal').modal('show'); //$('reschedule_modal').show(); }); $( document ).on( "click", "#close_login", function() { //alert("here"); //$('#reschedule_modal').modal('toggle'); $('#reschedule_modal').modal('hide'); $('#reschedule_modal').modal('close'); $('#reschedule_modal').hide(); //$('reschedule_modal').show(); }); $( document ).on( "click", ".edit-order-user", function() { //alert($this.data()); //$('#reschedule_modal').modal('toggle'); //$('#cancel_modal').modal('toggle'); $('#cancel_modal').modal('show'); var id=$(this).data("id"); $("#order_id").val(id); //$('reschedule_modal').show(); }); $( document ).on( "click", "#close_cancel", function() { //alert("here"); //$('#reschedule_modal').modal('toggle'); $('#cancel_modal').modal('hide'); $('#cancel_modal').modal('close'); $('#cancel_modal').hide(); //$('reschedule_modal').show(); }); $( document ).on( "click", ".beforeloginchkhome_paintclean", function() { $('#show_valiation_msg').hide(); var total=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescpaintcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescpaintcleanData", JSON.stringify(datedescpaintcleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_remodelclean", function() { $('#show_valiation_msg').hide(); var total=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescremodelcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescremodelcleanData", JSON.stringify(datedescremodelcleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_sanitclean", function() { $('#show_valiation_msg').hide(); var total=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); //alert(description); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } if(total==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescsanitcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescsanitcleanData", JSON.stringify(datedescsanitcleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_deepcleanorder", function() { $('#show_valiation_msg').hide(); var total=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); //alert(description); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } if(total==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedesccleanData_deepcleanorder = { date: datechk, description_home: description, }; localStorage.setItem("datedesccleanData_deepcleanorder", JSON.stringify(datedesccleanData_deepcleanorder)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_pestclean", function() { $('#show_valiation_msg').hide(); var total=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); //alert(description); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } if(total==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescpestcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescpestcleanData", JSON.stringify(datedescpestcleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_carpetclean", function() { $('#show_valiation_msg').hide(); var total=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedesccarpetcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedesccarpetcleanData", JSON.stringify(datedesccarpetcleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_carpclean", function() { $('#show_valiation_msg').hide(); var total=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedesccarpcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedesccarpcleanData", JSON.stringify(datedesccarpcleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_plumbclean", function() { $('#show_valiation_msg').hide(); var total=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescplumbcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescplumbcleanData", JSON.stringify(datedescplumbcleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_electclean", function() { $('#show_valiation_msg').hide(); var total=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescelectcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescelectcleanData", JSON.stringify(datedescelectcleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_maidclean", function() { $('#show_valiation_msg').hide(); var total=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescmaidcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescmaidcleanData ", JSON.stringify(datedescmaidcleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_handclean", function() { $('#show_valiation_msg').hide(); var total=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); //alert(description); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } if(total==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedeschandcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedeschandcleanData", JSON.stringify(datedeschandcleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_deepclean", function() { $('#show_valiation_msg').hide(); var type=$('#cleantype').val(); var total_size=$('#cleansize').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } /*if(total_size==''){ $('#show_valiation_msg').show(); return false; }*/ if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescdeepcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescdeepcleanData", JSON.stringify(datedescdeepcleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_moveclean", function() { $('#show_valiation_msg').hide(); var type=$('#cleantype').val(); var type1=$('#mov_type').val(); var total_size=$('#cleansize').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(type1==''){ $('#show_valiation_msg').show(); return false; } if(total_size==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescmovecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescmovecleanData", JSON.stringify(datedescmovecleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_storageclean", function() { $('#show_valiation_msg').hide(); var type=$('#cleantype').val(); var type1=$('#mov_type').val(); var total_size=$('#cleansize').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(type1==''){ $('#show_valiation_msg').show(); return false; } if(total_size==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescstoragecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescstoragecleanData", JSON.stringify(datedescstoragecleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_paintquoteclean", function() { $('#show_valiation_msg').hide(); var type=$('#cleantype').val(); var total_size=$('#cleansize').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } /*if(total_size==''){ $('#show_valiation_msg').show(); return false; }*/ if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescpaintquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescpaintquotecleanData", JSON.stringify(datedescpaintquotecleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_remodelquoteclean", function() { $('#show_valiation_msg').hide(); var type=$('#cleantype').val(); var total_size=$('#cleansize').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(total_size==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescremodelquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescremodelquotecleanData", JSON.stringify(datedescremodelquotecleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_carpcleanquote", function() { $('#show_valiation_msg').hide(); var type=$('#carp_ser_type').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedesccarpquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedesccarpquotecleanData", JSON.stringify(datedesccarpquotecleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_accleanquote", function() { $('#show_valiation_msg').hide(); var type=$('#ac_ser_type').val(); var type1=$('#ac_type').val(); var type2=$('#ac_unit').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(type1==''){ $('#show_valiation_msg').show(); return false; } if(type2==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescacpquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescacpquotecleanData", JSON.stringify(datedescacpquotecleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_pestcleanquote", function() { $('#show_valiation_msg').hide(); var type=$('#ac_ser_type').val(); var type1=$('#ac_type').val(); var type2=$('#ac_unit').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(type1==''){ $('#show_valiation_msg').show(); return false; } /*if(type2==''){ $('#show_valiation_msg').show(); return false; }*/ if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescpestquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescpestquotecleanData", JSON.stringify(datedescpestquotecleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_electcleanquote", function() { $('#show_valiation_msg').hide(); var type=$('#ac_ser_type').val(); var type1=$('#ac_type').val(); var type2=$('#ac_unit').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(type1==''){ $('#show_valiation_msg').show(); return false; } if(type2==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescelectquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescelectquotecleanData", JSON.stringify(datedescelectquotecleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_plumbcleanquote", function() { $('#show_valiation_msg').hide(); var type=$('#ac_ser_type').val(); var type1=$('#ac_type').val(); var type2=$('#ac_unit').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(type1==''){ $('#show_valiation_msg').show(); return false; } if(type2==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescplumbquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescplumbquotecleanData", JSON.stringify(datedescplumbquotecleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_storagecleanquote", function() { $('#show_valiation_msg').hide(); var type=$('#ac_ser_type').val(); var type1=$('#ac_type').val(); var type2=$('#ac_unit').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(type1==''){ $('#show_valiation_msg').show(); return false; } if(type2==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescappliancequotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescappliancequotecleanData", JSON.stringify(datedescappliancequotecleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_junkquote", function() { $('#show_valiation_msg').hide(); var type=$('#item_type').val(); var type1=$('#item_need').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(type1==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescitemquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescitemquotecleanData", JSON.stringify(datedescitemquotecleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_itemquote", function() { $('#show_valiation_msg').hide(); var type=$('#item_type').val(); var type1=$('#item_need').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(type1==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescitemquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescitemquotecleanData", JSON.stringify(datedescitemquotecleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_gardencleanquote", function() { $('#show_valiation_msg').hide(); var type=$('#garden_type').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescgardenquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescgardenquotecleanData", JSON.stringify(datedescgardenquotecleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_handcleanquote", function() { $('#show_valiation_msg').hide(); var type=$('#carp_ser_type').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedeschandquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedeschandquotecleanData", JSON.stringify(datedeschandquotecleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".beforeloginchkhome_poolclean", function() { $('#show_valiation_msg').hide(); var type=$('#poolcleantype').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescpoolcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescpoolcleanData", JSON.stringify(datedescpoolcleanData)); $('#staticBackdrop').modal('toggle'); $('#staticBackdrop').modal('show'); $('staticBackdrop').show(); }); $( document ).on( "click", ".loginchkoutpagehome", function() { var total=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedeschomecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedeschomecleanData", JSON.stringify(datedeschomecleanData)); window.location.href = window.location.origin+"/store/chkout_homecleaning2"; }); $( document ).on( "click", ".loginchkoutpagehome_maid", function() { var total=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescmaidcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescmaidcleanData", JSON.stringify(datedescmaidcleanData)); window.location.href = window.location.origin+"/store/chkout_maidcleaning2"; }); $( document ).on( "click", ".loginchkoutpagehome_deepclean", function() { var total_size=$('#cleansize').val(); var type=$('#cleantype').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); /*if(total_size==''){ $('#show_valiation_msg').show(); return false; }*/ if(type==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescdeepcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescdeepcleanData", JSON.stringify(datedescdeepcleanData)); window.location.href = window.location.origin+"/store/chkout_deepcleaning2"; }); $( document ).on( "click", ".loginchkoutpagehome_moveclean", function() { var total_size=$('#cleansize').val(); var type=$('#cleantype').val(); var type1=$('#mov_type').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total_size==''){ $('#show_valiation_msg').show(); return false; } if(type==''){ $('#show_valiation_msg').show(); return false; } if(type1==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescmovecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescmovecleanData", JSON.stringify(datedescmovecleanData)); window.location.href = window.location.origin+"/store/chkout_movecleaning2"; }); $( document ).on( "click", ".loginchkoutpagehome_storageclean", function() { var total_size=$('#cleansize').val(); var type=$('#cleantype').val(); var type1=$('#mov_type').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total_size==''){ $('#show_valiation_msg').show(); return false; } if(type==''){ $('#show_valiation_msg').show(); return false; } if(type1==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescstoragecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescstoragecleanData", JSON.stringify(datedescstoragecleanData)); window.location.href = window.location.origin+"/store/chkout_storagecleaning2"; }); $( document ).on( "click", ".loginchkoutpagehome_paintcleanquote", function() { var total_size=$('#cleansize').val(); var type=$('#cleantype').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); /*if(total_size==''){ $('#show_valiation_msg').show(); return false; }*/ if(type==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescpaintquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescpaintquotecleanData", JSON.stringify(datedescpaintquotecleanData)); window.location.href = window.location.origin+"/store/chkout_paintquotecleaning2"; }); $( document ).on( "click", ".loginchkoutpagehome_remodelcleanquote", function() { var total_size=$('#cleansize').val(); var type=$('#cleantype').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total_size==''){ $('#show_valiation_msg').show(); return false; } if(type==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescremodelquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescremodelquotecleanData", JSON.stringify(datedescremodelquotecleanData)); window.location.href = window.location.origin+"/store/chkout_remodelquotecleaning2"; }); $( document ).on( "click", ".loginchkoutpagehome_carpclean_quote", function() { var type=$('#carp_ser_type').val(); var datechk=$('#date').val(); var description=$('#description').val(); //alert(description); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } if(type==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedesccarpquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedesccarpquotecleanData", JSON.stringify(datedesccarpquotecleanData)); window.location.href = window.location.origin+"/store/chkout_carpcleaning2quote"; }); $( document ).on( "click", ".loginchkoutpagehome_acclean_quote", function() { var type=$('#ac_ser_type').val(); var type1=$('#ac_type').val(); var type2=$('#ac_unit').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(type1==''){ $('#show_valiation_msg').show(); return false; } if(type2==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescacpquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescacpquotecleanData", JSON.stringify(datedescacpquotecleanData)); window.location.href = window.location.origin+"/store/chkout_accleaning2quote"; }); $( document ).on( "click", ".loginchkoutpagehome_pestclean_quote", function() { var type=$('#ac_ser_type').val(); var type1=$('#ac_type').val(); var type2=$('#ac_unit').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(type1==''){ $('#show_valiation_msg').show(); return false; } /*if(type2==''){ $('#show_valiation_msg').show(); alert("3"); return false; }*/ if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescpestquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescpestquotecleanData", JSON.stringify(datedescpestquotecleanData)); window.location.href = window.location.origin+"/store/chkout_pestcleaning2quote"; }); $( document ).on( "click", ".loginchkoutpagehome_electclean_quote", function() { var type=$('#ac_ser_type').val(); var type1=$('#ac_type').val(); var type2=$('#ac_unit').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(type1==''){ $('#show_valiation_msg').show(); return false; } if(type2==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescelectquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescelectquotecleanData", JSON.stringify(datedescelectquotecleanData)); window.location.href = window.location.origin+"/store/chkout_electricalcleaning2quote"; }); $( document ).on( "click", ".loginchkoutpagehome_plumbclean_quote", function() { var type=$('#ac_ser_type').val(); var type1=$('#ac_type').val(); var type2=$('#ac_unit').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(type1==''){ $('#show_valiation_msg').show(); return false; } if(type2==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescplumbquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescplumbquotecleanData", JSON.stringify(datedescplumbquotecleanData)); window.location.href = window.location.origin+"/store/chkout_plumbingcleaning2quote"; }); $( document ).on( "click", ".loginchkoutpagehome_storageclean_quote", function() { var type=$('#ac_ser_type').val(); var type1=$('#ac_type').val(); var type2=$('#ac_unit').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(type1==''){ $('#show_valiation_msg').show(); return false; } if(type2==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescappliancequotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescappliancequotecleanData", JSON.stringify(datedescappliancequotecleanData)); window.location.href = window.location.origin+"/store/chkout_appliancecleaning2quote"; }); $( document ).on( "click", ".loginchkoutpagehome_junk_quote", function() { var type=$('#item_type').val(); var type1=$('#item_need').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(type1==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescitemquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescjunkquotecleanData", JSON.stringify(datedescitemquotecleanData)); window.location.href = window.location.origin+"/store/chkout_junk2quote"; }); $( document ).on( "click", ".loginchkoutpagehome_item_quote", function() { var type=$('#item_type').val(); var type1=$('#item_need').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(type1==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescitemquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescitemquotecleanData", JSON.stringify(datedescitemquotecleanData)); window.location.href = window.location.origin+"/store/chkout_item2quote"; }); $( document ).on( "click", ".loginchkoutpagehome_gardenclean_quote", function() { var type=$('#garden_type').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(type==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescgardenquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescgardenquotecleanData", JSON.stringify(datedescgardenquotecleanData)); window.location.href = window.location.origin+"/store/chkout_gardencleaning2quote"; }); $( document ).on( "click", ".loginchkoutpagehome_handclean_quote", function() { var type=$('#carp_ser_type').val(); var datechk=$('#date').val(); var description=$('#description').val(); //alert(description); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } if(type==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedeschandquotecleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedeschandquotecleanData", JSON.stringify(datedeschandquotecleanData)); window.location.href = window.location.origin+"/store/chkout_handycleaning2_quote"; }); $( document ).on( "click", ".loginchkoutpagehome_poolclean", function() { var type=$('#poolcleantype').val(); var datechk=$('#date').val(); var description=$('#description').val(); //alert(description); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } if(type==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescpoolcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescpoolcleanData", JSON.stringify(datedescpoolcleanData)); window.location.href = window.location.origin+"/store/chkout_poolcleaning2"; }); $( document ).on( "click", ".loginchkoutpagehome_sofaclean", function() { var total_size=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total_size==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescsofacleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescsofacleanData", JSON.stringify(datedescsofacleanData)); window.location.href = window.location.origin+"/store/chkout_sofacleaning2"; }); $( document ).on( "click", ".loginchkoutpagehome_paintclean", function() { var total_size=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total_size==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescpaintcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescpaintcleanData", JSON.stringify(datedescpaintcleanData)); window.location.href = window.location.origin+"/store/chkout_paintcleaning2"; }); $( document ).on( "click", ".loginchkoutpagehome_remodelclean", function() { var total_size=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total_size==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescremodelcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescremodelcleanData", JSON.stringify(datedescremodelcleanData)); window.location.href = window.location.origin+"/store/chkout_remodelcleaning2"; }); $( document ).on( "click", ".loginchkoutpagehome_sanitclean", function() { var total_size=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total_size==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescsanitcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescsanitcleanData", JSON.stringify(datedescsanitcleanData)); window.location.href = window.location.origin+"/store/chkout_sanitcleaning2"; }); $( document ).on( "click", ".loginchkoutpagehome_deepcleanorder", function() { var total_size=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); //alert(description); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } if(total_size==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedesccleanData_deepcleanorder = { date: datechk, description_home: description, }; localStorage.setItem("datedesccleanData_deepcleanorder", JSON.stringify(datedesccleanData_deepcleanorder)); window.location.href = window.location.origin+"/store/deepservorder2"; }); $( document ).on( "click", ".loginchkoutpagehome_pestclean", function() { var total_size=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total_size==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescpestcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescpestcleanData", JSON.stringify(datedescpestcleanData)); window.location.href = window.location.origin+"/store/chkout_pestcleaning2"; }); $( document ).on( "click", ".loginchkoutpagehome_carpetclean", function() { var total_size=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total_size==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedesccarpetcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedesccarpetcleanData", JSON.stringify(datedesccarpetcleanData)); window.location.href = window.location.origin+"/store/chkout_carpetcleaning2"; }); $( document ).on( "click", ".loginchkoutpagehome_carpclean", function() { var total_size=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total_size==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedesccarpcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedesccarpcleanData", JSON.stringify(datedesccarpcleanData)); window.location.href = window.location.origin+"/store/chkout_carpcleaning2"; }); $( document ).on( "click", ".loginchkoutpagehome_plumbclean", function() { var total_size=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total_size==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescplumbcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescplumbcleanData", JSON.stringify(datedescplumbcleanData)); window.location.href = window.location.origin+"/store/chkout_plumbcleaning2"; }); $( document ).on( "click", ".loginchkoutpagehome_electclean", function() { var total_size=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total_size==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedescelectcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedescelectcleanData", JSON.stringify(datedescelectcleanData)); window.location.href = window.location.origin+"/store/chkout_electcleaning2"; }); $( document ).on( "click", ".loginchkoutpagehome_handclean", function() { var total_size=$('#gtotal').val(); var datechk=$('#date').val(); var description=$('#description').val(); var date_dsp=$('#date').val(); var time_dsp=$('#cars').val(); var datechk=date_dsp+"T"+time_dsp; if(time_dsp=='n/a'){ $('#show_valiation_msg').show(); return false; } //alert(description); if(total_size==''){ $('#show_valiation_msg').show(); return false; } if(datechk==''){ $('#show_valiation_msg').show(); return false; } const datedeschandcleanData = { date: datechk, description_home: description, }; localStorage.setItem("datedeschandcleanData", JSON.stringify(datedeschandcleanData)); window.location.href = window.location.origin+"/store/chkout_handcleaning2"; }); $( document ).on( "click", ".cleanersid", function() { var id=$(this).data("id"); var price=$(this).data("price"); //alert(price); $('#cleaners_price').val(price); $('#total_cleaners').val(id); $('.totalcleanersneeded').html(id); //setting local storage const cleanerhomecleanData = { cleaner_price: price, total_cleaners: id, }; localStorage.setItem("cleanerhomecleanData", JSON.stringify(cleanerhomecleanData)); //setting local storage $("[id^='indusclean']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indusclean"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); var $p = $("#indusclean"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); //TOTAL CALCULATION var status_material=$('#statusofmaterial').val(); var cleaner_price=$('#cleaners_price').val(); var total_cleaners=parseInt($('#total_cleaners').val()); var hours_price=$('#hours_price').val(); if((cleaner_price!=""||cleaner_price!=0) &&(hours_price!=""||hours_price!=0)){ if(status_material==1){ var cleaner_price=$('#cleaners_price').val(); var hours_price=$('#hours_price').val(); var per_hours_price=$('#perhourprice').val(); var total_hours=$('#total_hours').val(); var vat=$('#vat').val(); var hours_price_total=parseInt((per_hours_price*total_hours)*total_cleaners); var total=parseInt(cleaner_price)+parseInt(total_cleaners*hours_price)+parseInt((hours_price_total)); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); $('.materialindus').html('AED'+hours_price_total); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); const totalhomecleanData = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, material:status_material, nettopay:nettopay, material_price:hours_price_total, }; localStorage.setItem("totalhomecleanData", JSON.stringify(totalhomecleanData)); }else{ var cleaner_price=$('#cleaners_price').val(); var hours_price=$('#hours_price').val(); var vat=$('#vat').val(); var total=parseInt(cleaner_price)+parseInt(total_cleaners*hours_price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); $('.materialindus').html('AED0'); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); const totalhomecleanData = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, material:status_material, nettopay:nettopay, material_price:0, }; localStorage.setItem("totalhomecleanData", JSON.stringify(totalhomecleanData)); } } //TOTAL CALCULATION ENDS }); $( document ).on( "click", ".cleanersid_maid", function() { var id=$(this).data("id"); var price=$(this).data("price"); //alert(price); $('#cleaners_price').val(price); $('#total_cleaners').val(id); $('.totalcleanersneeded').html(id); //setting local storage const cleanermaidcleanData = { cleaner_price: price, total_cleaners: id, }; localStorage.setItem("cleanermaidcleanData", JSON.stringify(cleanermaidcleanData)); //setting local storage $("[id^='indusclean']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indusclean"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); var $p = $("#indusclean"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); //TOTAL CALCULATION var status_material=$('#statusofmaterial').val(); var cleaner_price=$('#cleaners_price').val(); var hours_price=$('#hours_price').val(); var total_cleaners=parseInt($('#total_cleaners').val()); if((cleaner_price!=""||cleaner_price!=0) &&(hours_price!=""||hours_price!=0)){ if(status_material==1){ var cleaner_price=$('#cleaners_price').val(); var hours_price=$('#hours_price').val(); var per_hours_price=$('#perhourprice').val(); var total_hours=$('#total_hours').val(); var vat=$('#vat').val(); var total=parseInt(cleaner_price)+parseInt(total_cleaners*hours_price)+parseInt((per_hours_price*total_hours)); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); const totalmaidcleanData = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, material:status_material, nettopay:nettopay, }; localStorage.setItem("totalmaidcleanData", JSON.stringify(totalmaidcleanData)); }else{ var cleaner_price=$('#cleaners_price').val(); var hours_price=$('#hours_price').val(); var vat=$('#vat').val(); var total=parseInt(cleaner_price)+parseInt(total_cleaners*hours_price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); const totalmaidcleanData = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, material:status_material, nettopay:nettopay, }; localStorage.setItem("totalmaidcleanData", JSON.stringify(totalmaidcleanData)); } } //TOTAL CALCULATION ENDS }); $( document ).on( "click", ".hoursid", function() { var id=$(this).data("id"); var price=$(this).data("price"); //alert(price); $('#hours_price').val(price); $('#total_hours').val(id); $('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const hourscleanDatahour = { hour_price: price, total_hours: id, }; localStorage.setItem("hourscleanDatahour", JSON.stringify(hourscleanDatahour)); //setting local storage var count_index=0; $("[id^='indushours']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indushours"+index_id); $p.css("background-color","white"); $p.css("color","black"); count_index=index_id; }); var index_id=count_index+1; var $last_hours = $("#indushours"+index_id); $last_hours.css("background-color","white"); $last_hours.css("color","black"); var $p = $("#indushours"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); //TOTAL CALCULATION var status_material=$('#statusofmaterial').val(); var total_cleaners_indus=parseInt($('#total_cleaners').val()); //alert(total_cleaners_indus); //alert(status_material); if(status_material==1){ var cleaner_price=$('#cleaners_price').val(); var hours_price=$('#hours_price').val(); var per_hours_price=$('#perhourprice').val(); var total_hours=$('#total_hours').val(); var vat=$('#vat').val(); var hours_price_total=parseInt((per_hours_price*total_hours)*total_cleaners_indus); var total=parseInt(cleaner_price)+parseInt(total_cleaners_indus*hours_price)+parseInt((hours_price_total)); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); $('.materialindus').html('AED'+hours_price_total); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalhomecleanData = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, material:status_material, nettopay:nettopay, material_price:hours_price_total, }; localStorage.setItem("totalhomecleanData", JSON.stringify(totalhomecleanData)); }else{ var cleaner_price=$('#cleaners_price').val(); var hours_price=$('#hours_price').val(); var vat=$('#vat').val(); var total=parseInt(cleaner_price)+parseInt(total_cleaners_indus*hours_price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); $('.materialindus').html('AED0'); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); const totalhomecleanData = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, material:status_material, nettopay:nettopay, material_price:0, }; localStorage.setItem("totalhomecleanData", JSON.stringify(totalhomecleanData)); } //TOTAL CALCULATIONENDS }); $( document ).on( "click", ".hoursid_maid", function() { var id=$(this).data("id"); var price=$(this).data("price"); //alert(price); $('#hours_price').val(price); $('#total_hours').val(id); $('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const hours_maidcleanDatahour = { hour_price: price, total_hours: id, }; localStorage.setItem("hours_maidcleanDatahour", JSON.stringify(hours_maidcleanDatahour)); //setting local storage var count_index=0; $("[id^='indushours']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indushours"+index_id); $p.css("background-color","white"); $p.css("color","black"); count_index=index_id; }); var index_id=count_index+1; var $last_hours = $("#indushours"+index_id); $last_hours.css("background-color","white"); $last_hours.css("color","black"); var $p = $("#indushours"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); //TOTAL CALCULATION var status_material=$('#statusofmaterial').val(); var total_cleaners=parseInt($('#total_cleaners').val()); if(status_material==1){ var cleaner_price=$('#cleaners_price').val(); var hours_price=$('#hours_price').val(); var per_hours_price=$('#perhourprice').val(); var total_hours=$('#total_hours').val(); var vat=$('#vat').val(); var total=parseInt(cleaner_price)+parseInt(total_cleaners*hours_price)+parseInt((per_hours_price*total_hours)); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalmaidcleanData = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, material:status_material, nettopay:nettopay, }; localStorage.setItem("totalmaidcleanData", JSON.stringify(totalmaidcleanData)); }else{ var cleaner_price=$('#cleaners_price').val(); var hours_price=$('#hours_price').val(); var vat=$('#vat').val(); var total=parseInt(cleaner_price)+parseInt(total_cleaners*hours_price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); const totalmaidcleanData = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, material:status_material, nettopay:nettopay, }; localStorage.setItem("totalmaidcleanData", JSON.stringify(totalmaidcleanData)); } //TOTAL CALCULATIONENDS }); $( document ).on( "click", ".mrugid", function() { var id=$(this).data("id"); var price=$(this).data("price"); //alert(price); // $('#shampoo_price').val(price); //$('#total_shampoo').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const mrugpieceprice = { rug_price: price, total_pieces: id, }; localStorage.setItem("mrugpieceprice", JSON.stringify(mrugpieceprice)); //setting local storage $("[id^='indusmrug']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indusmrug"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); var $p = $("#indusmrug"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); $('.totalcarpetscleaned').text(id+" piece(s)"); var vat=$('#vat').val(); var total=parseInt(price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalcarpetcleanDatamrug = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalcarpetcleanDatamrug", JSON.stringify(totalcarpetcleanDatamrug)); //TOTAL CALCULATIONENDS }); $( document ).on( "click", ".lrugid", function() { var id=$(this).data("id"); var price=$(this).data("price"); //alert(price); // $('#shampoo_price').val(price); //$('#total_shampoo').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const lrugpieceprice = { rug_price: price, total_pieces: id, }; localStorage.setItem("lrugpieceprice", JSON.stringify(lrugpieceprice)); //setting local storage $("[id^='induslrug']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#induslrug"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); var $p = $("#induslrug"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); $('.totalcarpetscleaned').text(id+" piece(s)"); var vat=$('#vat').val(); var total=parseInt(price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalcarpetcleanDatalrug = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalcarpetcleanDatalrug", JSON.stringify(totalcarpetcleanDatalrug)); //TOTAL CALCULATIONENDS }); $( document ).on( "click", ".srugid", function() { var id=$(this).data("id"); var price=$(this).data("price"); //alert(price); // $('#shampoo_price').val(price); //$('#total_shampoo').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const srugpieceprice = { rug_price: price, total_pieces: id, }; localStorage.setItem("srugpieceprice", JSON.stringify(srugpieceprice)); //setting local storage $("[id^='indussrug']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indussrug"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); var $p = $("#indussrug"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); $('.totalcarpetscleaned').text(id+" piece(s)"); var vat=$('#vat').val(); var total=parseInt(price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalcarpetcleanDatasrug = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalcarpetcleanDatasrug", JSON.stringify(totalcarpetcleanDatasrug)); //TOTAL CALCULATIONENDS }); $( document ).on( "click", ".carphoursid", function() { var id=$(this).data("id"); var price=$(this).data("price"); //alert(price); // $('#shampoo_price').val(price); //$('#total_shampoo').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const carphoursprice = { hour_price: price, total_hours: id, }; localStorage.setItem("carphoursprice", JSON.stringify(carphoursprice)); //setting local storage $("[id^='induscarphours']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#induscarphours"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); var $p = $("#induscarphours"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); $('.totalcarpetscleaned').text(id+" hour(s)"); var vat=$('#vat').val(); var total=parseInt(price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalcarpcleanData = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalcarpcleanData", JSON.stringify(totalcarpcleanData)); //TOTAL CALCULATIONENDS }); $( document ).on( "click", ".plumbhoursid", function() { var id=$(this).data("id"); var price=$(this).data("price"); //alert(price); // $('#shampoo_price').val(price); //$('#total_shampoo').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const plumbhoursprice = { hour_price: price, total_hours: id, }; localStorage.setItem("plumbhoursprice", JSON.stringify(plumbhoursprice)); //setting local storage $("[id^='induscarphours']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#induscarphours"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); var $p = $("#induscarphours"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); $('.totalcarpetscleaned').text(id+" hour(s)"); var vat=$('#vat').val(); var total=parseInt(price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalplumbcleanData = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalplumbcleanData", JSON.stringify(totalplumbcleanData)); //TOTAL CALCULATIONENDS }); $( document ).on( "click", ".electhoursid", function() { var id=$(this).data("id"); var price=$(this).data("price"); //alert(price); // $('#shampoo_price').val(price); //$('#total_shampoo').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const electhoursprice = { hour_price: price, total_hours: id, }; localStorage.setItem("electhoursprice", JSON.stringify(electhoursprice)); //setting local storage $("[id^='induscarphours']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#induscarphours"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); var $p = $("#induscarphours"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); $('.totalcarpetscleaned').text(id+" hour(s)"); var vat=$('#vat').val(); var total=parseInt(price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalelectcleanData = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalelectcleanData", JSON.stringify(totalelectcleanData)); //TOTAL CALCULATIONENDS }); $( document ).on( "click", ".handhoursid", function() { var id=$(this).data("id"); var price=$(this).data("price"); //alert(price); // $('#shampoo_price').val(price); //$('#total_shampoo').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const handhoursprice = { hour_price: price, total_hours: id, }; localStorage.setItem("handhoursprice", JSON.stringify(handhoursprice)); //setting local storage $("[id^='indushandhours']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indushandhours"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); var $p = $("#indushandhours"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); $('.totalcarpetscleaned').text(id+" hour(s)"); var vat=$('#vat').val(); var total=parseInt(price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalhandcleanData = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalhandcleanData", JSON.stringify(totalhandcleanData)); //TOTAL CALCULATIONENDS }); $( document ).on( "click", ".shampid", function() { var id=$(this).data("id"); var price=$(this).data("price"); //alert(price); $('#shampoo_price').val(price); $('#total_shampoo').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const shampseatsprice = { shamp_price: price, total_seats: id, }; localStorage.setItem("shampseatsprice", JSON.stringify(shampseatsprice)); //setting local storage $("[id^='indusshampoo']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indusshampoo"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); var $p = $("#indusshampoo"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); var vat=$('#vat').val(); var total=parseInt(price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalsofacleanDatashamp = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalsofacleanDatashamp", JSON.stringify(totalsofacleanDatashamp)); //TOTAL CALCULATIONENDS }); $( document ).on( "click", ".appartid_newrem", function() { var id=$(this).data("id"); //alert(id); var price=$(this).data("price"); //alert(price); $('#shampoo_price').val(price); $('#total_shampoo').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const appartbedsprice = { price: price, total_beds: id, }; localStorage.setItem("appartbedsprice", JSON.stringify(appartbedsprice)); //setting local storage var $a = $("#indusappart0"); $a.css("background-color","white"); $a.css("color","black"); $("[id^='indusappart']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indusappart"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); if(id==0){ var $p = $("#indusappart0"); $p.css("background-color","#fcbd1b"); $p.css("color","white"); }else{ var $p = $("#indusappart"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } var vat=$('#vat').val(); var total=parseInt(price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalpaintcleanDataappart = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalpaintcleanDataappart", JSON.stringify(totalpaintcleanDataappart)); //TOTAL CALCULATIONENDS }); $( document ).on( "click", ".appartid", function() { var id=$(this).data("id"); //alert(id); var price=$(this).data("price"); //alert(price); $('#shampoo_price').val(price); $('#total_shampoo').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const appartbedsprice = { price: price, total_beds: id, }; localStorage.setItem("appartbedsprice", JSON.stringify(appartbedsprice)); //setting local storage var $a = $("#indusappart0"); $a.css("background-color","white"); $a.css("color","black"); $("[id^='indusappart']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indusappart"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); if(id==0){ var $p = $("#indusappart0"); $p.css("background-color","#fcbd1b"); $p.css("color","white"); }else{ var $p = $("#indusappart"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } var vat=$('#vat').val(); var total=parseInt(price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalpaintcleanDataappart = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalpaintcleanDataappart", JSON.stringify(totalpaintcleanDataappart)); //TOTAL CALCULATIONENDS }); $( document ).on( "click", ".appartid_sanit", function() { var id=$(this).data("id"); //alert(id); var price=$(this).data("price"); //alert(price); $('#shampoo_price').val(price); $('#total_shampoo').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const appartbedsprice_sanit = { price: price, total_beds: id, }; localStorage.setItem("appartbedsprice_sanit", JSON.stringify(appartbedsprice_sanit)); //setting local storage var $a = $("#indusappart0"); $a.css("background-color","white"); $a.css("color","black"); $("[id^='indusappart']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indusappart"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); if(id==0){ var $p = $("#indusappart0"); $p.css("background-color","#fcbd1b"); $p.css("color","white"); }else{ var $p = $("#indusappart"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } var vat=$('#vat').val(); var total=parseInt(price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalsanitcleanDataappart = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalsanitcleanDataappart", JSON.stringify(totalsanitcleanDataappart)); //TOTAL CALCULATIONENDS }); $( document ).on( "click", ".appartid_remodel", function() { var id=$(this).data("id"); //alert(id); var price=$(this).data("price"); //alert(price); $('#shampoo_price').val(price); $('#total_shampoo').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const appartbedsprice_remodel = { price: price, total_beds: id, }; localStorage.setItem("appartbedsprice_remodel", JSON.stringify(appartbedsprice_remodel)); //setting local storage var $a = $("#indusappart0"); $a.css("background-color","white"); $a.css("color","black"); $("[id^='indusappart']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indusappart"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); if(id==0){ var $p = $("#indusappart0"); $p.css("background-color","#fcbd1b"); $p.css("color","white"); }else{ var $p = $("#indusappart"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } var vat=$('#vat').val(); var total=parseInt(price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalremodelcleanDataappart = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalremodelcleanDataappart", JSON.stringify(totalremodelcleanDataappart)); //TOTAL CALCULATIONENDS }); $( document ).on( "click", ".appartid_deepcleanorder", function() { var id=$(this).data("id"); //alert(id); var price=$(this).data("price"); //alert(price); $('#shampoo_price').val(price); $('#total_shampoo').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const appartbedsprice_deepcleanorder = { price: price, total_beds: id, }; localStorage.setItem("appartbedsprice_deepcleanorder", JSON.stringify(appartbedsprice_deepcleanorder)); //setting local storage var $a = $("#indusappart0"); $a.css("background-color","white"); $a.css("color","black"); $("[id^='indusappart']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indusappart"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); if(id==0){ var $p = $("#indusappart0"); $p.css("background-color","#fcbd1b"); $p.css("color","white"); }else{ var $p = $("#indusappart"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } var vat=$('#vat').val(); var total=parseInt(price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalcleanDataappart_deepcleanorder = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalcleanDataappart_deepcleanorder", JSON.stringify(totalcleanDataappart_deepcleanorder)); //TOTAL CALCULATIONENDS }); $( document ).on( "click", ".appartid_pest", function() { var id=$(this).data("id"); //alert(id); var price=$(this).data("price"); var pest_price_to_add=0; //alert(price); $('#shampoo_price').val(price); $('#total_shampoo').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); var kill_types=$('#kill_types').val(); if(kill_types==''){ $('#show_valiation_msg').show(); return false; } $('#show_valiation_msg').hide(); if(kill_types=='cockroaches'){ pest_price_to_add=$('#cockroach_price').val(); }else if(kill_types=='bed bugs'){ pest_price_to_add=$('#bedbug_price').val(); }else if(kill_types=='flies/mosquitoes'){ pest_price_to_add=$('#flies_price').val(); }else{ pest_price_to_add=$('#man_types').val(); } //setting local storage const appartbedsprice_pest = { price: price, total_beds: id, }; localStorage.setItem("appartbedsprice_pest", JSON.stringify(appartbedsprice_pest)); //setting local storage var $a = $("#indusappart0"); $a.css("background-color","white"); $a.css("color","black"); $("[id^='indusappart']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indusappart"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); if(id==0){ var $p = $("#indusappart0"); $p.css("background-color","#fcbd1b"); $p.css("color","white"); }else{ var $p = $("#indusappart"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); } var vat=$('#vat').val(); var total=parseInt(price)+parseInt(pest_price_to_add); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalpestcleanDataappart_pest = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalpestcleanDataappart_pest", JSON.stringify(totalpestcleanDataappart_pest)); //TOTAL CALCULATIONENDS }); $( document ).on( "click", ".steamid", function() { var id=$(this).data("id"); var price=$(this).data("price"); //alert(price); $('#steam_price').val(price); $('#total_steam').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const steamseatsprice = { steam_price: price, total_seats: id, }; localStorage.setItem("steamseatsprice", JSON.stringify(steamseatsprice)); //setting local storage $("[id^='indussteam']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indussteam"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); var $p = $("#indussteam"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); var vat=$('#vat').val(); var total=parseInt(price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalsofacleanDatasteam = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalsofacleanDatasteam", JSON.stringify(totalsofacleanDatasteam)); //TOTAL CALCULATIONENDS }); $( document ).on( "click", ".villaid", function() { var id=$(this).data("id"); var price=$(this).data("price"); //alert(price); $('#steam_price').val(price); $('#total_steam').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const villabedsprice = { price: price, total_beds: id, }; localStorage.setItem("villabedsprice", JSON.stringify(villabedsprice)); //setting local storage $("[id^='indusvilla']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indusvilla"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); var $p = $("#indusvilla"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); var vat=$('#vat').val(); var total=parseInt(price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalpaintcleanDatavilla = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalpaintcleanDatavilla", JSON.stringify(totalpaintcleanDatavilla)); //TOTAL CALCULATIONENDS var $fk = $("#booking_label_11"); $fk.css("background-color","white"); $fk.css("color","black"); $fk.css("border","none"); }); $( document ).on( "click", ".villaid_sanit", function() { var id=$(this).data("id"); var price=$(this).data("price"); //alert(price); $('#steam_price').val(price); $('#total_steam').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const villabedsprice_sanit = { price: price, total_beds: id, }; localStorage.setItem("villabedsprice_sanit", JSON.stringify(villabedsprice_sanit)); //setting local storage $("[id^='indusvilla']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indusvilla"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); var $p = $("#indusvilla"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); var vat=$('#vat').val(); var total=parseInt(price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalsanitcleanDatavilla = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalsanitcleanDatavilla", JSON.stringify(totalsanitcleanDatavilla)); //TOTAL CALCULATIONENDS var $fk = $("#booking_label_11"); $fk.css("background-color","white"); $fk.css("color","black"); $fk.css("border","none"); }); $( document ).on( "click", ".villaid_remodel", function() { var id=$(this).data("id"); var price=$(this).data("price"); //alert(price); $('#steam_price').val(price); $('#total_steam').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const villabedsprice_remodel = { price: price, total_beds: id, }; localStorage.setItem("villabedsprice_remodel", JSON.stringify(villabedsprice_remodel)); //setting local storage $("[id^='indusvilla']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indusvilla"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); var $p = $("#indusvilla"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); var vat=$('#vat').val(); var total=parseInt(price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalremodelcleanDatavilla = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalremodelcleanDatavilla", JSON.stringify(totalremodelcleanDatavilla)); //TOTAL CALCULATIONENDS var $fk = $("#booking_label_11"); $fk.css("background-color","white"); $fk.css("color","black"); $fk.css("border","none"); }); $( document ).on( "click", ".villaid_deepcleanorder", function() { var id=$(this).data("id"); var price=$(this).data("price"); //alert(price); $('#steam_price').val(price); $('#total_steam').val(id); //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const villabedsprice_deepcleanorder = { price: price, total_beds: id, }; localStorage.setItem("villabedsprice_deepcleanorder", JSON.stringify(villabedsprice_deepcleanorder)); //setting local storage $("[id^='indusvilla']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indusvilla"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); var $p = $("#indusvilla"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); var vat=$('#vat').val(); var total=parseInt(price); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalcleanDatavilla_deepcleanorder = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalcleanDatavilla_deepcleanorder", JSON.stringify(totalcleanDatavilla_deepcleanorder)); //TOTAL CALCULATIONENDS var $fk = $("#booking_label_11"); $fk.css("background-color","white"); $fk.css("color","black"); $fk.css("border","none"); }); $( document ).on( "click", ".villaid_pest", function() { var id=$(this).data("id"); $('#show_valiation_msg').hide(); var pest_price_to_add=0; var price=$(this).data("price"); //alert(price); $('#steam_price').val(price); $('#total_steam').val(id); var kill_types=$('#kill_types').val(); //alert(description); if(kill_types==''){ $('#show_valiation_msg').show(); return false; } if(kill_types=='cockroaches'){ pest_price_to_add=$('#cockroach_price').val(); }else if(kill_types=='bed bugs'){ pest_price_to_add=$('#bedbug_price').val(); }else if(kill_types=='flies/mosquitoes'){ pest_price_to_add=$('#flies_price').val(); }else{ pest_price_to_add=$('#man_types').val(); } //$('.totalhoursneeded').html(id); //alert("hours"); //setting local storage const villabedsprice_pest = { price: price, total_beds: id, }; localStorage.setItem("villabedsprice_pest", JSON.stringify(villabedsprice_pest)); //setting local storage $("[id^='indusvilla']").each(function (i, el) { var index_id=i+1; //alert(index_id); var $p = $("#indusvilla"+index_id); $p.css("background-color","white"); $p.css("color","black"); }); var $p = $("#indusvilla"+id); $p.css("background-color","#fcbd1b"); $p.css("color","white"); var vat=$('#vat').val(); var total=parseInt(price)+parseInt(pest_price_to_add); total=total.toFixed(2); $('.totalamountindus').html('AED'+total); var discount_percent=$('#discount_in_percent').val(); var discount=total*discount_percent/100; discount=discount.toFixed(2); $('.discountindus').html('AED'+discount); var subtotal=total-discount; subtotal=subtotal.toFixed(2); $('.subtotalindus').html('AED'+subtotal); var vat_amount=vat*subtotal/100; vat_amount=vat_amount.toFixed(2); $('.vatindus').html('AED'+vat_amount); //alert(subtotal); //alert(vat_amount); var nettopay=parseFloat(subtotal)+parseFloat(vat_amount); nettopay=nettopay.toFixed(2); //alert(nettopay); $('#gtotal').val(nettopay); $('.grandtotal').html('AED'+nettopay); $('.dsmsg').show(); /*var subtotal=total; $('.subtotalamount').html('AED'+total); var tax=total*vat/100; var vat_tax=tax; tax='AED'+tax; total=total+(total*vat/100); var grandtotal=total; total='AED'+total; $('.grandtotal').html(total); $('.vatamount').html(tax); //alert(total); $("#gtotal").val(total);*/ const totalpestcleanDatavilla_pest = { subtotal: subtotal, vat_amount: vat_amount, discount:discount, total:total, nettopay:nettopay, }; localStorage.setItem("totalpestcleanDatavilla_pest", JSON.stringify(totalpestcleanDatavilla_pest)); //TOTAL CALCULATIONENDS var $fk = $("#booking_label_11"); $fk.css("background-color","white"); $fk.css("color","black"); $fk.css("border","none"); }); if ( $("#delivery_type").exists()){ var delivery_type=$("#delivery_type").val(); if ( delivery_type=="pickup"){ $(".delivery-asap").hide(); $("#delivery_time").attr("placeholder",js_lang.trans_38); $(".delivery-fee-wrap").hide(); $(".delivery-min").hide(); $(".pickup-min").show(); $(".dinein-min").hide(); } else if ( delivery_type=="dinein" ) { $(".delivery-asap").hide(); $("#delivery_time").attr("placeholder",js_lang.dinein_time); $(".delivery-min").hide(); $(".pickup-min").hide(); $(".dinein-min").show(); } else { $(".delivery-asap").show(); $("#delivery_time").attr("placeholder",js_lang.trans_39); $(".delivery-fee-wrap").show(); $(".delivery-min").show(); $(".pickup-min").hide(); $(".dinein-min").hide(); } //load_item_cart(); } /*if ( $("#merchant_close_store").exists() ){ if ( $("#merchant_close_store").val()=="yes"){ var close_msg=$("#merchant_close_msg").val(); uk_msg(close_msg); $(".order-list-wrap").after('<p class="uk-alert uk-alert-warning">'+close_msg+'</p>'); $(".book-table-button").attr("disabled",true); $(".checkout").hide(); } }*/ }); /*END doc*/ function plotMerchantLocationNew(s) { if ( $(".search-map-wrap").exists() ){ if ( s.length >=1){ $(".search-map-wrap").show(); initializeMarkerNew(s,'search-map-wrap'); } } } function check_hover_state_smile(val,label,id) { var link_val = $('#link_office').val(); var att_id = $('#attri_id').val(); //alert(att_id); /*if(att_id==id) { window.location='https://www.smilehandyy.com/send_quote/'+ link_val; }*/ setTimeout(function(){ if($('#booking_process_'+val).is(":checked")) { $('#booking_label_'+val).addClass('new1111'); var attr_id=$("#booking_process_"+val).val(); console.log(attr_id); $(".mesage_content_"+attr_id).parent().find(".attr_masg_content").hide(); $(".mesage_content_"+attr_id).show(); } else { $('#booking_label_'+val).removeClass('new1111'); } for(var i=1;i<=1000;i++) { if(i!=val && i!=label) { if($('#booking_process_'+i).is(":checked")) { $('#booking_label_'+i).addClass('new1111'); } else { $('#booking_label_'+i).removeClass('new1111'); } } } },100); } function single_food_item_add(item_id,price,size,category_id, size_id , discount, item_size_token) { /*dump("item_id:"+item_id); dump("price:"+price); dump("size:"+size);*/ var params=''; params="merchant_id="+$("#merchant_id").val(); params+="&item_id="+item_id if ( size==""){ params+="&price="+price; } else { params+="&price="+price+"|"+size+"|"+size_id; } params+="&qty=1"; if(!empty(discount)){ params+="&discount=" + discount; } else { params+="&discount="; } params+="¬es="; params+="&row="; params+="&category_id="+category_id; params+="&csrf_token="+csrf_token; params+="&auto_add_cart=1"; params+="&item_size_token=" + item_size_token; params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: "action=addToCart¤tController=store&"+params, dataType: 'json', success: function(data){ busy(false); if (data.code==1) { uk_msg_sucess(data.msg); load_item_cart(); } else { uk_msg(data.msg); } }, error: function(){ busy(false); } }); } //waseemdatatable function table() { if ( $(".selected_transaction_query").exists() ){ var query=$("#query").val(); switch(query){ case "last30": $(".last30").addClass("uk-button-success"); break; case "last15": $(".last15").addClass("uk-button-success"); break; case "month": var query_date="selected-"+$("#query_date").val(); $("."+query_date).addClass("uk-button-success"); break; case "all": $(".all").addClass("uk-button-success"); break; } } var action=$("#action").val(); var server_side=false; if (action=="merchantList" || action=="customerList"){ server_side=true; } if ( $("#server_side").exists() ){ if ( $("#server_side").val()==1){ server_side=true; } } var sort_by ='desc'; switch ( $("#action").val() ) { case "CountryList": sort_by ='asc'; break; default: break; } var params=$("#frm_table_list").serialize(); params+="¤tController="+$("#currentController").val(); params+= addValidationRequest(); ajax_url="/ajaxmerchant"; epp_table = $('#table_list').dataTable({ "iDisplayLength": 15, "bProcessing": true, //"bServerSide": false, "bServerSide": server_side, "sAjaxSource": ajax_url+"?"+params, "aaSorting": [[ 0, sort_by ]],//sorting changed to 1 from 0 by waseem "oLanguage":{ "sProcessing": "<p>Processing.. <i class=\"fa fa-spinner fa-spin\"></i></p>" }, "oLanguage": { "sEmptyTable": js_lang.tablet_1, "sInfo": js_lang.tablet_2, "sInfoEmpty": js_lang.tablet_3, "sInfoFiltered": js_lang.tablet_4, "sInfoPostFix": "", "sInfoThousands": ",", "sLengthMenu": js_lang.tablet_5, "sLoadingRecords": js_lang.tablet_6, "sProcessing": js_lang.tablet_7, "sSearch": js_lang.tablet_8, "sZeroRecords": js_lang.tablet_9, "oPaginate": { "sFirst": js_lang.tablet_10, "sLast": js_lang.tablet_11, "sNext": js_lang.tablet_12, "sPrevious": js_lang.tablet_13 }, "oAria": { "sSortAscending": js_lang.tablet_14, "sSortDescending": js_lang.tablet_15 } }, "fnInitComplete": function(oSettings, json) { var action=$("#action").val(); if ( action=="merchantCommissionDetails"){ $(".merchant_name").html(json.merchant_name); $(".total_commission").html(json.total_commission); } if ( action=="merchantStatement"){ $(".total_amount").html(json.total_amount); if ( $("#payment_type").val()==2){ $(".cash_tr").show(); $(".total_payable").html(json.total_payable); } } if (action=="merchantCommission"){ $(".total_commission").html(json.total_commission); } } }); } function table2() { if ( $(".selected_transaction_query").exists() ){ var query=$("#query").val(); switch(query){ case "last30": $(".last30").addClass("uk-button-success"); break; case "last15": $(".last15").addClass("uk-button-success"); break; case "month": var query_date="selected-"+$("#query_date").val(); $("."+query_date).addClass("uk-button-success"); break; case "all": $(".all").addClass("uk-button-success"); break; } } var action=$("#action").val(); var server_side=false; if (action=="merchantList" || action=="customerList"){ server_side=true; } if ( $("#server_side").exists() ){ if ( $("#server_side").val()==1){ server_side=true; } } var sort_by ='desc'; switch ( $("#action").val() ) { case "CountryList": sort_by ='asc'; break; default: break; } var params=$("#frm_table_list2").serialize(); params+="¤tController="+$("#currentController").val(); params+= addValidationRequest(); ajax_url="/ajaxmerchant"; epp_table = $('#table_list2').dataTable({ "iDisplayLength": 15, "bProcessing": true, //"bServerSide": false, "bServerSide": server_side, "sAjaxSource": ajax_url+"?"+params, "aaSorting": [[ 0, sort_by ]], "oLanguage":{ "sProcessing": "<p>Processing.. <i class=\"fa fa-spinner fa-spin\"></i></p>" }, "oLanguage": { "sEmptyTable": js_lang.tablet_1, "sInfo": js_lang.tablet_2, "sInfoEmpty": js_lang.tablet_3, "sInfoFiltered": js_lang.tablet_4, "sInfoPostFix": "", "sInfoThousands": ",", "sLengthMenu": js_lang.tablet_5, "sLoadingRecords": js_lang.tablet_6, "sProcessing": js_lang.tablet_7, "sSearch": js_lang.tablet_8, "sZeroRecords": js_lang.tablet_9, "oPaginate": { "sFirst": js_lang.tablet_10, "sLast": js_lang.tablet_11, "sNext": js_lang.tablet_12, "sPrevious": js_lang.tablet_13 }, "oAria": { "sSortAscending": js_lang.tablet_14, "sSortDescending": js_lang.tablet_15 } }, "fnInitComplete": function(oSettings, json) { var action=$("#action").val(); if ( action=="merchantCommissionDetails"){ $(".merchant_name").html(json.merchant_name); $(".total_commission").html(json.total_commission); } if ( action=="merchantStatement"){ $(".total_amount").html(json.total_amount); if ( $("#payment_type").val()==2){ $(".cash_tr").show(); $(".total_payable").html(json.total_payable); } } if (action=="merchantCommission"){ $(".total_commission").html(json.total_commission); } } }); } //waseemdatatableends jQuery(document).ready(function() { $( document ).on( "click", ".tips", function() { $("#tip_value").val(''); var type=$(this).data("type"); $(".tips").removeClass("active"); $(this).addClass("active"); if ( type=="tip"){ var tip=$(this).data("tip"); var tip_percentage = tip*100; $(".tip_percentage").html(tip_percentage+"%"); var cart_subtotal=$("#subtotal_order2").val() var tip_raw = tip*cart_subtotal; dump("tip=>"+tip); dump("tip value=>"+tip_raw.toFixed(2)); $(".apply_tip").click(); //$("#cart_tip_value").val( tip_raw.toFixed(2) ); //$("#cart_tip_percentage").val( tip ); //display_tip(tip_percentage,tip_raw.toFixed(2)); } else { $("#cart_tip_value").val( 0 ); $("#cart_tip_percentage").val( 0 ); $("#cart_tip_cash_percentage").val( 0 ); //$(".tip_percentage").html(0+"%"); $(".tip_percentage").html(0+"%"); /*display_tip(0,0); $(".added_tip_wrap").remove();*/ $(".apply_tip").click(); } }); $( "#tip_value" ).keyup(function() { var tip_raw=parseFloat($(this).val()); if (isNaN(tip_raw)){ tip_raw=0; } dump(tip_raw); $(".tips").removeClass("active"); var cart_subtotal=parseFloat($("#subtotal_order2").val()); dump(cart_subtotal); var reverse_percentage= (tip_raw/cart_subtotal)*100; dump(reverse_percentage); //$(".tip_percentage").html(reverse_percentage.toFixed()+"%"); $(".tip_percentage").html(reverse_percentage.toFixed(2)+"%"); dump("reverse tip =>"+reverse_percentage.toFixed()); //$("#cart_tip_cash_percentage").val( reverse_percentage.toFixed()/100 ); $("#cart_tip_cash_percentage").val( reverse_percentage.toFixed(2)/100 ); $(".tip_cash").addClass("active"); $(".apply_tip").click(); //display_tip(reverse_percentage.toFixed(),tip_raw.toFixed(2)); }); if ( $("#default_tip").exists() ){ var default_tip=$("#default_tip").val(); $( ".tips" ).each(function( index ) { var tip=$(this).data("tip"); dump(tip); if ( default_tip == tip){ $(".tips").removeClass("active"); $(this).addClass("active"); $("#cart_tip_percentage").val(tip); var tip_percentage = tip*100; $(".tip_percentage").html(tip_percentage+"%"); /*setTimeout(function() { var cart_subtotal=$("#subtotal_order2").val(); var tip_raw = tip*cart_subtotal; dump("->"+tip_raw.toFixed(2)); display_tip(tip_percentage,tip_raw.toFixed(2)); },2100);*/ return false; } }); } }); /*end docu*/ function display_tip(tip_percentage,amount) { $("#cart_tip_percentage").val(tip_percentage); $("#cart_tip_value").val(amount); var admin_currency_set=$("#admin_currency_set").val(); var sub_total= $("#subtotal_order2").val(); var subtotal_extra_charge= parseFloat($("#subtotal_extra_charge").val()) + 0; if (isNaN(subtotal_extra_charge)){ subtotal_extra_charge=0; } if (isNaN(amount)){ amount=0; } if (isNaN(subtotal_extra_charge)){ subtotal_extra_charge=0; } dump(sub_total); dump(amount); dump(subtotal_extra_charge); var cart_total= parseFloat(sub_total) + parseFloat(amount) + parseFloat(subtotal_extra_charge); dump(cart_total); cart_total=cart_total.toFixed(2); var cart_total_display=''; var amount_display=''; if ( $("#admin_currency_position").val()=="right" ){ cart_total_display=cart_total+" "+admin_currency_set; amount_display = amount+" "+admin_currency_set; } else { cart_total_display=admin_currency_set+" "+cart_total amount_display = admin_currency_set+" "+amount; } var html=''; /*html+='<div class="added_tip_wrap">'; html+='<div class="a">'+js_lang.trans_45+' ('+tip_percentage+'%)</div>'; html+='<div class="manage">'; html+='<div class="b">'+amount_display+'</div>'; html+='</div>'; html+='<div>';*/ html+='<div class="row added_tip_wrap">'; html+='<div class="col-md-6 col-xs-6 text-right">'; html+= js_lang.trans_45+" ("+tip_percentage+"%)"; html+='</div>'; html+='<div class="col-md-6 col-xs-6 text-right">'; html+= amount_display; html+='</div>'; html+='</div>'; $(".added_tip_wrap").remove(); $(".cart_total_wrap").before(html); $(".cart_total").html(cart_total_display); } $.validate({ language : jsLanguageValidator, form : '#forms-normal', onError : function() { }, onSuccess : function() { return true; } }); /*** SIGNUP AND LOGING PAGE*/ $.validate({ language : jsLanguageValidator, form : '#frm-modal-forgotpass', onError : function() { }, onSuccess : function() { form_submit('frm-modal-forgotpass'); return false; } }); jQuery(document).ready(function() { $( document ).on( "click", ".resend-code", function() { var params = "action=resendMobileCode¤tController=store&tbl=resendMobileCode&id="+$("#client_id").val(); params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); if (data.code==1) { uk_msg_sucess(data.msg); } else { uk_msg(data.msg); } }, error: function(){ busy(false); } }); }); }); /*end docu*/ /** START VERSION 2.1.1 added code*/ jQuery(document).ready(function() { if ( $(".full_map_page").exists()){ getAllMerchantCoordinates(); if ( $("#google_default_country").val()=="yes" ){ $("#geo_address").geocomplete({ country: $("#admin_country_set").val(), details:'form' }); } else { $("#geo_address").geocomplete({ details:'form' }); } } $( document ).on( "click", ".reset-geo", function() { getAllMerchantCoordinates(); }); $.validate({ language : jsLanguageValidator, form : '#form_map', onError : function() { }, onSuccess : function() { searchGeoByAddress(); return false; } }); if ( $(".new-merchant-header").exists() ){ var merchant_header=upload_url+"/"+$("#merchant_header_new").val(); $('.new-merchant-header').css('background-image', 'url(' + merchant_header + ')'); } });/* end docu*/ function getAllMerchantCoordinates() { var map_zoom=parseInt($("#view_map_default_zoom").val()); busy(true); $.ajax({ type: "POST", url: ajax_url, data: "action=getAllMerchantCoordinates¤tController=store&tbl=getAllMerchantCoordinates"+ addValidationRequest() , dataType: 'json', success: function(data){ busy(false); if (data.code==1){ focus_lat=data.msg.lat; focus_lng=data.msg.lng; initializeMarkerNew(data.details,'map_area',map_zoom); } else { uk_msg(data.msg); } }, error: function(){ busy(false); } }); } var focus_lat=''; var focus_lng=''; function searchGeoByAddress() { var params_geo="action=findGeo¤tController=store&tbl=findGeo&geo_address="+$("#geo_address").val(); params_geo+="&lat="+$("#lat").val(); params_geo+="&lng="+$("#lng").val(); busy(true); var map_zoom=parseInt($("#view_map_default_zoom_s").val()); params_geo+= addValidationRequest(); $.ajax({ type: "POST", url: ajax_url, data: params_geo, dataType: 'json', success: function(data){ busy(false); if (data.code==1){ focus_lat=data.msg.lat; focus_lng=data.msg.lng; initializeMarkerNew(data.details,'map_area',map_zoom); } else { uk_msg(data.msg); } }, error: function(){ busy(false); } }); } /*SCROLLING DIV STARTS HERE*/ jQuery(document).ready(function($){ if ( $(".separate-category-menu").exists()){ var h=$(".col-category").height(); $(".scroll-parent").css({"min-height":h+"px"}); } if ( $(".scroll-parent2").exists()){ var h=$(".right-menu-content").height(); $(".scroll-parent2").css({"min-height":h+"px"}); } if ( $("#disabled_cart_sticky").val()==""){ if ( $(".scroll-parent").exists()){ var $window = $(window); var $container = $(".scroll-child"); var $main = $(".scroll-parent"); var window_min = 0; var window_max = 0; var threshold_offset = 50; function set_limits(){ //max and min container movements var max_move = $main.offset().top + $main.height() - $container.height() - 2*parseInt($container.css("top") ); var min_move = $main.offset().top; //save them $container.attr("data-min", min_move).attr("data-max",max_move); //window thresholds so the movement isn't called when its not needed! //you may wish to adjust the freshhold offset window_min = min_move - threshold_offset; window_max = max_move + $container.height() + threshold_offset; } //sets the limits for the first load set_limits(); function window_scroll(){ //if the window is within the threshold, begin movements if( $window.scrollTop() >= window_min && $window.scrollTop() < window_max ){ //reset the limits (optional) set_limits(); //move the container container_move(); } } $window.bind("scroll", window_scroll); function container_move(){ var wst = $window.scrollTop(); //if the window scroll is within the min and max (the container will be "sticky"; if( wst >= $container.attr("data-min") && wst <= $container.attr("data-max") ){ //work out the margin offset var margin_top = $window.scrollTop() - $container.attr("data-min"); //margin it down! $container.css("margin-top", margin_top); $container.addClass("scroll-active"); //if the window scroll is below the minimum }else if( wst <= $container.attr("data-min") ){ //fix the container to the top. $container.css("margin-top",0); $container.removeClass("scroll-active"); //if the window scroll is above the maximum }else if( wst > $container.attr("data-max") ){ //fix the container to the top $container.css("margin-top", $container.attr("data-max")-$container.attr("data-min")+"px" ); $container.addClass("scroll-active"); } } //do one container move on load container_move(); } } /** START CART*/ if ( $("#disabled_cart_sticky").val()==""){ if ( $(".scroll-parent2").exists()){ var $window2 = $(window); var $container2 = $(".scroll-child2"); var $main2 = $(".scroll-parent2"); var window_min2 = 0; var window_max2 = 0; var threshold_offset2 = 50; function set_limits2(){ //max and min container movements var max_move = $main2.offset().top + $main2.height() - $container2.height() - 2*parseInt($container2.css("top") ); var min_move = $main2.offset().top; //save them $container2.attr("data-min", min_move).attr("data-max",max_move); //window thresholds so the movement isn't called when its not needed! //you may wish to adjust the freshhold offset window_min2 = min_move - threshold_offset2; window_max2 = max_move + $container2.height() + threshold_offset2; } //sets the limits for the first load set_limits2(); function window_scroll2(){ //if the window is within the threshold, begin movements if( $window2.scrollTop() >= window_min2 && $window2.scrollTop() < window_max2 ){ //reset the limits (optional) set_limits2(); //move the container container_move2(); } } $window2.bind("scroll", window_scroll2); function container_move2(){ var wst = $window2.scrollTop(); //if the window scroll is within the min and max (the container will be "sticky"; if( wst >= $container2.attr("data-min") && wst <= $container2.attr("data-max") ){ //work out the margin offset var margin_top = $window2.scrollTop() - $container2.attr("data-min"); //margin it down! $container2.css("margin-top", margin_top); $container2.addClass("scroll-active"); //if the window scroll is below the minimum }else if( wst <= $container2.attr("data-min") ){ //fix the container to the top. $container2.css("margin-top",0); $container2.removeClass("scroll-active"); //if the window scroll is above the maximum }else if( wst > $container2.attr("data-max") ){ //fix the container to the top $container2.css("margin-top", $container2.attr("data-max")-$container2.attr("data-min")+"px" ); $container2.addClass("scroll-active"); } } //do one container move on load container_move2(); } } /** END CART*/ $( document ).on( "click", ".back-top-menu", function() { scroll_class('opening-hours-wrap'); }); if ( $("#address_book_id").exists() ){ $(".address-block").hide(); $(".saved_address_block").hide(); $("#street").removeAttr("data-validation"); $("#city").removeAttr("data-validation"); $("#state").removeAttr("data-validation"); } $( document ).on( "click", ".edit_address_book", function() { if ( $("#is_search_by_location").exists() ){ $("#state_id").attr("data-validation",'required'); $("#city_id").attr("data-validation",'required'); $("#area_id").attr("data-validation",'required'); } else { $("#street").attr("data-validation",'required'); $("#city").attr("data-validation",'required'); $("#state").attr("data-validation",'required'); } $(".address_book_wrap").remove(); $(".address-block").show(); $(".saved_address_block").show(); }); $( document ).on( "click", ".map-address", function() { $(this).hide(); $("#street").removeAttr("data-validation"); $("#city").removeAttr("data-validation"); $("#state").removeAttr("data-validation"); $(".address_book_wrap").hide(); $(".address-block").hide(); $("#map_address_toogle").val(2); $(".map-address-wrap-inner").show(); $(".back-map-address").show(); uk_msg_sucess(js_lang.trans_48); if(useMapbox()){ mapbox_select_address(); } else { mapAddress(); } }); $( document ).on( "click", ".paypal_paynow", function() { $(this).val(js_lang.processing); $(".paypal_paynow").css({ 'pointer-events' : 'none' }); }); /** set default if payment option is only */ if ( $(".payment-option-page").exists() ){ var c=$(".payment_option").length; if ( c==1){ $(".payment_option").attr("checked",true); $('.payment_option').iCheck('update'); if ( $(".payment_option:checked").val()=="cod" ){ $(".change_wrap").show(); } if ( $(".payment_option:checked").val()=="ccr" || $(".payment_option:checked").val()=="ocr" ){ $(".credit_card_wrap").show(); } } } }); /*end docu*/ /*SCROLLING DIV ENDS HERE*/ //var temp_geocoder = new google.maps.Geocoder(); function mapAddress() { $("#temporary_address").geocomplete({ map: ".map_address", markerOptions: { draggable: true } }); $("#temporary_address").trigger("geocode"); $("#temporary_address").bind("geocode:dragged", function(event, latLng){ $("#map_address_lat").val( latLng.lat() ); $("#map_address_lng").val( latLng.lng() ); /*codeLatLng(latLng.lat(),latLng.lng());*/ }); } /** END VERSION 2.1.1 added code*/ /** START ADDED CODE VERSION 2.3*/ jQuery(document).ready(function() { $( document ).on( "click", ".filter-search-bar", function() { $(".filter-options").slideToggle("fast"); }); $( document ).on( "click", ".forgot-pass-link2", function() { $(".section-forgotpass").fadeIn(); }); }); /*end docu*/ /** END CODE VERSION 2.3*/ /** START ADDED CODE VERSION 2.4*/ jQuery(document).ready(function() { $( document ).on( "click", ".clear-cart", function() { clearCart(); }); if ( $("#disabled_cart_sticky").exists() ){ if ( $("#disabled_cart_sticky").val()==2){ $(".scroll-parent2 .order-list-wrap").removeClass("scroll-child2"); } } }); /*end docu*/ function clearCart() { var ans=confirm(js_lang.trans_4); if (!ans){ return; } var params="action=clearCart¤tController=store"; params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); load_item_cart(); }, error: function(){ busy(false); } }); } function clearCartButton(option) { if ( option==1){ $(".clear-cart").show(); } else { $(".clear-cart").hide(); } } /** START ADDED CODE VERSION 2.4*/ /** START ADDED CODE VERSION 2.5*/ jQuery(document).ready(function() { $( document ).on( "click", ".view-order-history", function() { var parent=$(this).parent().parent(); var i=parent.find("i"); $(".show-history-"+ $(this).data("id") ).slideToggle("fast",function() { if (i.hasClass("ion-android-arrow-dropright")){ i.removeClass("ion-android-arrow-dropright"); i.addClass("ion-android-arrow-dropdown"); } else{ i.addClass("ion-android-arrow-dropright"); i.removeClass("ion-android-arrow-dropdown"); } }); }); $( document ).on( "click", ".send-order-sms-code", function() { var sosc=$(this); sosc.css({ 'pointer-events' : 'none' }); var params="action=sendOrderSMSCode¤tController=store&session="+sosc.data("session")+"&mobile="+$("#contact_phone").val()+"&mtid="+$("#merchant_id").val(); params+= addValidationRequest(); busy(true); $.ajax({ type: "POST", url: ajax_url, data: params, dataType: 'json', success: function(data){ busy(false); sosc.css({ 'pointer-events' : 'auto' }); if (data.code==1){ uk_msg_sucess(data.msg); } else { uk_msg(data.msg); } }, error: function(){ busy(false); sosc.css({ 'pointer-events' : 'auto' }); } }); }); }); /*end ready*/ /** END ADDED CODE VERSION 2.5*/ /** START ADDED CODE VERSION 2.6*/ jQuery(document).ready(function() { $( document ).on( "change", ".s_city", function() { var selected=$(this).val(); if ( selected!="-1"){ $(".s_area").val("-1"); $(".areas").addClass("area-hidden"); $("."+selected).removeClass("area-hidden"); } else { $(".areas").addClass("area-hidden"); } }); $( document ).on( "change", "#category_comp", function() { }); }); /*end ready*/ /** END ADDED CODE VERSION 2.6*/ function empty(data) { //if (typeof data === "undefined" || data==null || data=="" ) { if (typeof data === "undefined" || data==null || data=="" || data=="null" || data=="undefined" ) { return true; } return false; } function addValidationRequest() { var params=''; params+="&yii_session_token="+yii_session_token; params+="&YII_CSRF_TOKEN="+YII_CSRF_TOKEN; return params; }