<?php include 'header.php'; 
$querylogin = "select * from  mst_users where user_name = '". $_SESSION["LOGIN_NAME"]."' AND password = '".$_SESSION["EMPLOYEE_PASSWORD"]."'";
$resultlogin = mysqli_query($conn,$querylogin);
while($row=mysqli_fetch_array($resultlogin))
{
$user_name = $row['user_name'];
$sales_person_id = $row['user_id'];
} 
?>
<style>
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}


</style>
<script>
  $(document).on('change',".gstinnumber", function(){    
    var inputvalues = $(this).val();
    var gstinformat = new RegExp('^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}$');

    if (gstinformat.test(inputvalues)) {
     return true;
    } else {
        alert('Please Enter Valid GSTIN Number');
        $(".gstinnumber").val('');
        $(".gstinnumber").focus();
    }

});
</script>
<script>
    // jQuery ".Class" SELECTOR.
    $(document).ready(function() {
        $('.groupOfTexbox').keypress(function (event) {
            return isNumber(event, this)
        });
    });
    // THE SCRIPT THAT CHECKS IF THE KEY PRESSED IS A NUMERIC OR DECIMAL VALUE.
    function isNumber(evt, element) {

        var charCode = (evt.which) ? evt.which : event.keyCode

        if (
            (charCode != 45 || $(element).val().indexOf('-') != -1) &&      // Check minus and only once.
            (charCode != 46 || $(element).val().indexOf('.') != -1) &&      // Check dot and only once.
            (charCode < 48 || charCode > 57))
            return false;

        return true;
    }   </script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js">

    </script>
<script>

        function validatePanNumber(pan) {

            let pannumber = $(pan).val();

            var regex = /[a-zA-z]{5}\d{4}[a-zA-Z]{1}/;

            if (pannumber.match(regex)) {

                alert(" Valid PAN number");

            }

            else {

                alert(" Invalid PAN number");

                $(pan).val("");

            }

        }
function validate()
{
  var text = document.getElementById("pno").value;
  var regx = /^[6-9]\d{9}$/ ;
  if(regx.test(text))
    alert("valid");
  else
    alert("Invalid Telephone Number");
}
 

    </script>
<div class="content-page">
<div class="content">
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="page-header-title">
<button type="button" class="btn btn-dark  waves-effect waves-light" onclick="location.href='view_finish_product.php'">Back </button>
<div class="clearfix"></div>
</div>
</div>
</div>
<form name="chkForm" id="chkForm" action="insert_finish_product_master.php"  method="post">
<main>
<div class="row">
<div class="col-sm-12">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">NEW FINISH PRODUCT MASTERS</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-3 col-xs-12">
<div class="form-group">
<label>Material Name Bar Size</label>
<select name="row_id" class="form-control select2" required>
<option value="" selected>Select Material Name Bar Size</option>
<?php 
$qry97 = "select * from rowmaterial_master ORDER BY row_id ASC";
$re97 = mysqli_query($conn,$qry97);
while($row=mysqli_fetch_array($re97))
{
$bar_size = $row['bar_size'];
$row_id = $row['row_id'];
$material_name = $row['material_name'];
?>
<option value="<?php echo $row_id?>"><?php echo $material_name?> , Size - <?php echo $bar_size?></option>
<?php }?>
</select>
</div>
</div>


<div class="col-sm-3 col-xs-12">
<div class="form-group">
<label>Category</label>

<select name="category_id" class="form-control select2" required>
<option value="" selected>Select Category</option>
<?php 
$qrybu = "select * from category_master ";
$rebu = mysqli_query($conn,$qrybu);
while($row=mysqli_fetch_array($rebu))
{
$category_name = $row['category_name'];
$category_id = $row['category_id'];

?>
<option value="<?php echo $category_id?>"><?php echo $category_name?></option>
<?php }?>
</select>


</div>
</div>

<div class="col-sm-3 col-xs-12">
<div class="form-group">
<label>Item Code</label>
<input type="text" class="form-control"  name="item_code"/>
</div>
</div>
<div class="col-sm-3 col-xs-12">
<div class="form-group">
<label>Description</label>
<textarea class="form-control" name="description"></textarea>
</div>
</div>
<div class="col-sm-3 col-xs-12">
<div class="form-group">
<label>Unit</label>

<select name="bar_size_unit" class="form-control select2">
<option value="" selected>Select Unit</option>
<?php 
$qrybu = "select * from bar_unit_master ORDER BY bar_unit ASC";
$rebu = mysqli_query($conn,$qrybu);
while($row=mysqli_fetch_array($rebu))
{
$bar_unit = $row['bar_unit'];
?>
<option value="<?php echo $bar_unit?>"><?php echo $bar_unit?></option>
<?php }?>
</select>


