ok

Mini Shell

Direktori : /home2/selectio/www/lilyexpresslive/software/admin/js/
Upload File :
Current File : /home2/selectio/www/lilyexpresslive/software/admin/js/validateOnetimePickupAdd.js

   $(document).ready(function(){
   /***********    For fetching gst number ***********/
         $('#client_id').on('change',function(){
           var client_id=$(this).val();
           if(client_id){
                $.ajax({
                  type:'POST',
                  url:'get_client_data.php',
                  data:{id:client_id},
                   dataType: 'json',
                  success:function(response){
                      var len = response.length;
                      $('#gst').val(response[0]['gst']);
                      
                      if(client_id==1){
                          $('#office_customer').show();
                      }else{
                          $('#office_customer').hide();
                      }
                  }
               });
           }
       });
    
           
      
         
       $('#payment_mode').on('change',function(){
            var mode=$(this).val();
            if(mode=='credit')
            {
                $('#total_charges').val('credit');
                $('#other_charges').val('credit');
                $('#total_charges').prop('readonly', true);
                $('#other_charges').prop('readonly', true);
            }
             if(mode=='cash')
            {
                $('#total_charges').val('');
                $('#other_charges').val('');
                $('#total_charges').prop('readonly', false);
                $('#other_charges').prop('readonly', false);
            }
            
       });
    });
function formValidate() {
	var valid = 1;
	if ($('#client_id').val() == 'none') {
		$('#client_id_txt').text('Please select the Client');
		$('#client_id_txt').css('color', 'red');
		valid=0;
	} else {
		$('#client_id_txt').text('');
	}
	if ($('#awb_value').val() == 'no') {
	    alert('awb is 1');
		$('#awb_txt').text('Please Enter Valid AWB Number');
		$('#awb_txt').css('color', 'red');
		valid=0;
	} else {
		$('#awb_txt').text('');
	}
		if ($('#db_value').val() == 'no' && $('#client_id').val()!=1) {
		$('#db_code_txt').text('Please Enter Valid DP Code');
		$('#db_code_txt').css('color', 'red');
		valid=0;
	} else {
		$('#db_code_txt').text('');
	}
	return valid;
}

Zerion Mini Shell 1.0