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

$formname = 'Change Of Rates Items';
$file = 'changeRate_item.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_item.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">Company</label>
                                            </div>
                                            <div class="col-lg-4 col-md-4 col-sm-3 col-xs-3 pad">
                                                <select id="company" name="company" style="height:35px;"  class="company form-control">
                                                    <option></option>
                    <?php
//                                $mown = mysqli_query($conn, "SELECT code,`name` FROM `$rootDB`.`compmast` ORDER by name ") or die(mysqli_error($conn));
//                                while ($trow = mysqli_fetch_array($mown)) {
//                                    echo "<option value=$trow[code]>$trow[name]</option>";
//                                }
                    ?>
                                                </select>
                                            </div>
                                        </div>-->
                    <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">Item Group</label>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-3 col-xs-3 pad">
                            <select id="itemgrp" name="itemgrp" style="height:35px;"  class="itemgrp form-control" >
                                <option></option>
                                <?php
                                $mitgrp = mysqli_query($conn, "SELECT code, `name` FROM `itemgrp` ") 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>
<!--                                <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" style="margin-top: 10px">
            <div>
                <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>
        </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 align='left' style="width: 7%">Hsncode</th> 
                    <th  style="width: 5%;text-align: right">Gst%</th>
                    <th align='left' style="width: 7%">Unit</th> 
                    <th  style="width: 8%;text-align: right">Cost Price</th>
                    <th  style="width: 8%;text-align: right">Sell Price</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>
