<?php
ini_set('session.gc_maxlifetime', 30 * 60 * 60 * 60);
session_start();
$_SESSION["brand"] = "";
if ($_SESSION["dev"] == "") {
    echo "Invalid User Session";
    exit();
}
?>

<link rel="stylesheet" href="css/themes/redmond/jquery-ui-1.10.3.custom.css" />

<!-- Main content -->
<section class="content">

    <div class="box box-primary">
        <div class="box-header with-border">
            <h3 class="box-title">INVOICE DISCOUNT</h3>
        </div>

        <form role="form" name ="form1" class="form-horizontal" target="_blank" action="invoicedis_print.php">
            <div class="box-body">
                <br>               
                <div class="form-group">
                     <a onclick="location.reload()" class="btn btn-default">
                            <span class="fa fa-user-plus"></span> &nbsp; New

                        </a>
                      
                          <input type="submit" class="btn btn-default" value="PRINT" id="button" name="button">

                       
 

                </div>
                <div id="msg_box"  class="span12 text-center"  ></div>
                <div class="form-group">
                    <label class="col-sm-1 control-label" for="invno">Code</label>
                    <div class="col-sm-1">
                        <input type="text"  class="form-control input-sm  "   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>
              
                

                    <label class="col-sm-1 control-label" for="sdate">Date From</label>
                    <div class="col-sm-2">
                        <input type="text" value="<?php echo date('Y-m-d'); ?>" name="dtfrom" id="dtfrom" class="form-control dt input-sm">  
                    </div>
                     <label class="col-sm-1 control-label" for="sdate">Date To</label>
                    <div class="col-sm-2">
                        <input type="text" value="<?php echo date('Y-m-d'); ?>" name="dtto" id="dtto" class="form-control dt input-sm">  
                    </div>

                </div> 

                <div class="form-group">
                     <label class="col-sm-1 control-label talign" for="invno">Brand</label>

            <div class="col-sm-2">
                <select id="brand"  name="brand"  class="form-control input-sm" onblur="brandsession();" >
                    <option value="All">All</option>
                    <?php
                    if (($_SESSION["CURRENT_DEP"] != "") and ( !is_numeric($_SESSION["CURRENT_DEP"]))) {
                        $sql = "select * from brand_mas where act ='1' and costcenter='" . $_SESSION["CURRENT_DEP"] . "' order by barnd_name";
                    } else {
                        $sql = "select * from brand_mas where act ='1' order by barnd_name";
                    }
                    $result = mysqli_query($GLOBALS['dbinv'], $sql);
                    while ($row = mysqli_fetch_array($result)) {
                        echo "<option value='" . $row["barnd_name"] . "'>" . $row["barnd_name"] . "</option>";
                    }
                    ?>
                </select>
            </div> 

                </div>
                
        </form>
    </div>

</section>

<script src="js/ins_credit_payments.js"></script>


<script>
                            function myFunction() {
                                location.reload();
                            }
</script>