
$(document).ready(function(e) {
    $("select").select2();
});

function getResult()
{
		var cat_id = document.getElementById("cat_id").value;
		var from = document.getElementById("datepicker_from").value;
		var to = document.getElementById("datepicker_to").value;
		
		if(from != "" && to != "")
		{
			$('#resultDiv').load('buyBillReportsControllerAjax.php?from='+from+'&to='+to+'&catid='+cat_id,function(response, status, xhr) {
						//$('select').chosen();
						$.getScript('../views/default/js/jqueryui_init.js');
			}); 
			return false;
		}
}  
   
function showDetails(id)
{
	var start_date=document.getElementById("datepicker_from").value;
		var end_date=document.getElementById("datepicker_to").value;
		
		$("#product_detail").load("buyBillReportsControllerAjax.php?do=pdetails&proid="+id+"&from="+start_date+"&to="+end_date,function(){});

		$('#detailsModal').modal('show');
}

function hidepopdiv() 
{
	document.getElementById('pa').style.display='none';
}

// JavaScript Document