</div>
</div>
<div class="col-sm-3 col-xs-12">
<div class="form-group">
<label>Finish Shaft Weight</label>
<input type="text" id="qty" class="form-control"  name="finish_shaft_wt_kg" required/>
</div>
</div>
<div class="col-sm-3 col-xs-12">
<div class="form-group">
<label> Turning Scrap Weight Unit</label>
<input type="text" id="rate" class="form-control"  name="turning_scrap_wt" required/>
</div>
</div>

<div class="col-sm-3 col-xs-12">
<div class="form-group">
<label>BOM Weight Kg</label>
<input type="text" id="total" class="form-control"  name="bom_weight_kg" readonly="readonly"/>
</div>
</div>

 <script>
$('#rate,#qty').on('input',function(){
    var qty = parseFloat($('#qty').val()) || 0;
	var rate = parseFloat($('#rate').val()) || 0;
    $('#total').val(rate + qty);   
	 
});</script>



<div class="col-sm-3 col-xs-12">
<div class="form-group">
<label>Labour Rate RS</label>
<input type="text" class="form-control"  name="revised_labour_rate_rs" required/>
</div>
</div>

<div class="col-sm-3 col-xs-12">
<div class="form-group">
<label>DRAWING NO</label>
<input type="text" class="form-control"  name="DRAWING_NO" />
</div>
</div>


<div class="col-sm-3 col-xs-12">
<div class="form-group">
<label>CUT</label>
<input type="text" class="form-control"  name="CUT" />
</div>
</div>
<div class="col-sm-3 col-xs-12">
<div class="form-group">
<label>FINISH</label>
<input type="text" class="form-control"  name="FINISH" />
</div>
</div>
<div class="col-sm-3 col-xs-12">
<div class="form-group">
<label>DE</label>
<input type="text" class="form-control"  name="DE" />
</div>
</div>

<div class="col-sm-3 col-xs-12">
<div class="form-group">
<label>NDE</label>
<input type="text" class="form-control"  name="NDE" />
</div>
</div>



<div class="clearfix"></div>
<div class="clearfix"></div>
<div class="col-sm-12 col-xs-12">
<div class="m-t-20">
<div class="form-group">
<div>
<button type="submit" class="btn btn-primary waves-effect waves-light" onclick="validate()">Submit</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</form>
<!------------------->
</div>
</div>
<script  src="./script.js"></script>
<script src="vendors/bower_components/jquery/dist/jquery.min.js"></script>
<script src="vendors/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="vendors/bower_components/moment/min/moment-with-locales.min.js"></script>
<script src="vendors/bower_components/mjolnic-bootstrap-colorpicker/dist/js/bootstrap-colorpicker.min.js"></script>
<script src="vendors/bower_components/switchery/dist/switchery.min.js"></script>
<script src="vendors/bower_components/select2/dist/js/select2.full.min.js"></script>
<script src="vendors/bower_components/bootstrap-select/dist/js/bootstrap-select.min.js"></script>
<!-- Bootstrap Tagsinput JavaScript -->
<script src="vendors/bower_components/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js"></script>
<!-- Bootstrap Touchspin JavaScript -->
<script src="vendors/bower_components/bootstrap-touchspin/dist/jquery.bootstrap-touchspin.min.js"></script>
<!-- Multiselect JavaScript -->
<script src="vendors/bower_components/multiselect/js/jquery.multi-select.js"></script>
<!-- Bootstrap Switch JavaScript -->
<script src="vendors/bower_components/bootstrap-switch/dist/js/bootstrap-switch.min.js"></script>
<!-- Bootstrap Datetimepicker JavaScript -->
<script type="text/javascript" src="vendors/bower_components/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js"></script>
<!-- Form Advance Init JavaScript -->
<script src="dist/js/form-advance-data.js"></script>
<!-- Slimscroll JavaScript -->
<script src="dist/js/jquery.slimscroll.js"></script>
<!-- Fancy Dropdown JS -->
<script src="dist/js/dropdown-bootstrap-extended.js"></script>
<!-- Owl JavaScript -->
<script src="vendors/bower_components/owl.carousel/dist/owl.carousel.min.js"></script>
<!-- Init JavaScript -->
<script src="dist/js/init.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<!-- Select2 JavaScript -->
<script src="vendors/bower_components/select2/dist/js/select2.full.min.js"></script>
<!-- Bootstrap Select JavaScript -->
<script src="vendors/bower_components/bootstrap-select/dist/js/bootstrap-select.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/modernizr.min.js"></script>
<script src="assets/js/detect.js"></script>
<script src="assets/js/fastclick.js"></script>
<script src="assets/js/jquery.slimscroll.js"></script>
<script src="assets/js/jquery.blockUI.js"></script>
<script src="assets/js/waves.js"></script>
<script src="assets/js/wow.min.js"></script>
<script src="assets/js/jquery.nicescroll.js"></script>
<script src="assets/js/jquery.scrollTo.min.js"></script>
<script src="assets/js/app.js"></script>
</body>
<!-- Mirrored from themesdesign.in/xadmino/form-elements.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 03 Feb 2021 12:05:08 GMT -->
</html>
