<?php include("../header.php"); ?>
				
				<div class="row">
					<div class="col-lg-12 col-sm-12 col-md-12">
						
						<div class="card">
							<div class="card-header">
								Agent Wise APC Report
							</div>
							<div class="card-body">
						
								<div class="row">

									<div class="col-lg-4 col-sm-4 col-sm-4">

										<div class="form-group">
											<label for="name">Date From</label>
											<div class="input">
												<input type="text" id="date1" name="input.date1" class="form-control date hasDatepicker" value="">
											</div>
										</div>

									</div>
									
									<div class="col-lg-4 col-sm-4 col-sm-4">

										<div class="form-group">
											<label for="name">Date to</label>
											<div class="input">
												<input type="text" id="date2" name="input.date2" class="form-control date" value="">
											</div>
										</div>

									</div>
								
								</div>
								
							</div>
							
							<div class="card-footer">
								<button type="submit" class="btn btn-sm btn-primary" onclick="onAgentApc()"><i class="fa fa-dot-circle-o"></i> Submit</button>
								<button type="reset" class="btn btn-sm btn-danger"><i class="fa fa-ban"></i> Reset</button>
							</div>
						</div>
						
					</div>
				</div>
		
				<div class="row">
					<div class="col-lg-12">
						
						<div class="card">
							<div id="exlagentapc"></div>
							<div class="card-header">
								Agent Wise APC Report
								<button id='agentApcExcel' class="btn btn-primary" style="float: right; margin-top: 0;"><i class="fa fa-file-excel-o"></i> Excel</button>
								<button id="agentApcChart" class="btn btn-primary" style="float: right; margin: 0 5px 0 0;"><i class="fa fa-bar-chart"></i> Create Chart</button>
							</div>
							<div class="card-body">
						
								<div id="agent-apc"></div>
								
							</div>
						</div>
						
					</div>
				</div>
		
				<div id="myModal" class="modal report-modal">

					<!-- Modal content -->
					<div class="modal-content">
						<div class="modal-header">
							<span class="close">&times;</span>
							<h2>Agent Wise APC</h2>
						</div>
						<div class="modal-body">
							<div id="agentwiseapc"></div>
						</div>
					</div>

				</div>
	
<?php include("../footer.php"); ?>

<script type="text/javascript">
$( function(){
	$('#date1, #date2').datepicker({
		format: 'dd-mm-yyyy',
		autoclose: true,
		todayHighlight: true,
		orientation: "bottom auto"
	});
});

// Get the modal
var modal = document.getElementById('myModal');
var btn = document.getElementById("agentApcChart");
var span = document.getElementsByClassName("close")[0];
btn.onclick = function() {
    modal.style.display = "block";
}
span.onclick = function() {
    modal.style.display = "none";
}
window.onclick = function(event) {
    if (event.target == modal) {
        modal.style.display = "none";
    }
}
	
	
// excel
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-36251023-1']);
_gaq.push(['_setDomainName', 'jqueryscript.net']);
_gaq.push(['_trackPageview']);

(function() {
	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>