<?php
	$now = @$this->uri->segment(3);
	$cat = substr($now,-1);
?>
<style>
	label{
		cursor:pointer;
	}
	.daterangepicker .input-mini{
		width:100px;
		padding:0px;	s
	}
	.daterangepicker .calendar{
		max-width:320px;
	}
	.ranges{
		clear:both;
	}
 
</style>
<?php
		$y = date("Y");
		if(isset($_GET['y'])){
			$y = $_GET['y'];
		}
?>
<h3 class="page-header">
	Hasil Laporan Laba <?=$y;?>
</h3>
<a href='<?=base_url();?>webadmin/dashboard/laporan-laba?y=2019' class='btn btn-success'>2019</a>
<a href='<?=base_url();?>webadmin/dashboard/laporan-laba?y=2020' class='btn btn-success'>2020</a>
<a href='<?=base_url();?>webadmin/dashboard/laporan-laba?y=2021' class='btn btn-success'>2021</a>
<a href='<?=base_url();?>webadmin/dashboard/laporan-laba?y=2022' class='btn btn-success'>2022</a>
<div class="panel panel-default">
 
	<div class="panel-body">
		 
		<div  id='graph'>
		<?php if(isset($resultgraph) && count($resultgraph) > 0){?>
			<canvas id="myChartLaba" width="400" height="100"></canvas>
			<hr>	
			<table class='table'>
				<tr> 
					<th width='150'>Periode</th>
					<th><?=$y;?></th>
				</tr>
				<tr> 
					<th>Total Provit</th>
					<th>Rp. <?=number_format($totdapat);?></th>
				</tr>
			</table>			 
		<?php }?>
		</div>
		
	</div>
</div>
 