
    $(document).ready(function(){
        $("#calender2").click(function(){
        
           //alert('hai');
           $(".spindis").show();
           var customer = $("#customer").val();
           var product = $("#product").val();
         var vehicle = $("#vehicle").val();
         var customertype = $("#customertype").val();
            var fromdate = $("#input_from").val();
            var todate = $("#input_to").val();
            var fromti = $("#timefrom").val();
            var toti = $("#timeto").val();
            var fromtime= fromti + ':00';
            var totime= toti + ':00';
           // alert(customer);
            if(customer =="0" && product == "01" && customertype =="0" && vehicle == "0")
           {
               //alert('hello');
       //alert(totime);
           $.ajax({
               type:'POST',
               url:'ajaxpathreport/dailyreporttimedate.php',
               data:{tod:todate,fromd:fromdate,fromt:fromtime,tot:totime},
               success:function(a){
               //  alert(a);
                // $("#showquantity-with-color").css("display","block");
                 $("#fullreport").html(a);
                 //alert(a);
                 $("#input_from").val("");
                $("#input_to").val("");
               
                
              }
                           });
                        
                //alert('hai');
                $("#modaldis").click();
                        }
                        if(customer !="0" && product == "01" && customertype =="0" && vehicle == "0")
                        {
                    //alert(totime);
                        $.ajax({
                            type:'POST',
                            url:'ajaxpathreport/dailyreporttimedatecus.php',
                            data:{tod:todate,fromd:fromdate,fromt:fromtime,tot:totime,customer:customer},
                            success:function(a){
                            //  alert(a);
                             // $("#showquantity-with-color").css("display","block");
                              $("#fullreport").html(a);
                              //alert(a);
                              $("#input_from").val("");
                             $("#input_to").val("");
                            
                             
                           }
                                        });
                                     
                             //alert('hai');
                             $("#modaldis").click();
                                     }
                                     if(customer =="0" && product != "01" && customertype =="0" && vehicle == "0")
           {
               //alert('hello');
       //alert(totime);
           $.ajax({
               type:'POST',
               url:'ajaxpathreport/dailyreporttimedateproduct.php',
               data:{tod:todate,fromd:fromdate,fromt:fromtime,tot:totime,product:product},
               success:function(a){
               //  alert(a);
                // $("#showquantity-with-color").css("display","block");
                 $("#fullreport").html(a);
                 //alert(a);
                 $("#input_from").val("");
                $("#input_to").val("");
               
                
              }
                           });
                        
                //alert('hai');
                $("#modaldis").click();
                        }
            
                        if(customer !="0" && product != "01" && customertype =="0" && vehicle == "0")
                        {
                            //alert('hello');
                    //alert(totime);
                        $.ajax({
                            type:'POST',
                            url:'ajaxpathreport/dailyreporttimedateproductcus.php',
                            data:{tod:todate,fromd:fromdate,fromt:fromtime,tot:totime,product:product,customer:customer},
                            success:function(a){
                            //  alert(a);
                             // $("#showquantity-with-color").css("display","block");
                              $("#fullreport").html(a);
                              //alert(a);
                              $("#input_from").val("");
                             $("#input_to").val("");
                            
                             
                           }
                                        });
                                     
                             //alert('hai');
                             $("#modaldis").click();
                                     }
                        
       // customerproajax
       if(customer =="0" && product == "01" && customertype =="0" && vehicle != "0")
       {
           //alert('hello');
   //alert(totime);
       $.ajax({
           type:'POST',
           url:'ajaxpathreport/dailyreporttimedatevehicle.php',
           data:{tod:todate,fromd:fromdate,fromt:fromtime,tot:totime,vehicle:vehicle},
           success:function(a){
           //  alert(a);
            // $("#showquantity-with-color").css("display","block");
             $("#fullreport").html(a);
             //alert(a);
             $("#input_from").val("");
            $("#input_to").val("");
           
            
          }
                       });
                    
            //alert('hai');
            $("#modaldis").click();
                    }
       

        });

    
           });
       
       
        