GIF89a php
Current File : /home/hencockfreshchic/public_html/erp/totalPL.php
<?php
include("session.php");
include("connect.php");
include("libs.php");
include("page_content.php");
include("user_profile.php");
include("menu_links.php");
include("subCals/total_users.php");
?>
<!DOCTYPE html>
<html>

<head>

  <script type="text/javascript" src="editor/ed.js"></script>
  
<!--<script src="https://cloud.tinymce.com/stable/tinymce.min.js?apiKey=hmj5wmc3u49zbs29zpa584l5kaml1l4wvmt6o9k9u0k3uzci"></script>
  <script src="https://cloud.tinymce.com/stable/tinymce.min.js"></script>
  <script>tinymce.init({ selector:'textarea' });</script> -->   
  
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><?php echo $page_title18; ?></title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.7 -->
  <link rel="stylesheet" href="css/bootstrap.min.css">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="css/font-awesome.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="css/AdminLTE.css">
  <link rel="stylesheet" href="css/all-skins.min.css">
  <script src='https://kit.fontawesome.com/a076d05399.js' crossorigin='anonymous'></script>
  <script src="https://kit.fontawesome.com/67adbbaee5.js" crossorigin="anonymous"></script>
  <link rel="stylesheet" href="css/bootstrap-tagsinput.css">

  
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

  <link rel="stylesheet" href="ckeditor/sample/css/samples.css">
  <link rel="stylesheet" href="ckeditor/toolbarconfigurator/lib/codemirror/neo.css">
  <link rel="stylesheet" href="ckeditor/sample/css/samples.css">
  <link rel="stylesheet" href="ckeditor/toolbarconfigurator/lib/codemirror/neo.css">
  <script src="ckeditor/ckeditor.js"></script>
      <script src="ckeditor/sample/js/sample.js"></script>

<script type="text/javascript" src="js/deleteData.js"></script>
<script type="text/javascript" src="js/searchMe4.js"></script>

