
    $(document).ready(function(){
        $("#calender").click(function(){
        
           
           $(".spindis").show();
            var fromd = $("#input_from").val();
            var tod = $("#input_to").val();
            var customer = $("#customer").val();
            var product = $("#product").val();
            var customertype = $("#customertype").val();
            var vehicle = $("#vehicle").val();
            //alert(product);
            if(customer =="0" && product == "01" && customertype =="0" && vehicle == "0")
            {
            $.ajax({
           type:'POST',
           url:'ajaxpathreport/dailyreportdate.php',
           data:{customer:customer,tod:tod,fromd:fromd,product:product},
           success:function(a){
           //  alert(a);
            // $("#showquantity-with-color").css("display","block");
             $("#fullreport").html(a);
             //alert(a);
             $("#input_from").val("");
            $("#input_to").val("");
            $("#customer").val(null).trigger('change');
            $("#product").val(null).trigger('change');
          }
                       });
            //alert('hai');
            $("#modaldis").click();
                   }
                   // customerajax
                   if(customer !="0" && product == "01" && customertype =="0" && vehicle == "0")
                   {
                       $.ajax({
                           type:'POST',
                           url:'ajaxpathreport/dailyreportcustomerdate.php',
                           data:{customer:customer,tod:tod,fromd:fromd,product:product},
                           success:function(a){
                           //  alert(a);
                            // $("#showquantity-with-color").css("display","block");
                             $("#fullreport").html(a);
                             //alert(a);
                             $("#input_from").val("");
                            $("#input_to").val("");
                            $("#customer").val(null).trigger('change');
                            $("#product").val(null).trigger('change');
                          }
                                       });
                            //alert('hai');
                            $("#modaldis").click();
                           
                   }
       // customerajax
       // productajax
       if(customer =="0" && product != "01" && customertype =="0" && vehicle == "0")
       {
           $.ajax({
               type:'POST',
               url:'ajaxpathreport/dailyreportproductdate.php',
               data:{customer:customer,tod:tod,fromd:fromd,product:product},
               success:function(a){
               //  alert(a);
                // $("#showquantity-with-color").css("display","block");
                 $("#fullreport").html(a);
                 //alert(a);
                 $("#input_from").val("");
                $("#input_to").val("");
                $("#customer").val(null).trigger('change');
                $("#product").val(null).trigger('change');
              }
                           });
                //alert('hai');
                $("#modaldis").click();
               
       }
       // productajax
       //$("#customer").focus();
       // customerproajax
       if(customer !="0" && product != "01" && customertype =="0" && vehicle == "0")
       {
           $.ajax({
               type:'POST',
               url:'ajaxpathreport/dailyreportproductcusdate.php',
               data:{customer:customer,tod:tod,fromd:fromd,product:product},
               success:function(a){
               //  alert(a);
                // $("#showquantity-with-color").css("display","block");
                 $("#fullreport").html(a);
                 //alert(a);
                 $("#input_from").val("");
                $("#input_to").val("");
                $("#customer").val(null).trigger('change');
                $("#product").val(null).trigger('change');
                
              }
                           });
                //alert('hai');
                $("#modaldis").click();
       
               
       }
       // customerproajax
       // customertypeajax
       if(customer =="0" && product == "01" && customertype !="0" && vehicle == "0")
       {
         //alert('hai');``
           $.ajax({
               type:'POST',
               url:'ajaxpathreport/dailyreportcustypedate.php',
               data:{customer:customer,tod:tod,fromd:fromd,product:product,customertype:customertype},
               success:function(a){
               //  alert(a);
                // $("#showquantity-with-color").css("display","block");
                 $("#fullreport").html(a);
                 //alert(a);
                 $("#input_from").val("");
                $("#input_to").val("");
                $("#customer").val(null).trigger('change');
                $("#product").val(null).trigger('change');
                
              }
                           });
                //alert('hai');
                $("#modaldis").click();
       
               
       }
       // customertypeajax
       // vehicleajax
       if(customer =="0" && product == "01" && customertype =="0" && vehicle != "0")
       {
         //alert('hai');``
           $.ajax({
               type:'POST',
               url:'ajaxpathreport/dailyreportvehicledate.php',
               data:{customer:customer,tod:tod,fromd:fromd,product:product,customertype:customertype,vehicle:vehicle},
               success:function(a){
               //  alert(a);
                // $("#showquantity-with-color").css("display","block");
                 $("#fullreport").html(a);
                 //alert(a);
                 $("#input_from").val("");
                $("#input_to").val("");
                $("#customer").val(null).trigger('change');
                $("#product").val(null).trigger('change');
                
              }
                           });
                //alert('hai');
                $("#modaldis").click();
       
               
       }
       // vehicleajax
        });
        
           });
       
       
        