function getActiveCompaign(){
	jQuery.ajax({
		type: 'POST',
		url: siteUrl+'compaigns/activeCompaign',
		success: function(data){
			$('#active_compaign').html(data);
		},
		statusCode: {
			404: function() {
				error404();
			}
		}
	});
}

function getDepotReport(depot_id){
	
	jQuery.ajax({
		type: 'POST',
		url: siteUrl+'stocks/depotStock/'+depot_id,
		success: function(data){
			
			$('#depot_stocks').html(data);
		},
		statusCode: {
			404: function() {
				error404();
			}
		}
	});
}

function customerSale(){
	$('#customerSale').show();
	jQuery.ajax({
		type: 'POST',
		url: siteUrl+'customers/saleActivity',
		success: function(data){
			
			$('#customerSale').html(data);
		},
		statusCode: {
			404: function() {
				error404();
			}
		}
	});
}

function userSale(){
	$('#userSale').show();
	jQuery.ajax({
		type: 'POST',
		url: siteUrl+'users/saleActivity',
		success: function(data){
			
			$('#userSale').html(data);
		},
		statusCode: {
			404: function() {
				error404();
			}
		}
	});
}

function userTotalCustomer(){
	$('#userTotalCustomer').show();
	jQuery.ajax({
		type: 'POST',
		url: siteUrl+'users/customerCount',
		success: function(data){
			
			$('#userTotalCustomer').html(data);
		},
		statusCode: {
			404: function() {
				error404();
			}
		}
	});
}
function notVisitesCustomer(){
	$('#notVisitesCustomer').show();
	jQuery.ajax({
		type: 'POST',
		url: siteUrl+'customers/notvisited',
		success: function(data){			
			$('#notVisitesCustomer').html(data);
		},
		statusCode: {
			404: function() {
				error404();
			}
		}
	});
}

function userTotalCustomerVisit(fromDate, endDate){
	$('#userCustomerVisits').show();
	jQuery.ajax({
		type: 'POST',
		url: siteUrl+'users/visits?from='+fromDate+'&to='+endDate,
		success: function(data){
			
			$('#userCustomerVisits').html(data);
		},
		statusCode: {
			404: function() {
				error404();
			}
		}
	});
}