<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Chandrani Pearls Gold Billing</title>
<link rel="icon" type="image/jpg" href="dist/img/favicon.png?v=2">
  <!-- Google Font: Source Sans Pro -->
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
  
  <!-- DataTables -->
  <link rel="stylesheet" href="plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
  <link rel="stylesheet" href="plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
  <link rel="stylesheet" href="plugins/datatables-buttons/css/buttons.bootstrap4.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="dist/css/adminlte.min.css">
  <link rel="stylesheet" href="dist/css/custom.css">
  <style>
  .fw-bolder{
     font-weight:900; 
  }
  
  
#tooltip
{
    text-align: center;
    color: #FFF;
    background: #777777;
    position: absolute;
    z-index: 100;
    padding: 8px 15px;
	font-size:12px;
	font-family: 'Roboto', sans-serif;
}
 
    #tooltip:after /* triangle decoration */
    {
        width: 0;
        height: 0;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-top: 10px solid #777777;
        content: '';
        position: absolute;
        left: 50%;
        bottom: -10px;
        margin-left: -10px;
    }
 
        #tooltip.top:after
        {
            border-top-color: transparent;
            border-bottom: 10px solid #777777;
            top: -20px;
            bottom: auto;
        }
 
        #tooltip.left:after
        {
            left: 10px;
            margin: 0;
        }
 
        #tooltip.right:after
        {
            right: 10px;
            left: auto;
            margin: 0;
        }
.fulldiv {
    float: left;
    width: 100%;
    height: 100%;
    top: 0;
    bottom: 0;
    background-color: rgba(38, 53, 68, 0.80);
    background: rgba(38, 53, 68, 0.80);
    z-index: 1500;
    position: fixed;
}
	  .message_maindiv_new {
    width: 430px;
    height: auto;
    margin: 0px auto;
}
	  .message_div_new {
    float: left;
    width: 100%;
    height: auto;
    padding: 3%;
    background-color: #FFFFFF;
    margin-top: 300px;
}
	  .message_title {
    float: left;
    width: 100%;
    height: auto;
    text-align: center;
    font-size: 20px;
    color: #000000;
    margin-bottom: 20px;
    text-transform: capitalize;
	  }
	  
	  .bg-maroon{
	  background-color:#d5042d !important;
	  }
	  


        .col-sm-12 {
        -ms-flex: 0 0 100%;
        flex: 0 0 100%;
        max-width: 100%;
        font-size: 13px;
    }


    th{

        font-size: 13px;

        
    }

</style>
<script>
$( function()
{
    var targets = $( '[rel~=tooltip]' ),
        target  = false,
        tooltip = false,
        title   = false;
 
    targets.bind( 'mouseenter', function()
    {
        target  = $( this );
        tip     = target.attr( 'title' );
        tooltip = $( '<div id="tooltip"></div>' );
 
        if( !tip || tip == '' )
            return false;
 
        target.removeAttr( 'title' );
        tooltip.css( 'opacity', 0 )
               .html( tip )
               .appendTo( 'body' );
 
        var init_tooltip = function()
        {
            if( $( window ).width() < tooltip.outerWidth() * 1.5 )
                tooltip.css( 'max-width', $( window ).width() / 2 );
            else
                tooltip.css( 'max-width', 340 );
 
            var pos_left = target.offset().left + ( target.outerWidth() / 2 ) - ( tooltip.outerWidth() / 2 ),
                pos_top  = target.offset().top - tooltip.outerHeight() - 20;
 
            if( pos_left < 0 )
            {
                pos_left = target.offset().left + target.outerWidth() / 2 - 20;
                tooltip.addClass( 'left' );
            }
            else
                tooltip.removeClass( 'left' );
 
            if( pos_left + tooltip.outerWidth() > $( window ).width() )
            {
                pos_left = target.offset().left - tooltip.outerWidth() + target.outerWidth() / 2 + 20;
                tooltip.addClass( 'right' );
            }
            else
                tooltip.removeClass( 'right' );
 
            if( pos_top < 0 )
            {
                var pos_top  = target.offset().top + target.outerHeight();
                tooltip.addClass( 'top' );
            }
            else
                tooltip.removeClass( 'top' );
 
            tooltip.css( { left: pos_left, top: pos_top } )
                   .animate( { top: '+=10', opacity: 1 }, 50 );
        };
 
        init_tooltip();
        $( window ).resize( init_tooltip );
 
        var remove_tooltip = function()
        {
            tooltip.animate( { top: '-=10', opacity: 0 }, 50, function()
            {
                $( this ).remove();
            });
 
            target.attr( 'title', tip );
        };
 
        target.bind( 'mouseleave', remove_tooltip );
        tooltip.bind( 'click', remove_tooltip );
    });
});
</script>
	
	</head>
	<body class="hold-transition sidebar-mini">
		
		
