	<?php $this->load->view("common/header"); ?>
	<!-- end: HEAD -->
		<!-- start: CSS REQUIRED FOR THIS PAGE ONLY -->
		<link rel="stylesheet" href="<?php echo asset_url(); ?>plugins/fullcalendar/fullcalendar/fullcalendar.css">
		<!-- end: CSS REQUIRED FOR THIS PAGE ONLY -->

	<!-- end: HEAD -->
	<!-- start: BODY -->
	<body>
		<!-- start: HEADER -->
		<div class="navbar navbar-inverse navbar-fixed-top">
			<!-- start: TOP NAVIGATION CONTAINER -->
			<div class="container">
				<div class="navbar-header">
					<!-- start: RESPONSIVE MENU TOGGLER -->
					<button data-target=".navbar-collapse" data-toggle="collapse" class="navbar-toggle" type="button">
						<span class="clip-list-2"></span>
					</button>
					<!-- end: RESPONSIVE MENU TOGGLER -->
					<!-- start: LOGO -->
					<?php $this->load->view("common/logo"); ?>
					<!-- end: LOGO -->
				</div>
				<div class="navbar-tools">
					<!-- start: TOP NAVIGATION MENU -->
				<?php $this->load->view("common/notifications.php"); ?>
					<!-- end: TOP NAVIGATION MENU -->
				</div>
			</div>
			<!-- end: TOP NAVIGATION CONTAINER -->
		</div>
		<!-- end: HEADER -->
		<!-- start: MAIN CONTAINER -->
		<div class="main-container">
			<div class="navbar-content">
				<!-- start: SIDEBAR -->
					<?php $this->load->view("common/navigation"); ?>
				<!-- end: SIDEBAR -->
			</div>
			<!-- start: PAGE -->
			<div class="main-content">
				<!-- start: PANEL CONFIGURATION MODAL FORM -->
				<div class="modal fade" id="panel-config" tabindex="-1" role="dialog" aria-hidden="true">
					<div class="modal-dialog">
						<div class="modal-content">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
									&times;
								</button>
								<h4 class="modal-title">Panel Configuration</h4>
							</div>
							<div class="modal-body">
								Here will be a configuration form
							</div>
							<div class="modal-footer">
								<button type="button" class="btn btn-default" data-dismiss="modal">
									Close
								</button>
								<button type="button" class="btn btn-primary">
									Save changes
								</button>
							</div>
						</div>
						<!-- /.modal-content -->
					</div>
					<!-- /.modal-dialog -->
				</div>
				<!-- /.modal -->
				<!-- end: SPANEL CONFIGURATION MODAL FORM -->
				<div class="container">
					<!-- start: PAGE HEADER -->
					<div class="row">
						<div class="col-sm-12">
							<!-- start: PAGE TITLE & BREADCRUMB -->
							<ol class="breadcrumb">
								<li>
									<i class="clip-home-3"></i>
									<a href="#">
										Home
									</a>
								</li>
								<li class="active">
									Dashboard
								</li>
								<li class="search-box">
									<form class="sidebar-search">
										<div class="form-group">
											<input type="text" placeholder="Start Searching...">
											<button class="submit">
												<i class="clip-search-3"></i>
											</button>
										</div>
									</form>
								</li>
							</ol>
							<div class="page-header">
								<h1>Dashboard <small>overview &amp; stats </small></h1>
							</div>
                            
                            
                            <div class="row">
						<div class="col-sm-12">
                        <div class="row text-center">
                     
<div style="margin-top:80px; margin-bottom:80px;">
    <h1> </h1>
    
    <!-- 
                   		 <img src="<?php echo base_url();?>/thems/images/laser_logo.png" class="" width="50%"> 
                   		 -->
                            
                            
                           
  </div>                        

						<div class="col-sm-12">
                                                
                        
                                                
                        
                        


<!--<div id="cur_usr_name"></div>-->




                        </div>
                       </div>
							
						</div>
					</div>
                    
                    
							<!-- end: PAGE TITLE & BREADCRUMB -->
						</div>
					</div>
                    <?php if ($this->session->userdata('ss_warehouse_id')==2){ ?>
					<div class="row">
						<div class="col-sm-12">
							<div class="panel panel-default">
								<div class="panel-heading">
									<i class="fa fa-bar-chart-o"></i>
									Best Sales (<?php echo date("M-Y"); ?>)
								</div>
							<div id="container1" style="min-width: 300px; height: 400px; margin: 0 auto"></div>
							</div>
						</div>
					</div>
                    <?php }?>
					
			</div>
			<!-- end: PAGE -->
		</div>
		<!-- end: MAIN CONTAINER -->
		<!-- start: FOOTER -->
		<div class="footer clearfix">
			<div class="copyright">
				<?php $this->load->view("common/site_by"); ?>
			</div>
			<div class="footer-items">
				<span class="go-top"><i class="clip-chevron-up"></i></span>
			</div>
		</div>
		<!-- end: FOOTER -->
		
		
		<!-- start: MAIN JAVASCRIPTS -->
		<?php $this->load->view("common/footer"); ?>
		
		<script src="<?php echo asset_url(); ?>js/jquery-ui.js" ></script> 
