<!-- Content Header (Page header) -->
<section class="content-header">
	<div class="container-fluid">
		<div class="row mb-2">
			<div class="col-sm-6">
				<h1 class="m-0">Dashboard</h1>
			</div>
		</div>
	</div>
</section>

<!-- Main content -->
<section class="content dashboard">
	<div class="container-fluid">
		<!-- Small boxes (Stat box) -->
		<div class="row">
			<div class="col-lg-3 col-md-6">
				<!-- small box -->
				<div class="small-box bg-info">
					<div class="inner">
						<h3>Total Sales</h3>
						<p>
						<?php
							if ( $this->session->currency_symbol_position == 'Before' ) {
								echo $this->session->currency_symbol;
							}
							echo '&nbsp;' . $total_sales . '&nbsp;';
							if ( $this->session->currency_symbol_position == 'After' ) {
								echo $this->session->currency_symbol;
							}
						?>
						</p>
					</div>
					<div class="icon">
						<i class="fa fa-calculator"></i>
					</div>
					<a class="small-box-footer" href="inventory/sales-list">
						Sales List <i class="fas fa-arrow-circle-right"></i>
					</a>
				</div>
			</div>

			<div class="col-lg-3 col-md-6">
				<!-- small box -->
				<div class="small-box bg-success">
					<div class="inner">
						<h3>Total Sales Return</h3>
						<p>
						<?php
							if ( $this->session->currency_symbol_position == 'Before' ) {
								echo $this->session->currency_symbol;
							}
							echo '&nbsp;' . $total_sales_return . '&nbsp;';
							if ( $this->session->currency_symbol_position == 'After' ) {
								echo $this->session->currency_symbol;
							}
						?>
						</p>
					</div>
					<div class="icon">
						<i class="fa fa-calculator first"></i>
						<i class="fa fa-reply"></i>
					</div>
					<a class="small-box-footer" href="inventory/sales-return-list">
						Sales Return List <i class="fas fa-arrow-circle-right"></i>
					</a>
				</div>
			</div>

			<div class="col-lg-3 col-md-6">
				<!-- small box -->
				<div class="small-box bg-warning">
					<div class="inner">
						<h3 class="text-white">Total Purchase</h3>
						<p>
						<?php
							if ( $this->session->currency_symbol_position == 'Before' ) {
								echo $this->session->currency_symbol;
							}
							echo '&nbsp;' . $total_purchase . '&nbsp;';
							if ( $this->session->currency_symbol_position == 'After' ) {
								echo $this->session->currency_symbol;
							}
						?>
						</p>
					</div>
					<div class="icon">
						<i class="fa fa-shopping-cart"></i>
					</div>
					<a class="small-box-footer" href="inventory/purchase-list">
						Purchase List <i class="fas fa-arrow-circle-right"></i>
					</a>
				</div>
			</div>

			<div class="col-lg-3 col-md-6">
				<!-- small box -->
				<div class="small-box bg-danger">
					<div class="inner">
						<h3>Total Purchase Return</h3>
						<p>
						<?php
							if ( $this->session->currency_symbol_position == 'Before' ) {
								echo $this->session->currency_symbol;
							}
							echo '&nbsp;' . $total_purchase_return . '&nbsp;';
							if ( $this->session->currency_symbol_position == 'After' ) {
								echo $this->session->currency_symbol;
							}
						?>
						</p>
					</div>
					<div class="icon">
						<i class="fa fa-shopping-cart first"></i>
						<i class="fa fa-reply"></i>
					</div>
					<a class="small-box-footer" href="inventory/purchase-return-list">
						Purchase Return List <i class="fas fa-arrow-circle-right"></i>
					</a>
				</div>
			</div>
		</div>

		<div class="row">
			<div class="col-lg-8">
				<!-- BAR CHART -->
				<div class="card">
					<div class="card-header">
						<h3 class="card-title">Last 7 day's Sales & Purchase</h3>
					</div>

					<div class="card-body">
						<div class="chart">
							<canvas id="barChart" style="min-height: 400px; height: 400px; max-height: 400px; max-width: 100%;"></canvas>
						</div>
					</div>
				</div>
			</div>

			<div class="col-lg-4">
				<!-- PIE CHART -->
				<div class="card">
					<div class="card-header">
						<h3 class="card-title">Last 7 day's Top Selling Products</h3>
					</div>
					<div class="card-body">
						<canvas id="pieChart" style="min-height: 400px; height: 400px; max-height: 400px; max-width: 100%;"></canvas>
					</div>
				</div>
			</div>
		</div>
	</div>
</section>