<!--<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">Stock Transfer</h3>
        </div>
        <form role="form" name ="form1" class="form-horizontal">
            <div class="box-body">

                <div class="form-group">
                    <a onclick="new_inv();" class="btn btn-default">
                        <span class="fa fa-user-plus"></span> &nbsp; New
                    </a>
                    <a onclick="save_inv();" class="btn btn-primary">
                        <span class="fa fa-save"></span> &nbsp; Save
                    </a>
                    <a onclick="print_inv();" class="btn btn-default">
                        <span class="fa fa-print"></span> &nbsp; Print
                    </a>
                    <a onclick="NewWindow('search_gin_multi.php', 'mywin', '800', '700', 'yes', 'center');
                    return false" class="btn btn-default">
                    <span class="fa fa-search"></span> &nbsp; Search
                </a>
                <?php if ($_SESSION['User_Type'] == "1") { ?>
                         <a onclick="cancel_inv();" class="btn btn-danger">
                    <span class="fa fa-trash"></span> &nbsp; Delete
                </a> 
                    <?php } ?>
                  
            </div>
            <div id="msg_box"  class="span12 text-center"  ></div>

            <input type="hidden"  disabled id="tmpno" class="form-control">
            <input type="hidden" id="item_count" class="form-control">

            <div class="form-group">
                <label class="col-sm-2 control-label" for="firstname_hidden">ST No</label>
                <div class="col-sm-2">
                    <input type="text" placeholder="Ref No"  disabled="" id="invno" class="form-control">
                </div> 
                <label class="col-sm-2 control-label" for="firstname_hidden">Date</label>
                <div class="col-sm-2">
                    <input type="date" placeholder="Ref No"    id="sdate" class="form-control">
                </div> 

            </div>
           

            <div class="form-group">
                <label for="firstname_hidden" class="col-sm-2 control-label">To Department</label>
                <div class="col-sm-2">
                    <select id="to_dep"   class="form-control col-sm-1" >

                        <?php
                        $sql = "select * from s_stomas where act='1' order by CODE";
                        $result = mysqli_query($GLOBALS['dbinv'], $sql);
                        while ($row = mysqli_fetch_array($result)) {
                                //echo "<option value='" . $row["barnd_name"] . "'>" . $row["barnd_name"] . "</option>";
                            if ($row["CODE"] == "01") {
                                echo "<option selected value='" . $row["CODE"] . "'>" . $row["DESCRIPTION"] . "</option>";
                            } else {
                                echo "<option value='" . $row["CODE"] . "'>" . $row["DESCRIPTION"] . "</option>";
                            }
                        }
                        ?>
                    </select>
                </div> 
                <div class="col-sm-5"></div>
                
                <div class="col-sm-1">