<div class="wrapper">
  <!-- Navbar -->
    <?php include ("topheader.php"); ?>
	<?php	
$Cur_Date = date('Y-m-d');
$Start = $Cur_Date . " 00:00:00";
$End = $Cur_Date . " 23:59:59";

$Get_Stock_Sql = $Mainclass->dbh->prepare("SELECT
                gpm.ProductCategory,
                gpm.GoldPurity,
                SUM(gpm.Stock) AS TotalStock,
                SUM(gpm.GoldWeight) AS TotalGoldWeight,
                gpc.Category,
				gpc.Color_Code,
                (
                    SELECT
                        grm.Selling_Rate
                    FROM
                        gold_rate_master grm
                    WHERE
                        grm.Karat = gpm.GoldPurity
                        AND (Entry_Date BETWEEN ? and ?)
                    ORDER BY
                        grm.Entry_Date DESC
                    LIMIT 1
                ) AS LastSellingRate
            FROM
                gold_products_master gpm
            LEFT JOIN
                gold_product_category_master gpc ON gpm.ProductCategory = gpc.SLN
            WHERE
                gpm.`Active` = 'Yes' 
				
            GROUP BY
                gpm.ProductCategory,
                gpm.GoldPurity
            ORDER BY
                CAST(gpm.ProductCategory AS UNSIGNED) ASC,
                gpm.GoldPurity DESC");
$Get_Stock_Sql->bind_param('ss', $Start, $End);
$Get_Stock_Sql->execute();
$Stock_Res = $Get_Stock_Sql->get_result();
$Get_Stock_Sql->close();
$Stock_Array = array();
while ($Ft_Stock = $Stock_Res->fetch_assoc()) {
    $category_id = $Ft_Stock['ProductCategory'];
    $category_name = $Ft_Stock['Category'];
    $purity = $Ft_Stock['GoldPurity'];
    $total_stock = $Ft_Stock['TotalStock'];
    $total_weight = $Ft_Stock['TotalGoldWeight'];
    $selling_rate = $Ft_Stock['LastSellingRate'];
    $Color_Code = $Ft_Stock['Color_Code'];
	if($total_stock>0)
	{
		$calculated_price = $selling_rate * $total_weight;
	}
	else
	{
		$calculated_price = "0.00";
	}
    

    if (!isset($Stock_Array[$category_id])) {
        $Stock_Array[$category_id] = [
			'cat_id' => $category_id,
			'category_name' => $category_name,
			'category_color' => $Color_Code,
            'total_pieces' => 0,
            'details' => [],
            'total_price' => 0
        ];
    }

    $Stock_Array[$category_id]['total_pieces'] += $total_stock;
    $Stock_Array[$category_id]['total_price'] += $calculated_price;
    $Stock_Array[$category_id]['details'][] = [		
        'purity' => $purity,
        'pieces' => $total_stock,
        'weight_gms' => $total_weight,
        'price' => $calculated_price
    ];
}

// Format the total price for each category
foreach ($Stock_Array as &$category_data) {
    $category_data['total_price_formatted'] = $category_data['total_price'];
}

	
/*echo "<pre>";
print_r($Stock_Array);
echo "</pre>";*/



?>
  <!-- /.navbar -->
  <!-- Main Sidebar Container -->
    <?php include ("sidemenu.php"); ?>
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1></h1>
                </div>
                <div class="col-sm-6">
                    
                </div>
            </div>
        </div>
    </section>
    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
        <div class="row">
			<div class="col-12">
      <div class="card">
                        <div class="card-header">
        <h4>View Stock Report</h4>
            
    </div>

                        <div class="card-body">





<div class="row">

<?php
	foreach($Stock_Array as $category_name => $data)
	{
		if($data['category_color']!='')
		{
			$c_code=$data['category_color'];
		}
		else
		{
			$c_code="#e2e2e2";
		}
		?>	
<div class="col-3">
	<a href="view_product.php?i=<?php echo base64_encode($data['cat_id']);?>" style="text-decoration: none; color:inherit;">
<div class="card w-100" style="background-color:<?php echo $c_code;?>">
 
  <div class="card-body p-2" style="height:130px;">
    <h5 class="card-title"><?php echo $data['category_name'];?></h5>
    <div class="card-text mt-0">
        
     <div class="row m-0 p-0 mb-2">
         <div class="col-lg-12 px-0" style="border-top:1px solid #000; border-bottom:1px solid #000;">
             
         <h5 class="fw-bolder mb-1"><?php echo $data['total_pieces']; ?>pcs <span style="float:right; text-align:right;"><?php echo number_format($data['total_price_formatted'],2); ?>/-</span></h5>    
             
         </div>
     </div>
     <?php
		foreach ($data['details'] as $detail)
		{
			?>
     <div class="row m-0 p-0 mb-1">
      <div class="col-lg-2 p-0"><h6 style="font-size:13px; text-align:left; border-right:1px solid #000; margin-bottom:0px;"><?php echo $detail['purity']; ?></h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;"><?php echo $detail['pieces']; ?>pcs</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;"><?php echo $detail['weight_gms']; ?>gms</h6></div> 
      <div class="col-lg-4 p-0"><h6 style="font-size:13px; text-align:right; margin-bottom:0px;">&#8377; <?php echo number_format($detail['price'],2); ?>/-</h6></div> 
    </div> 
		<?php
		}
		?>
    
    <!--<div class="row m-0 p-0 mb-1">
      <div class="col-lg-2 p-0"><h6 style="font-size:13px; text-align:left; border-right:1px solid #000; margin-bottom:0px;">18K</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">01pcs</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">2.5gms</h6></div> 
      <div class="col-lg-4 p-0"><h6 style="font-size:13px; text-align:right; margin-bottom:0px;">&#8377; 14,000/-</h6></div> 
    </div> 
        
       <div class="row m-0 p-0 mb-1">
      <div class="col-lg-2 p-0"><h6 style="font-size:13px; text-align:left; border-right:1px solid #000; margin-bottom:0px;">14K</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">03pcs</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">3.5gms</h6></div> 
      <div class="col-lg-4 p-0"><h6 style="font-size:13px; text-align:right; margin-bottom:0px;">&#8377; 15,000/-</h6></div> 
    </div> -->  
    
       
        
   
  </div>
</div>                  
</div>





</a>
</div>
	
	<?php
	}
	?>

<!--<div class="col-3">
<div class="card w-100" style="background-color:#faf6f6;">
 
  <div class="card-body p-2">
    <h5 class="card-title">Bangles</h5>
    <div class="card-text mt-0">
        
     <div class="row m-0 p-0 mb-2">
         <div class="col-lg-12 px-0" style="border-top:1px solid #000; border-bottom:1px solid #000;">
             
         <h5 class="fw-bolder mb-1">24pcs <span style="float:right; text-align:right;">53,000/-</span></h5>    
             
         </div>
     </div>
     
     <div class="row m-0 p-0 mb-1">
      <div class="col-lg-2 p-0"><h6 style="font-size:13px; text-align:left; border-right:1px solid #000; margin-bottom:0px;">22K</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">10pcs</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">4.5gms</h6></div> 
      <div class="col-lg-4 p-0"><h6 style="font-size:13px; text-align:right; margin-bottom:0px;">&#8377; 24,000/-</h6></div> 
    </div> 
    
    <div class="row m-0 p-0 mb-1">
      <div class="col-lg-2 p-0"><h6 style="font-size:13px; text-align:left; border-right:1px solid #000; margin-bottom:0px;">18K</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">01pcs</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">2.5gms</h6></div> 
      <div class="col-lg-4 p-0"><h6 style="font-size:13px; text-align:right; margin-bottom:0px;">&#8377; 14,000/-</h6></div> 
    </div> 
        
       <div class="row m-0 p-0 mb-1">
      <div class="col-lg-2 p-0"><h6 style="font-size:13px; text-align:left; border-right:1px solid #000; margin-bottom:0px;">14K</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">03pcs</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">3.5gms</h6></div> 
      <div class="col-lg-4 p-0"><h6 style="font-size:13px; text-align:right; margin-bottom:0px;">&#8377; 15,000/-</h6></div> 
    </div>   
    
       
        
   
  </div>
</div>                  
</div>






</div>


<div class="col-3">
<div class="card w-100" style="background-color:#e2e2e2;">
 
  <div class="card-body p-2">
    <h5 class="card-title">Pendant</h5>
    <div class="card-text mt-0">
        
     <div class="row m-0 p-0 mb-2">
         <div class="col-lg-12 px-0" style="border-top:1px solid #000; border-bottom:1px solid #000;">
             
         <h5 class="fw-bolder mb-1">24pcs <span style="float:right; text-align:right;">53,000/-</span></h5>    
             
         </div>
     </div>
     
     <div class="row m-0 p-0 mb-1">
      <div class="col-lg-2 p-0"><h6 style="font-size:13px; text-align:left; border-right:1px solid #000; margin-bottom:0px;">22K</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">10pcs</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">4.5gms</h6></div> 
      <div class="col-lg-4 p-0"><h6 style="font-size:13px; text-align:right; margin-bottom:0px;">&#8377; 24,000/-</h6></div> 
    </div> 
    
    <div class="row m-0 p-0 mb-1">
      <div class="col-lg-2 p-0"><h6 style="font-size:13px; text-align:left; border-right:1px solid #000; margin-bottom:0px;">18K</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">01pcs</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">2.5gms</h6></div> 
      <div class="col-lg-4 p-0"><h6 style="font-size:13px; text-align:right; margin-bottom:0px;">&#8377; 14,000/-</h6></div> 
    </div> 
        
       <div class="row m-0 p-0 mb-1">
      <div class="col-lg-2 p-0"><h6 style="font-size:13px; text-align:left; border-right:1px solid #000; margin-bottom:0px;">14K</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">03pcs</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">3.5gms</h6></div> 
      <div class="col-lg-4 p-0"><h6 style="font-size:13px; text-align:right; margin-bottom:0px;">&#8377; 15,000/-</h6></div> 
    </div>   
    
       
        
   
  </div>
</div>                  
</div>






</div>

<div class="col-3">
<div class="card w-100" style="background-color:#faf6f6;">
 
  <div class="card-body p-2">
    <h5 class="card-title">Bangles</h5>
    <div class="card-text mt-0">
        
     <div class="row m-0 p-0 mb-2">
         <div class="col-lg-12 px-0" style="border-top:1px solid #000; border-bottom:1px solid #000;">
             
         <h5 class="fw-bolder mb-1">24pcs <span style="float:right; text-align:right;">53,000/-</span></h5>    
             
         </div>
     </div>
     
     <div class="row m-0 p-0 mb-1">
      <div class="col-lg-2 p-0"><h6 style="font-size:13px; text-align:left; border-right:1px solid #000; margin-bottom:0px;">22K</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">10pcs</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">4.5gms</h6></div> 
      <div class="col-lg-4 p-0"><h6 style="font-size:13px; text-align:right; margin-bottom:0px;">&#8377; 24,000/-</h6></div> 
    </div> 
    
    <div class="row m-0 p-0 mb-1">
      <div class="col-lg-2 p-0"><h6 style="font-size:13px; text-align:left; border-right:1px solid #000; margin-bottom:0px;">18K</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">01pcs</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">2.5gms</h6></div> 
      <div class="col-lg-4 p-0"><h6 style="font-size:13px; text-align:right; margin-bottom:0px;">&#8377; 14,000/-</h6></div> 
    </div> 
        
       <div class="row m-0 p-0 mb-1">
      <div class="col-lg-2 p-0"><h6 style="font-size:13px; text-align:left; border-right:1px solid #000; margin-bottom:0px;">14K</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">03pcs</h6></div> 
      <div class="col-lg-3 p-0"><h6 style="font-size:13px; text-align:center; border-right:1px solid #000; margin-bottom:0px;">3.5gms</h6></div> 
      <div class="col-lg-4 p-0"><h6 style="font-size:13px; text-align:right; margin-bottom:0px;">&#8377; 15,000/-</h6></div> 
    </div>   
    
       
        
   
  </div>
</div>                  
</div>






</div>-->




                        </div>
                    </div> 
				</div>
            <!-- /.card -->
			</div>
			<!--/.row-->    
        
      </div>
      <!-- /.container-fluid -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
   <?php include ("footer.php"); ?>
  <!-- Control Sidebar -->
  <aside class="control-sidebar control-sidebar-dark">
    <!-- Control sidebar content goes here -->
  </aside>
  <!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->
<!-- jQuery -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>-->
<!-- Bootstrap 4 -->
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- DataTables  & Plugins -->
<script src="plugins/datatables/jquery.dataTables.min.js"></script>
<script src="plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
<script src="plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
<script src="plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
<script src="plugins/jszip/jszip.min.js"></script>
<script src="plugins/pdfmake/pdfmake.min.js"></script>
<script src="plugins/pdfmake/vfs_fonts.js"></script>
<script src="plugins/datatables-buttons/js/buttons.html5.min.js"></script>
<script src="plugins/datatables-buttons/js/buttons.print.min.js"></script>
<script src="plugins/datatables-buttons/js/buttons.colVis.min.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="dist/js/demo.js"></script>
<!-- Page specific script -->
<script>
  $(function () {
    $("#example1").DataTable({
      "responsive": true,
      "lengthChange": false,
      "autoWidth": false,
      "searching": true,
      "scrollX": true, // Enable horizontal scroll
      "buttons": ["csv", "excel"]
    }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');

    $('#example2').DataTable({
      "paging": true,
      "lengthChange": false,
      "searching": false,
      "ordering": true,
      "info": true,
      "autoWidth": false,
      "responsive": true,
      "scrollX": true, // Enable horizontal scroll
      "columnDefs": [
        { "width": "25%", "targets": 2 }, // Set width for the third column
      ]
    });
  });
  
  
</script>
	<script>
    /*ClassicEditor
        .create( document.querySelector( '#responsibility' ) )
        .catch( error => {
            console.error( error );
        } );*/
		var myEditor;

    ClassicEditor
        .create( document.querySelector( '#responsibility' ) )
        .then( editor => {
            console.log( 'Editor was initialized', editor );
            myEditor = editor;
        } )
        .catch( err => {
            console.error( err.stack );
        } );
    
</script>
	<script>
		function close_modal()
  {
    $(':input').val('');
    $('#ratemodal').modal('hide');
    $(':input').css('border-color','');
  }	
  

  
		</script>	
	
<script>

function modal_data(per){
    
$('#product_modal').modal('show');    

$.ajax({
url:'ajax-product-data.php',
type:'POST',
data:{per:per},
success:function(f){
    
$('#product_data').html(f);    

  
}
});
    
}


		</script>		
		
		
		
	<!-- Start Add Modal -->
<div class="modal fade" id="product_modal" tabindex="-1" aria-labelledby="product_modal" aria-hidden="true" >
    <div class="modal-dialog"  style="max-width: 60%;" >
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="product_modal">Product Details</h5>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close" onclick="close_modal()">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
                    
        <div class="modal-body" id="product_data" style="background:#fff ">

			
			
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal" onclick="close_modal()">Close</button>
        </div>
    
      </div>
    </div>
  </div>
  <!---End Add Modal-->

		
		
		
        
        <link rel="stylesheet" href="https://code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
 <script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script>

<script>
        $(function() {
            $("#from_date").datepicker({
                changeMonth: true,
                changeYear: true,
                dateFormat: 'dd-M-yy',
                onClose: function(selectedDate) {
                    $("#to_date").datepicker("option", "minDate", selectedDate);
                }
            });
        });


</script>



<script>
$(function() {
$( "#to_date" ).datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'dd-M-yy', 

});
});




</script>

		
</body>
</html>


