<?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-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">Product Group</label>
                        </div>
                        <div class="col-lg-5 col-md-6 col-sm-6 col-xs-6 pad">
                            <select class="form-control select2 itemgrp" name="itemgrp">
                                <option value=""></option>
                                <?php
                                $mitgrp = mysqli_query($conn, "SELECT code, `name` FROM `prodgrp` ") or die(mysqli_error($conn));
                                while ($titgrp = mysqli_fetch_array($mitgrp)) {
                                    echo "<option value=$titgrp[code]>$titgrp[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>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-lg-12 searchtab" style="margin-top: 10px">
            <div>
                <div class="row">
                    <div class="col-lg-2">
                        <select class="form-control sfield2">
                            <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>
        </div>

        <div class="col-lg-12 fetchPart" style="overflow-x: scroll;height:500px;margin-top: 10px;">
            <table class="table-bordered table-condensed">
                <tr class="mySearchTr">
                    <th style="width: 3%" align='right'>Sr.</th> 
                    <th style="width: 15%" align='left'>Name</th> 
                    <th style="width: 20%" align='left'>Barcode</th> 
<!--                    <th style="width: 7%" align='left'>Gram</th> 
                    <th align='left' style="width: 7%">Packing</th> 
                    <th align='left'>Colour</th> 
                    <th align='left'>Unit</th>  
                    <th  style="width: 5%;text-align: right">Gst%</th>-->
                    <th  style="width: 8%;text-align: right">Cost Price</th>
                    <th  style="width: 8%;text-align: right">Sell Price</th>
                    <!--<th  style="width: 8%;text-align: right">Mrp</th>--> 
                    <!--<th  style="width: 8%;text-align: right">Msp</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'  style="background-color: green"  class="btn btn-success saveChRate">
                        </td>
                        <td>
                            <input type='button' value='Exit' style="background-color: red" class="btn btn-danger exitChRate">
                        </td>
                        <td>
                            <input type='button' value='Search' style="background-color: blue" class="btn search">
                        </td>

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