<label>Above 90 Days Qty</label>
                </div>
                
                <div id="unsold" class="col-sm-1">

                </div>
            </div>
            <div class="form-group">
                    <label class="col-sm-2 control-label" for="remark">Remark</label>
                    <div class="col-sm-6">
                        <textarea id="remark" name="remark" class="form-control" rows="2" placeholder="Enter Remark"></textarea>
                    </div>
            </div>

            <div class="col-sm-12">
                <table class="table">
                    <tr>
                        <th style="width: 150px;">From Department</th>
                        <th style="width: 150px;">Item Code</th>
                        <th style="width: 5px;"></th>
                        <th style="width: 280px;">Description</th>
                        <th style="width: 80px;">Quantity</th>

                        <th style="width: 10px;"></th>
                        <td style="width: 90px;"></td>
                    </tr>

                    <tr>
                        <td>
                            <select id="from_dep" onchange="itno_ind();" class="form-control col-sm-1">
                                <?php
                                
                                $sql = "select * from s_stomas where act='1' order by CODE";
                                
                                $result = mysqli_query($GLOBALS['dbinv'], $sql);
                                while ($row = mysqli_fetch_array($result)) {
                                    
                                    if ($row["CODE"] == "01") {
                                        echo "<option selected value='" . $row["CODE"] . "'>" . $row["DESCRIPTION"] . "</option>";
                                    } else {
                                        echo "<option value='" . $row["CODE"] . "'>" . $row["DESCRIPTION"] . "</option>";
                                    }
                                }
                                ?>
                            </select>
                        </td>
                        <td>
                            <input type="text"  onkeypress="keyset('qty', event);" onblur="itno_ind();" disabled    placeholder="Item Code" id="itemCode" class="form-control">
                        </td>
                        <td><a align="center" onclick="NewWindow('search_gin_item.php', 'mywin', '800', '700', 'yes', 'center');
                        return false" onfocus="this.blur()" class="btn btn-primary">
                        <span class="fa fa-search"></span> &nbsp;  
                    </a> 
                </td>
                <td>
                    <input type="text" placeholder="Description" id="itemDesc" disabled class="form-control">
                </td>

                <td>
                    <input type="number" onkeypress="keyset('add_tmp_it', event);" placeholder="Quantity" id="qty" class="form-control">
                </td>                        
                <td>
                    <a onclick="add_tmp();" id="add_tmp_it" value= "+"  class="btn btn-primary">
                        <span class="fa fa-plus"></span>&nbsp;    
                    </a>
                    
                    <!--<b><input type="button"  onclick="add_tmp();" id="add_tmp_it" value= "+"  class="btn btn-default" ></input></b>-->

                </td>
                <td><input id="itemPrice" type= "hidden">

                </td>
            </tr>

        </table>
        <div class="span6 pull-right">
            <div id="submas">

            </div>
        </div>
        <div id="itemdetails" class="col-sm-12" >

        </div>
    </div>
  

<div class="form-group"></div>
<div class="form-group"></div>

<table class="table">
        <tr>
              <div class="form-group">
                <label for="firstname_hidden" class="col-sm-1 control-label">Available Qty</label>
                <div class="col-sm-2">
                    <input type="text" disabled="" style="color: red" name='qtyinhand'  id="qtyinhand" class="form-control">
                </div> 
                
            
        </div>
</tr>


    <tr>
      <div class="form-group">
        <label for="firstname_hidden" class="col-sm-1 control-label">ARN No</label>
        <div class="col-sm-2">
            <input type="text"   name="txtarno" id="txtarno" disabled=""  class="form-control"> 
        </div> 
        <div class="col-sm-1">
            <a align="center" onclick="NewWindow('../serach_arn.php?mstatus=gin', 'mywin', '800', '700', 'yes', 'center');
            return false" onfocus="this.blur()" class="btn btn-primary">
            <span class="fa fa-search"></span> &nbsp;  
        </a>
        
    </div> 
    <div class="col-sm-1">
       <a onclick="update();"class="btn btn-success">
        <span class="fa fa-edit"></span> &nbsp; Update ARN
    </a>
</div> 
</div>
</tr>

</table>  




<div class="form-group">
   <label for="firstname_hidden" class="col-sm-1 control-label">ARN Date</label>
   <div class="col-sm-2">
     <input type="text" disabled class="form-control" name="DTARdate" id="DTARdate"/>
 </div> 
 
</div>

</div> 

<div  class='space' >
    <br>&nbsp;
    <br>&nbsp;
    <br>&nbsp;

</div>

</div>



</div>


</form>
</div>

</section>

<script src="js/gin_m.js"></script>
<!--<script src="js/common.js"></script>-->
<!--<script src="js/jquery-1.9.1.js"></script>-->
<!--<script src="js/jquery-ui.custom.js"></script>-->
<!--<script src="js/common.js"></script>-->
<!--<script  type="text/javascript" src="js/jquery-1.6.1.min.js"></script>-->
<!--<script  type="text/javascript" src="js/jquery-ui-1.8.14.custom.min.js"></script>-->
<script>
    new_inv();

</script>
