Facebook
From sg, 2 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 259
  1.   <div class="row_flexcont">
  2.              <label class="bnc_label">Service State:</label>
  3.           <div class="bnc_field">
  4.            &lt;input  200px;" name="custSrvState" id="Cust_srv_state"  type="text"  /&gt;
  5.           </div>
  6.          </div>
  7.  
  8.  
  9. ------------------------
  10.  
  11.  
  12.  
  13.                  <div class="row_flexcont">
  14.                 <label class="bnc_label" id="srvState">Service State:</label>
  15.                 <select id="Add_srv_state_group"  >
  16.              <option selected value="select">Select</option>
  17.                 </select>
  18.                  </div>
  19.  
  20.  
  21. ------------------------------------------
  22.  
  23.  
  24.  function showUserDetails(data){
  25.      CleanAll();
  26.      $("#bc_Error_msg").css("display", "none");
  27.      $("#Customer_profile_body").show();
  28.      $("#CustID").val(data[0].custId);
  29.       $("#Cust_name").val(data[0].custName);
  30.       $("#Cust_number").val(data[0].custCPhone);
  31.       $("#Cust_emailId").val(data[0].custCEmail);
  32.       $("#Cont_Name").val(data[0].custCName);
  33.       $("#CTL_Cont_Name").val(data[0].custCtlContact);
  34.      $("#Cust_Bgn_date").val(formatDate(data[0].custBeginDate));
  35.      $("#Cust_end_date").val(formatDate(data[0].custEndDate));
  36.      <%if(mUserRole.equals("Admin")  || mUserRole.equals("Basic User")) {%>
  37.      $("#Cust_end_date").datepicker();
  38.      <%} %>  
  39.       $("#Cust_Addr_lane1").val(data[0].custAddr1);
  40.       $("#Cust_Addr_lane2").val(data[0].custAddr2);
  41.       $("#Cust_Addr_lane3").val(data[0].custAddr3);
  42.       $("#Cust_Addr_lane4").val(data[0].custAddr4);
  43.       $("#Cust_Addr_lane5").val(data[0].custAddr5);
  44.       $("#Cust_Addr_lane6").val(data[0].custCity);
  45.       $("#cust_country").val(data[0].country);
  46.       $("#cust_state").val(data[0].custState);
  47.       $("#cust_zip").val(data[0].custZip);
  48.       $("#Cust_desc").val(data[0].custGenricDesc);
  49.       $("#Cust_Bill_cycle").val(data[0].custBillCycle);
  50.       $("#Cust_Usg_cycle").val(data[0].custUsgCycle);
  51.       if ( data[0].custInd == "Y"){
  52.       $("#CusINDR_y").prop("checked", true);
  53.       $("#CusINDR_N").prop("checked", false);
  54.       }if ( data[0].custInd == "N"){
  55.        $("#CusINDR_N").prop("checked", true);
  56.        $("#CusINDR_y").prop("checked", false);
  57.        }
  58.    
  59.       if ( data[0].custTaxInd == "M"){
  60.           $("#CtaxActive").prop("checked", true);
  61.           $("#ctaxInactive").prop("checked", false);
  62.           $("#ctaxExempt").prop("checked", false);
  63.           }
  64.    if ( data[0].custTaxInd == "V"){
  65.            $("#ctaxInactive").prop("checked", true);
  66.           $("#ctaxExempt").prop("checked", false);
  67.            $("#CtaxActive").prop("checked", false);
  68.            }
  69.    if ( data[0].custTaxInd == "E"){
  70.              $("#ctaxExempt").prop("checked", true);
  71.           $("#ctaxInactive").prop("checked", false);
  72.            $("#CtaxActive").prop("checked", false);
  73.            }
  74.  
  75.       if ( data[0].custPaymentInd == "M"){
  76.           $("#Cuspay_y").prop("checked", true);
  77.           $("#Cuspay_N").prop("checked", false);
  78.           }if ( data[0].custPaymentInd == "A"){
  79.            $("#Cuspay_N").prop("checked", true);
  80.            $("#Cuspay_y").prop("checked", false);
  81.            }
  82.  
  83.       if ( data[0].custDiscInd == "D"){
  84.           $("#CusDISC_y").prop("checked", true);
  85.           $("#CusDISC_N").prop("checked", false);
  86.           }if ( data[0].custDiscInd == "N"){
  87.            $("#CusDISC_N").prop("checked", true);
  88.            $("#CusDISC_y").prop("checked", false);
  89.            }
  90.  
  91.       if ( data[0].custLpcInd == "L"){
  92.           $("#CusLPC_y").prop("checked", true);
  93.           $("#CusLPC_N").prop("checked", false);
  94.           }if ( data[0].custLpcInd == "N"){
  95.            $("#CusLPC_N").prop("checked", true);
  96.            $("#CusLPC_y").prop("checked", false);
  97.            }
  98.  
  99.  
  100.  
  101.           if ( data[0].custMediaInd == "E"){
  102.               $("#CusMedia_Flat").prop("checked", true);
  103.               $("#CusMedia_3pp").prop("checked", false);
  104.               $("#CusMedia_NDM").prop("checked", false);
  105.              
  106.               }if ( data[0].custMediaInd == "P"){
  107.                 $("#CusMedia_Flat").prop("checked", false);
  108.                       $("#CusMedia_3pp").prop("checked", true);
  109.                       $("#CusMedia_NDM").prop("checked", false);
  110.                    }if ( data[0].custMediaInd == "F"){
  111.                     $("#CusMedia_Flat").prop("checked", false);
  112.                           $("#CusMedia_3pp").prop("checked", false);
  113.                           $("#CusMedia_NDM").prop("checked", true);
  114.                        }
  115.      
  116.      
  117.              if ( data[0].custBillFrequency == "M"){
  118.                    $("#custBillFreqency_month").prop("checked", true);
  119.                    $("#custBillFreqency_quart").prop("checked", false);
  120.                    $("#custBillFreqency_year").prop("checked", false);
  121.                    $("#custBillFreqency_adhoc").prop("checked", false);
  122.                   }if ( data[0].custBillFrequency == "Q"){
  123.                       $("#custBillFreqency_month").prop("checked", false);
  124.                       $("#custBillFreqency_quart").prop("checked", true);
  125.                       $("#custBillFreqency_year").prop("checked", false);
  126.                       $("#custBillFreqency_adhoc").prop("checked", false);
  127.                      }if ( data[0].custBillFrequency == "Y"){
  128.                          $("#custBillFreqency_month").prop("checked", false);
  129.                          $("#custBillFreqency_quart").prop("checked", false);
  130.                          $("#custBillFreqency_year").prop("checked", true);
  131.                          $("#custBillFreqency_adhoc").prop("checked", false);
  132.                         }if ( data[0].custBillFrequency == "A"){
  133.                             $("#custBillFreqency_month").prop("checked", false);
  134.                             $("#custBillFreqency_quart").prop("checked", false);
  135.                             $("#custBillFreqency_year").prop("checked", false);
  136.                             $("#custBillFreqency_adhoc").prop("checked", true);
  137.                            }
  138.                
  139.                         $("#Cust_Bus_off_cd").val(data[0].busOfcCd);
  140.                         $("#Cust_Fed_Tax_ID").val(data[0].fedTaxId);
  141.                         $("#Cust_Locn_ID").val(data[0].locnId);
  142.                         $("#Cust_Entp_id").val(data[0].entpId);
  143.                         setCustomerBrand(data[0].custBrand);
  144.                         $("#Cust_mkt_unit_cd").val(data[0].custMarketCode);
  145.                         $("#Cust_paymt_term").val(data[0].custPaymtTerm);
  146.                         $("#Cust_srv_state").val(data[0].custSrvState);
  147.       setTaxExemptionCode(data[0].taxExemptCode);  
  148.  
  149.         $("#Cust_Biz_Contact").val(data[0].custBizContact);  
  150.        
  151.      }
  152.  
  153. -----------------------------
  154.  
  155.  
  156. function getSrviceStateDropDownValues(){
  157.  $('#Add_srv_state_group').empty();
  158.  $.ajax({
  159.     type : "GET",
  160.     url : "getStateDetails?systemName="+SysName,
  161.     data : "",
  162.     dataType : "json",
  163.     cache: false,
  164.     success : function(data) {
  165.    $('#Add_srv_state_group').append($('<option>').text('Select').attr('value', 'blank'));
  166.    $.each(data, function(i, value) {
  167.     $('#Add_srv_state_group').append($('<option>').text(value.stateDesc.trim()+ '  ('+value.stateId.trim()+')').attr('value', value.stateId));
  168.    });    
  169.    $("#Add_srv_state_group").selectmenu("refresh");
  170.     },error : function(error) {
  171.    redirectToLoginPage(error);
  172.   }
  173.    });
  174. }
  175.  
  176. ------------------------------
  177.  
  178.  
  179. function AddCustomerFileds(){
  180.   var userrole='&lt;%=mUserRole%&gt;';
  181.  
  182.           if (userrole != 'Admin' && userrole != 'Basic User'){
  183.          $("#Customer_profile_body").hide();
  184.     $('#bc_Error_msg').text(" Customer not present in DB");
  185.           $("#bc_Error_msg").css("display", "block");
  186.           } else{
  187.  
  188.   $("#Add_Customer_profile_body").show();
  189.  
  190.   getCountries();
  191.   // getStateDropDownValues();
  192.  
  193.    getSrviceStateDropDownValues();
  194.    var mCustomerid = $("#cust_ID").val().trim();
  195.   $("#Add_CustID").val(mCustomerid.toUpperCase());
  196.  
  197.   var maxEndDate = new Date(9999,11,31) ;
  198.         $("#Add_Cust_end_date").val($.datepicker.formatDate("mm/dd/yy", maxEndDate));
  199.        
  200.         $(function() {
  201.             $( "#Add_Cust_end_date" ).datepicker({
  202.                 showButtonPanel: false,
  203.             });
  204.         });
  205.        
  206.         $("#jendEffDate").val($.datepicker.formatDate("mm/dd/yy", maxEndDate));
  207.         $(function() {
  208.             $( "#jendEffDate" ).datepicker({
  209.                 showButtonPanel: false,
  210.             });
  211.  
  212.         });
  213.  
  214.   $("#Add_Cust_Bgn_date").val($.datepicker.formatDate("mm/dd/yy", new Date()));
  215.         $(function() {
  216.             $( "#Add_Cust_Bgn_date" ).datepicker({
  217.                 showButtonPanel: false,
  218.             });
  219.         });
  220.  
  221.         $("#jbegEffDate").val($.datepicker.formatDate("mm/dd/yy", new Date()));
  222.         $(function() {
  223.             $( "#jbegEffDate" ).datepicker({
  224.                 showButtonPanel: false,
  225.             });
  226.  
  227.         });
  228.        
  229.   }
  230.   }