<?php
	include(__DIR__."/../report_func.php");
	if ($_SESSION['user']['access_level'] < SABLE_ACCESS_MANAGER)
	{
		SableGeneralFunctions::divertFromPage();
	}
	$today = new DateTime();
?>
<script src="<?php SableGeneralFunctions::printModuleJS('report'); ?>"></script>

<!--// Area Type -->
<form id="frmTeamIncome" name="frmTeamIncome" autocomplete="on">
	<div class="forms">
		<div class="container forms-grids">
			<div class="row forms-grid">
				<div class="col-md-12">
					<h3 class="title"><i class="fa fa-hand-holding-usd" aria-hidden="true"></i>&nbsp;Income By Team</h3>
					<p></p>
				</div>
			</div>
			<!--// edtBookingDate -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="edtBookingDate" type="date" id="edtBookingDate" onblur="hideHint('edtBookingDate');"
						   onfocus="showHint('edtBookingDate');" placeholder="Date" onkeypress="handleEnter(this, event);" 
					value="<?php echo($today->format('Y-m-d')); ?>">	
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_edtBookingDate">Date</div>
				</div>
			</div>
			<p></p>
			<!-- edtBookingDate //-->
			<div id="divTeamIncomeResults">
				<span><i class="fa fa-info-circle"></i>&nbsp;Results will be displayed here.</span>
			</div>
			<p></p>
		<!--// buttons -->
			<div class="row forms-grid">
				<div class="col-md-2">
					<input type="button" id="btnCancel" value="Cancel"
					class="submit" onclick="window.location = '<?php SableSystem::printCallPageLink('/report/team/'); ?>'"/>
				</div>
				<div class="col-md-2 forms-grid">
					<input id="btnOk" type="button" onclick="showTeamIncome();" value="Run" class="submit"/>
				</div>
			</div>
		<!-- buttons //-->
		</div>
	</div>
</form>
<!-- Area Type //-->
<script>$(document).ready(function(e){showTeamIncome()});</script>