<script src="js/hideForm.js"></script>  
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

  <header class="main-header">
    <!-- Logo -->
    <a href="index.php" class="logo" style="background-color:<?php echo $header_color_light; ?> !important">
      <!-- mini logo for sidebar mini 50x50 pixels -->
      <span class="logo-mini"><?php echo $page_title18; ?></span>
      <!-- logo for regular state and mobile devices -->
      <span class="logo-lg" style="background-color:<?php echo $header_color_light; ?> !important"><?php echo $logo; ?></span>
    </a>
    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top" style="background-color:<?php echo $header_color; ?> !important">
      <!-- Sidebar toggle button-->
      <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
        <span class="sr-only">Toggle navigation</span>
      </a>


       <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
        
          <li class="dropdown user user-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">              
              <span class="hidden-xs"><?php echo $user_name; ?><i class="fa fa-caret-down"></i></span>
            </a>
            <ul class="dropdown-menu">
              <!-- User image -->
              <li class="user-header">
               <!-- <img src="dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">  -->

                <p>
                  <?php echo getUser($conn,$_COOKIE["sr"]); ?>
                </p>
              </li>
             
              <!-- Menu Footer-->
              <li class="user-footer">          
                <div class="pull-right">
                  <a href="logout.php?page=index" class="btn btn-default btn-flat">Sign out</a>
                </div>
              </li>
            </ul>
          </li>
          <!-- Control Sidebar Toggle Button -->
         
        </ul>
      </div>
    </nav>
  </header>
  <!-- Left side column. contains the logo and sidebar -->
  <aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
      <!-- sidebar menu: : style can be found in sidebar.less -->
      <ul class="sidebar-menu" data-widget="tree">
        <li class="header">MAIN NAVIGATION</li>    
           
           <?php include("menus.php"); ?>           
      
      </ul>
    </section>
    <!-- /.sidebar -->
  </aside>

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        Dashboard
        <small><?php echo $page_title18; ?></small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="index.php"><i class="fa fa-dashboard"></i> Home</a></li>
        <li class="active">Dashboard</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
      <!-- Small boxes (Stat box) -->
      <div class="row">
        <div class="col-md-1 col-sm-1 col-xs-1">
        </div>
        
            
            
            
     <div class="col-md-12 col-sm-6 col-xs-12">

      <input type="date" max="<?php echo date('Y-m-d'); ?>" id="date" name="date" title="Select start date">
      <input type="date" max="<?php echo date('Y-m-d'); ?>" id="end_date" name="end_date" title="Select date">
      <!-- <select id="typee">
        <option value="">Select Expense</option>
        <?php
            $sqlN2="SELECT * FROM `expense_type`";
            $rsN2=mysqli_query($conn,$sqlN2);
            while($rowN2=mysqli_fetch_array($rsN2)){
        ?>
          <option value="<?php echo $rowN2['typee']; ?>"><?php echo $rowN2['typee']; ?></option>
        <?php } ?>
      </select> -->
      <button onclick="searchMe4('totalPL.php')">Search</button>

          <div class="table">
          <div class="table-responsive" style="height:800px; overflow:scroll">
                <table class="table no-margin">
                 <thead> 
                  <tr>
                    <th>Purchase Amount</th>                    
                    <th>Purchase Weight</th>
                    <th>Sale Weight</th>
                    <th>Sale Amount</th>
                    <th>Purchase Average</th>
                    <th>Sale Average</th>
                    <th>Expenses</th>
                    <th>Profit</th>

                    
                  </tr>
                 </thead>
                  <tbody>
                  <?php 
                    $office_purchase=officePurchase($conn,$_GET['date'],$_GET['end_date']);
                    
                    $office_kg=kgPurchase($conn,$_GET['date'],$_GET['end_date']);
                    $chickenSale=chickenSale($conn,$_GET['date'],$_GET['end_date']);
                    $chickenSaleAmount=chickenSaleAmount($conn,$_GET['date'],$_GET['end_date']);
                    $chickenSaleAverage=chickenSaleAverage($conn,$_GET['date'],$_GET['end_date']);

                    $meatAveragePrice=meatAveragePrice($conn,$_GET['date'],$_GET['end_date']);

                    $office_expense=officeExp($conn,$_GET['date'],$_GET['end_date']);                  

                    $profit=$chickenSaleAmount-($office_purchase+$office_expense);
                  ?>
                  <tr>
              
                    <td><?php echo "Rs. ".getPureAmount($office_purchase)." /-"; ?></td>                  
                    <td><?php echo getPureAmount($office_kg)." KG"; ?></td>

                      <td><?php echo getPureAmount($chickenSale)." KG"; ?></td>
                    <td><?php echo "Rs. ".getPureAmount($chickenSaleAmount)." /-"; ?></td> 

                    <td><?php echo "Rs. ".getPureAmount($meatAveragePrice)." /-"; ?></td>
                    <td><?php echo "Rs. ".getPureAmount($chickenSaleAverage)." /-"; ?></td>
                    <td><?php echo "Rs. ".$office_expense." /-"; ?></td>  
                    <td style="color: green"><?php echo "Rs. ".getPureAmount($profit)." /-"; ?></td>  

                       
                    </tr>
         
                 
                  </tbody>
                </table>
              </div>
            </div>
        </div>
      </div>
      <!-- /.row -->

    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
  <footer class="main-footer">
    <div class="pull-right hidden-xs">
      <b><span class="logo-lg" style="margin-bottom:10px">

        <?php echo $logo; ?></span></b>
      
    </div>
    <strong><?php echo $copywite; ?></strong> All rights
    reserved.
  </footer>


</div>
<!-- ./wrapper -->

<!-- jQuery 3 -->
<script src="js/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="js/bootstrap.min.js"></script>
<!-- AdminLTE App -->
<script src="js/adminlte.min.js"></script>

<script src="js/bootstrap-tagsinput.min.js"></script>

<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.min.js"></script>

</body>
</html>

<?php
function getUser($conn,$sr)
{
  $sqlUser="SELECT * FROM `admin_user` WHERE `sr`='".$sr."'";
  $rsUser=mysqli_query($conn,$sqlUser);
  $rowUser=mysqli_fetch_assoc($rsUser);
  $user_name=$rowUser["user_name"];

  return $user_name;
}




?>