<?php
require("../connection.php");
include("../user.php");
$user_id = $_SESSION['user'];
$username = $_SESSION['user_name'];
$branch_id = $_SESSION['branch_id'];
$ho_access = $_SESSION['ha'];
$branch = $_SESSION['division_name'];
//$row=mysqli_query($con,"select * from log_entry order by id  DESC");		
?>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><?php echo TITLE; ?></title>
  <meta name="description" content="Ela Admin - HTML5 Admin Template">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="apple-touch-icon" href="../images/bluebase.png">
  <link rel="shortcut icon" href="../images/bluebase.png">
  <link rel="stylesheet" href="../css/normalize.min.css">
  <link rel="stylesheet" href="../css/bootstrap.min.css">
  <link rel="stylesheet" href="../css/font-awesome.min.css">
  <link rel="stylesheet" href="../css/themify-icons.css">
  <link rel="stylesheet" href="../css/pe-icon-7-stroke.min.css">
  <link rel="stylesheet" href="../css/flag-icon.min.css">
  <link rel="stylesheet" href="../assets/css/cs-skin-elastic.css">
  <link rel="stylesheet" href="../assets/css/style.css">
  <link href="../css/chartist.min.css" rel="stylesheet">
  <link href="../css/jqvmap.min.css" rel="stylesheet">
  <link href="../css/weather-icons.css" rel="stylesheet" />
  <link href="../css/fullcalendar.min.css" rel="stylesheet" />
  <script src="../js/jquery-1.12.4.min.js"></script>
  <script src="../js/jquery-3.3.1.js"></script>
  <script src="../js/jquery.dataTables.min.js"></script>
  <script src="../js/popper.min.js"></script>
  <script src="../js/bootstrap.min.js"></script>
  <script src="../js/jquery.matchHeight.min.js"></script>
  <script src="../assets/js/main.js"></script>
  <script src="../js/jquery-3.3.1.min.js"></script>
  <link rel="stylesheet" href="/asset_temp/datatable/css/jquery.dataTables.min.css">
  <link rel="stylesheet" type="text/css" href="/asset_temp/button/css/buttons.css" />
  <script src="/asset_temp/datatable/js/jquery.dataTables.min.js"></script>
  <script src="../js/jquery.table2excel.min.js"></script>

  <style>
    #weatherWidget .currentDesc {
      color: #ffffff !important;
    }

    .traffic-chart {
      min-height: 335px;
    }

    #flotPie1 {
      height: 150px;
    }

    #flotPie1 td {
      padding: 3px;
    }

    #flotPie1 table {
      top: 20px !important;
      right: -10px !important;
    }

    .chart-container {
      display: table;
      min-width: 270px;
      text-align: left;
      padding-top: 10px;
      padding-bottom: 10px;
    }

    #flotLine5 {
      height: 105px;
    }

    #flotBarChart {
      height: 150px;
    }

    #cellPaiChart {
      height: 160px;
    }

    th {
      text-transform: uppercase;
    }

    td {
      text-transform: uppercase;
    }
  </style>
  <link rel="stylesheet" href="/asset_temp/datatable/css/jquery.dataTables.min.css">
  <script src="/asset_temp/datatable/js/jquery.dataTables.min.js"></script>
  <!-- button -->
  <link rel="stylesheet" type="text/css" href="/asset_temp/button/css/buttons.css" /><!-- button -->

</head>

<body>
  <?php require('../sidemenu.php'); ?>
  <!-- /#left-panel -->
  <!-- Right Panel -->
  <div id="right-panel" class="right-panel">
    <!-- Header-->
    <?php require('../header.php'); ?>
    <div class="content">
      <!-- Animated -->
      <div class="animated fadeIn">
        <div style="background-color:white;margin-bottom:10px;">
          <strong style="color:blue">
            <center>OVERALL REPORT</center>
          </strong>
        </div>

        <div style="margin-bottom:10px;">
          <input type="button" class="btn btn-success" value="Export to Excel" onclick="Export()" />
          <button class="btn btn-primary" onclick="printDivmovement()"><i class="fa fa-print"></i> Print</button>
        </div>
        <div class="d-flex align-items-end gap-3 flex-wrap">
          <div class="form-group">
            <label for="fromDate" class="form-label">From Date:</label>
            <input type="date" class="form-control" id="fromDate" name="fromDate">
          </div>

          <div class="form-group">
            <label for="toDate" class="form-label">To Date:</label>
            <input type="date" class="form-control" id="toDate" name="toDate">
          </div>

          <div class="form-group">
            <button class="btn btn-info" onclick="overall_level()">Filter</button>
          </div>
        </div>
        <div class="form-row align-items-center mb-3">
          <div class="col-md-3">
            <label for="inoutoption" class="form-control-label"><b>Inward/Outward</b></label>
            <select id="inoutoption" class="form-control select-search" onchange="overall_level()">
              <option value="all" selected>ALL</option>
              <option value="inward">INWARD</option>
              <option value="outward">OUTWARD</option>
            </select>
          </div>

          <div class="col-md-3">
            <label for="deptoption" class="form-control-label"><b>Department</b></label>
            <select id="deptoption" class="form-control select-search" onchange="overall_level()">
              <option value="all" selected>ALL</option>
              <?php
              $department = mysqli_query($con, "SELECT * FROM type_master where status='0'");
              while ($department_det = mysqli_fetch_array($department)) {
                echo "<option value='{$department_det['id']}'>" . strtoupper($department_det['type']) . "</option>";
              }
              ?>
            </select>
          </div>

          <div class="col-md-3">
            <label for="brnchoption" class="form-control-label"><b>Branch</b></label>
            <select id="brnchoption" class="form-control select-search" onchange="overall_level()">
              <option value="all" selected>ALL</option>
              <?php
              $branch = mysqli_query($con, "SELECT * FROM location_master where status='0'");
              while ($branch_det = mysqli_fetch_array($branch)) {
                echo "<option value='{$branch_det['id']}'>" . strtoupper($branch_det['location']) . "</option>";
              }
              ?>
            </select>
          </div>

          <div class="col-md-3">
            <label for="divsnoption" class="form-control-label"><b>Division</b></label>
            <select id="divsnoption" class="form-control select-search" onchange="overall_level()">
              <option value="all" selected>ALL</option>
              <?php
              $division = mysqli_query($con, "SELECT * FROM branch_master where status='0'");
              while ($division_det = mysqli_fetch_array($division)) {
                echo "<option value='{$division_det['id']}'>" . strtoupper($division_det['branch_name']) . "</option>";
              }
              ?>
            </select>
          </div>
        </div>



        <div id="DivIdToPrint">
        </div>
      </div>
    </div>
    <div class="clearfix"></div>
  </div>
</body>

</html>
<?php require("../mainjavascript.js"); ?>