<!-- Main content -->
<?php
session_start();
include_once './connection_sql.php';
 
?>
  
 
<section class="content">
    <div class="box box-primary">
        <div class="box-header with-border">
            <h3 class="box-title">OUTSTANDING REPORT</h3>
            <h4 style="float: right;height: 3px;"><b id="time"></b></h4>
        </div>
        <form role="form" name ="form1" class="form-horizontal" target="_blank" action="outstanding_print.php">
            <div class="box-body">
                <div class="form-group col-md-12">
                    <a onclick="location.reload();" class="btn btn-default">
                        <span class="fa fa-user-plus"></span> &nbsp; NEW
                    </a>   
                    <button><a onclick="print_inv();" class="btn btn-primary btn-sm">
                        <span class="fa fa-print"></span> &nbsp; VIEW REPORT
                    </a></button>
                    
                   
                </div>
                <div class="form-group"></div>
                <input type="hidden" id="uniq" class="form-control">

                <div id="msg_box"  class="span12 text-center"  >  </div>

                <!--=======================-->
                <div class="form-group">
                    <label class="col-md-1 control-label  " for="txt_usernm" style="text-align:left">Rep</label>
                    <div class="col-md-3">
                        <select id="rep" name="rep"  class="form-control input-sm"  > 
                            <option value="ALL">ALL</option>
                            <?php   
                            // and SCODE = '" . $_SESSION["company"] ."' 
                             $sql="select * from s_salrep where cancel='0' order by REPCODE";
                             foreach ($conn->query($sql) as $row) {
                                echo "<option value='" . $row["REPCODE"] . "' class=\"opt\">" . $row["REPCODE"] . " " . $row["Name"] . "</option>";
                            } 
                            ?>  
                       </select> 
                    </div> 
                    <label class="col-sm-1 control-label" for="invno" style="text-align:left">Code</label>
                    <div class="col-sm-2">
                        <input type="text"  class="form-control input-sm  " readonly onClick="NewWindow('../serach_customer.php?stname=ret_cheque_entry', 'mywin', '800', '700', 'yes', 'center');
                                return false" onFocus="this.blur()"  name="Txtcusco" id="Txtcusco">
                    </div>

                    <div class="col-sm-3">
                        <input type="text" class="form-control input-sm  " disabled="disabled" id="txtcusname" name="txtcusname" />
                    </div>
                    
                    <div class="col-sm-1">
                        <a href=""  class="btn btn-danger btn-sm " onClick="NewWindow('../serach_customer.php?stname=ret_cheque_entry', 'mywin', '800', '700', 'yes', 'center');
                                return false" onFocus="this.blur()">
                            ...
                        </a>
                    </div>
                </div>   
               
                <div class="form-group">
                    <label class="col-md-1 control-label  " for="txt_usernm" style="text-align:left">Type</label>
                    <div class="col-md-3">
                        <select id="type" name="type"  class="form-control input-sm"  > 
                            <option value="Detail">Detail</option>
                             <option value="Summery">Summery</option>
                       </select>
                    </div> 
                </div>   
                  <div class="form-group">
                    
              
                

                    <label class="col-sm-1 control-label" for="sdate" style="text-align:left">Date </label>
                    <div class="col-sm-3">
                        <input type="date" value="<?php echo date('Y-m-d'); ?>" name="dtfrom" id="dtfrom" class="form-control  input-sm">  
                    </div>
                     

                </div> 
                
                  <div class="form-group">
                    <label class="col-md-1 control-label  " for="txt_usernm" style="text-align:left">Company</label>
                    <div class="col-md-3">
                        <select id="company" name="company"  class="form-control input-sm"  > 
                            <option value="ALL">ALL</option>
                            <?php   
                             $sql="select * from invpara group by flag"; 
                             foreach ($conn->query($sql) as $row) {
                              echo "<option value='".$row["flag"]."'>".$row["COMPANY"]."-".$row["flag"]."</option>";
                            } 
                            ?>  
                       </select> 
                    </div> 
                 </div> 
                 <!--==================================================================================================================================== -->
                  
            </div> </div> 
        </form>
    </div> 
</section> 

<script>
    

</script>

 
  