<?php

  //invoice.php  

  include('db_con.php');

  include('header.php');

  include('function.php');

  

  if (isset($_SESSION['user_id'])) {

    $user_type = $_SESSION['user_type'];

    $user_id = $_SESSION['user_id'];

    $user_name = $_SESSION['user_name'];

    $branch_id = $_SESSION['branch_id'];

    $branch_name = $_SESSION['branch_name'];

    $store_id = $_SESSION['store_id'];

    $store_name = $_SESSION['store_name'];

}else{

  header('Location: login');

  die();

}



$dated = date('Y-m-d');



  if(isset($_POST["print"]))

  {

   

   $fdate = $_POST['fdate'];

   $tdate = $_POST['tdate'];

   $acc_no = $_POST['acc_no'];

      

      //$result = $statement->fetchAll();



      header('location:rpt_parent_preview?print=1&acc_no='.$acc_no.'&fdate='.$fdate.'&tdate='.$tdate.'');

  }

           

  ?>

<!DOCTYPE html>

<html lang="en">

  <head>

    <title></title>

    

    <style>

      /* Remove the navbar's default margin-bottom and rounded borders */ 

      .navbar {

      margin-bottom: 4px;

      border-radius: 0;

      }

      /* Add a gray background color and some padding to the footer */

      footer {

      background-color: #f2f2f2;

      padding: 25px;

      }

      .carousel-inner img {

      width: 100%; /* Set width to 100% */

      margin: auto;

      min-height:200px;

      }

      

      .navbar-brand:hover

      {

      background-color:#ffffff;

      }

      /* Hide the carousel text when the screen is less than 600 pixels wide */

      @media (max-width: 600px) {

      .carousel-caption {

      display: none; 

      }

      }

    </style>

     



    <title>General Ledger</title>



    <!-- Bootstrap Core CSS -->

   

  </head>

  <body>

    <style>

      .box

      {

      width: 100%;

      max-width: 1390px;

      border-radius: 5px;

      border:1px solid #ccc;

      padding: 15px;

      margin: 0 auto;                

      margin-top:50px;

      box-sizing:border-box;

      }

    </style>

    <link rel="stylesheet" href="css/datepicker.css">

    <script src="js/bootstrap-datepicker1.js"></script>

    <link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">

    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.6.3/css/bootstrap-select.min.css" />

    <script>

      $(document).ready(function(){

        $('#fdate').datepicker({

          format: "yyyy-mm-dd",

          autoclose: true

        });

        $('#tdate').datepicker({

          format: "yyyy-mm-dd",

          autoclose: true

        });

      });

    </script>

    <div class="container-fluid">

     

          <?php include('top-pannel.php');?>

       <form method="post" id="report_form">

      <br />

      

        <div class="table-responsive">

          <table class="table table-bordered">

            <tr>

              <td colspan="2" align="center"><h2 style="margin-top:10.5px">Parent with sub accounts Report</h2></td>

            </tr>

            <tr>

                <td colspan="2">

                  <div class="row">

                    <div class="col-md-4">

                    <select name="acc_no" id="acc_no" class="form-control input-sm acc_no selectpicker" data-show-subtext="true" data-live-search="true" required />

                       

                          <?php echo fill_parents($connect);?>



                        </select>

                        <br />

                      <br />

                     <b>From :</b><input type="text" name="fdate" id="fdate" class="form-control input-sm" readonly value="<?php echo $dated; ?>" AutoComplete="off" required />  <br />



                     <b>To :</b><input type="text" name="tdate" id="tdate" class="form-control input-sm" readonly value="<?php echo $dated; ?>" AutoComplete="off" required />  <br />       

              

                 





                  

                  

                

                    </div>



                    

                  </div>

                  



                 





                  </td>

                  </tr>

                

          

            

              <tr>

                <td colspan="2" align="center">

                <input type="submit" name="print" id="print" class="btn btn-info" value="Preview" />

                 

                 

                </td>

              </tr>

          </table>

        </div>

      </form>



     

      