<script src="<?php echo asset_url(); ?>js/moment-with-locales.js"></script> 
<script type="text/javascript" src="<?php echo asset_url(); ?>js/bootstrap-datetimepicker.js"></script> 
<script type="text/javascript" src="<?php echo asset_url(); ?>js/bootbox.min.js"></script> 
<script type="text/javascript" src="<?php echo asset_url(); ?>js/accounting.js"></script> 
<script type="text/javascript" src="<?php echo asset_url(); ?>js/accounting.min.js"></script> 

		<!-- end: MAIN JAVASCRIPTS -->
		<!-- start: JAVASCRIPTS REQUIRED FOR THIS PAGE ONLY -->
		<script src="<?php echo asset_url(); ?>plugins/jquery.sparkline/jquery.sparkline.js"></script>
		<script src="<?php echo asset_url(); ?>plugins/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js"></script>
		
		<!-- end: JAVASCRIPTS REQUIRED FOR THIS PAGE ONLY -->
<?php 

//echo "<pre>"; print_r($current_month_best_sales);
//echo date("m",strtotime("-1 month"));
?>

		<script src="<?php echo asset_url(); ?>/js/highcharts.js"></script>
		<script type="text/javascript">
				$(function () {
           $('#container1').highcharts({
                chart: {type: 'column'},
                title: {text: ''},
                credits: {enabled: false},
                xAxis: {type: 'category', labels: {rotation: -60, style: {fontSize: '13px'}}},
                yAxis: {min: 0, title: {text: ''}},
                legend: {enabled: false},
                series: [{
                    name: 'Sold',
                    data: [
					<?php foreach ($current_month_best_sales as $key => $bestsales) {
						$p_name=preg_replace("/[^a-zA-Z]/", "",$bestsales->product_name);
						?>
					  ['(<?php echo $bestsales->product_code; ?>) <?php echo $p_name ?> ',<?php echo $bestsales->fi_qty_tot; ?>],
					<?php }?>
										
					],
                    dataLabels: {
                        enabled: true,
                        rotation: -90,
                        color: '#000',
                        align: 'right',
                        y: -25,
                        style: {fontSize: '12px'}
                    }
                }]
            });
           $('#container2').highcharts({
                chart: {type: 'column'},
                title: {text: ''},
                credits: {enabled: false},
                xAxis: {type: 'category', labels: {rotation: -60, style: {fontSize: '13px'}}},
                yAxis: {min: 0, title: {text: ''}},
                legend: {enabled: false},
                series: [{
                    name: 'Sold',
                    data: [
					<?php foreach ($last_month_best_sales as $key => $bestsales) { $p_name=preg_replace("/[^a-zA-Z]/", "",$bestsales->product_name);?>
					['(<?php echo $bestsales->product_code; ?>)<?php echo $p_name; ?> <?php if ($bestsales->product_part_no) echo ", Part No: $bestsales->product_part_no"; ?> <?php if ($bestsales->product_oem_part_number) echo ", OEM Part No: $bestsales->product_oem_part_number"; ?>', <?php echo $bestsales->fi_qty_tot; ?>],
					<?php }?>
					],
                    dataLabels: {
                        enabled: true,
                        rotation: -90,
                        color: '#000',
                        align: 'right',
                        y: -25,
                        style: {fontSize: '12px'}
                    }
                }]
            });
			
			
           $('#container3').highcharts({
                chart: {type: 'column'},
                title: {text: ''},
                credits: {enabled: false},
                xAxis: {type: 'category', labels: {rotation: -60, style: {fontSize: '13px'}}},
                yAxis: {min: 0, title: {text: ''}},
                legend: {enabled: false},
                series: [{
                    name: 'Sold',
                    data: [<?php foreach ($last_2_month_best_sales as $key => $bestsales) { $p_name=preg_replace("/[^a-zA-Z]/", "",$bestsales->product_name);?>
					['(<?php echo $bestsales->product_code; ?>) <?php echo $p_name; ?> <?php if ($bestsales->product_part_no) echo ", Part No: $bestsales->product_part_no"; ?> <?php if ($bestsales->product_oem_part_number) echo ", OEM Part No: $bestsales->product_oem_part_number"; ?>', <?php echo $bestsales->fi_qty_tot; ?>],
					<?php }?>],
                    dataLabels: {
                        enabled: true,
                        rotation: -90,
                        color: '#000',
                        align: 'right',
                        y: -25,
                        style: {fontSize: '12px'}
                    }
                }]
            });
			
					});
		</script>

	</body>
	<!-- end: BODY -->
</html>