<?php
ob_start();
require("includes/check_auth_user.php");
require("includes/dbconnect.php");
include('includes/function.php');

$formname = 'Change Of Rates';
$file = 'changeRate.php';
$trandbexist = 0;
$grid = '';

$rootDB = $_SESSION["zdbroot"];

$admin = $_SESSION["admin_" . $dbname];
$zdb = $_SESSION["zdbyear_" . $dbname];
mysqli_select_db($conn, $zdb);

$senable = "";
$cenable = "";

include("includes/linkshead.php");
?>
<script src="MyScript/changerate.js"></script>
</head>
<body>
    <div class="row">
        <div class="col-lg-12 getPart">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><?php Echo $formname; ?></h3>
                    <div class="actions pull-right">
                        <i class="fa fa-chevron-down"></i>
                        <i class="fa fa-times"></i>
                    </div>
                </div>
                <div class="panel-body">
                    <div class="row">
                        <div class="col-lg-4 col-md-4 col-sm-3 col-xs-3 text-right pad">
                            <label class="label-control marg">Brand</label>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-3 col-xs-3 pad">
                            <select id="brand" name="brand" style="height:35px;"  class="brand form-control">
                                <option></option>
                                <?php
                                $gbrand = mysqli_query($conn, "SELECT * FROM `brand`")or die(mysqli_error($conn));
                                while ($brand = mysqli_fetch_object($gbrand)) {
                                    Echo "<option value='$brand->code'>$brand->name</option>";
                                }
                                ?>
                            </select>
                        </div>
                    </div>

                </div>
                <div class='panel-footer'>
                    <div style="overflow: auto; ">
                        <table class="table-condensed proctabl" style="margin: 0 auto;">
                            <tr>
                                <td>
                                    <input id="proceed" type='button' name='proceed'  value='Proceed' class="btn btn-success proceed">
                                </td>
                                <td>
                                    <input class="btn btn-danger" type="button" onClick="window.location.href = '<?= 'default.php' ?>'" value="Exit   " />
                                </td>
                                <!-- <td>
                                    <a href="" target="_blank" class="btn btn-warning excel"  tabindex="-1">Excel</a>
                                </td> -->
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-lg-12 searchtab">
            <div>
<!--                <input type="hidden" value="<?php Echo $fseries ?>" class="form-control series2">
                <input type="hidden" value="<?php Echo $get[vouchno]; ?>" class="form-control vouchno2">
                <input type="hidden" value="<?php Echo $file ?>" class="form-control file2">
                <input type="hidden" value="<?php Echo $para ?>" class="form-control para2">-->
                <div class="row">
                    <div class="col-lg-2">
                        <select class="form-control sfield2">
                            <!--<option value="1">Voucher</option>-->
                            <option value="1">Barcode</option>
                        </select>
                    </div>
                    <div class="col-lg-2">
                        <select class="form-control soperator2">
                            <option value="">Type of Search</option>
                            <option value="%">Like</option>
                            <option value="=">Exactly</option>
                        </select>
                    </div>
                    <div class="col-lg-2">
                        <select class="form-control sortBy2">
                            <option value="">Sort By</option>
                            <!--<option value="1">Voucher</option>-->
                            <option value="1">Barcode</option>
                        </select>
                    </div>
                    <div class="col-lg-2">
                        <select class="form-control orderAs2">
                            <option value="desc">Desc</option>
                            <option value="asc">Asc</option>
                        </select>
                    </div>
                    <div class="col-lg-2">
                        <input type="text" value="" class="form-control ssearch2" placeholder="Search Here">
                    </div>
                    <div class="col-lg-2">
                        <input type="button" class="btn btn-primary sload2" value="Search" >
                    </div>

                </div>

                <!--                <div class="table-responsive" style="max-height: 400px;overflow: auto;">
                                    <table id="" class="table table-striped table-condensed table-bordered" width="100%">
                                        <thead>
                                            <tr class="mySearchTr2">
                                                <th width="10%">Vouchno</th>
                                                <th width="15%">Date</th>
                                                <th width="15%">Barcode</th>
                                                <th width="20%">Itemname</th>
                                                <th width="5%"></th>
                                            </tr>
                                        </thead>
                                        <tbody class="sTbody2">
                                        </tbody>
                                    </table>
                                </div>-->
                <!--                <div class="row">
                                    <div class="col-xs-12 text-right search-action-bar2">
                                        <input type="button"  class="btn btn-primary sprevious2" value="Previous">
                                        <input type="button"  class="btn btn-primary snext2" value="Next">
                                    </div>
                                </div>-->
            </div>
        </div>

        <div class="col-lg-12 fetchPart" style="overflow-x: scroll;height:500px;padding: 3%">
            <table class="table-hover table-bordered table-condensed">
                <tr style="background-color: #1ABC9C">
                    <th align='right'>Sr.</th> 
                    <th align='left'>Code</th> 
                    <th align='left'>Name</th> 
                    <th align='left'>Brand</th> 
                    <th align='left'>HSN Code</th> 
                    <th align='left'>GST %</th> 
                    <th align='left'>Cost</th> 
                    <th align='left'>Rate</th>
                </tr>
                <tbody class="fetchData">

                </tbody>
            </table>
        </div>
        <div class='col-lg-12 fetchPart'>
            <div style="overflow: auto; ">
                <table class="table-condensed proctabl" style="margin: 0 auto;">
                    <tr>
                        <td>
                            <input type='button' value='Save' class="btn btn-success saveChRate">
                        </td>
                        <td>
                            <input type='button' value='Exit' class="btn btn-danger exitChRate">
                        </td>
<!--                        <td>
                            <input type='button' value='Search' class="btn btn-info search">
                        </td>-->

                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>
<?php include("includes/linksfoot.php"); ?>
</body>
</html>
