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

$zdb = $_SESSION["zdbyear_" . $dbname];

$formname = "Item List";
$action = "itemlst_fr.php";
mysqli_select_db($conn, $zdb);
include("includes/linkshead.php");
$focusfield = "code";
?>


<!--<script src="MyScript/item.js" type="text/javascript"></script>-->
</head>
<body>
    <form method='POST' action="<?= $action; ?>">
        <!-- Default box -->
        <div>
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12  pad">
                <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-5 col-md-4 col-sm-4 col-xs-4 text-right pad">
                                <label class="label-control marg">Name</label>
                            </div>
                            <div class="col-lg-3 col-md-4 col-sm-4 col-xs-4 pad">
                                <input type="text" class="form-control name" name="name">
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-lg-5 col-md-4 col-sm-4 col-xs-4 text-right pad">
                                <label class="label-control marg">Item Group</label>
                            </div>
                            <div class="col-lg-3 col-md-4 col-sm-4 col-xs-4 pad">
                                <select  class="select2 form-control itemgrp" style="" name="itemgrp">
                                    <?php
                                    echo "<option value=''></option>";
                                    $getgrop = mysqli_query($conn, "SELECT `code`, `name` FROM `itemgrp` WHERE code != ''")or die(mysqli_error($conn));
                                    while ($grop = mysqli_fetch_array($getgrop)) {
                                        echo "<option value='$grop[code]'>$grop[name]</option>";
                                    }
                                    ?>
                                </select>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-lg-5 col-md-4 col-sm-4 col-xs-4 text-right pad">
                                <label class="label-control marg">Size</label>
                            </div>
                            <div class="col-lg-1 col-md-2 col-sm-2 col-xs-2 pad">
                                <input type="text" class="form-control size" name="size">
                            </div>
                        </div>
                        <!-- <div class="row">
                            <div class="col-lg-5 col-md-4 col-sm-4 col-xs-4 text-right pad">
                                <label class="label-control marg">Company</label>
                            </div>
                            <div class="col-lg-3 col-md-4 col-sm-4 col-xs-4 pad">
                                <select  class="select2 form-control company" style="" name="company">

                                    <?php
                                    $getcomp = mysqli_query($conn, "SELECT `comp` FROM `customer` WHERE comp != ''")or die(mysqli_error($conn));
                                    echo "<option value=''></option>";
                                    while ($comp = mysqli_fetch_array($getcomp)) {
                                        echo "<option value='$comp[comp]'>$comp[comp]</option>";
                                    }
                                    ?>
                                </select>
                            </div>
                        </div> -->
                        <div class="row">
                            <div class="col-lg-5 col-md-4 col-sm-4 col-xs-4 text-right pad">
                                <label class="label-control marg">Hsncode</label>
                            </div>
                            <div class="col-lg-1 col-md-2 col-sm-2 col-xs-2 pad">
                                <input type="text" class="form-control hsncode" name="hsncode">
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-lg-5 col-md-4 col-sm-4 col-xs-4 text-right pad">
                                <label class="label-control marg">Gst %</label>
                            </div>
                            <div class="col-lg-1 col-md-2 col-sm-2 col-xs-2 pad">
                                <input type="text" class="form-control gstperc" name="gstperc">
                            </div>
                        </div>
                    </div>
                    <div class="panel-footer">
                        <?php include("includes/but_reg.php"); ?>
                    </div>
                </div>
            </div>
        </div>
    </form>
    <?php include("includes/linksfoot.php"); ?>
