EVOLUTION-NINJA
Edit File: weaving_addstock.php
<?php //include("menu.php"); ?> <style> .doc_main{ display:none; } #ui-datepicker-div { z-index:5 !important; } </style> <script> function swan_myFunction() { //alert(); var input, filter, table, tr, td, i; input = document.getElementById("search_yarn_raw"); filter = input.value.toUpperCase(); table = document.getElementById("modal_data_raw"); tr = table.getElementsByTagName("tr"); // Loop through all table rows, and hide those who don't match the search query for (i = 0; i < tr.length; i++) { // alert() td = tr[i].getElementsByTagName("td")[1]; td2 = tr[i].getElementsByTagName("td")[2]; td3 = tr[i].getElementsByTagName("td")[3]; td4 = tr[i].getElementsByTagName("td")[4]; td5 = tr[i].getElementsByTagName("td")[5]; td6 = tr[i].getElementsByTagName("td")[6]; td7 = tr[i].getElementsByTagName("td")[7]; td8 = tr[i].getElementsByTagName("td")[8]; td9 = tr[i].getElementsByTagName("td")[9]; // td10 = tr[i].getElementsByTagName("td")[10]; // if (td.innerHTML.toUpperCase().indexOf(filter) > -1 || td2.innerHTML.toUpperCase().indexOf(filter) > -1 || td3.innerHTML.toUpperCase().indexOf(filter) > -1 || td4.innerHTML.toUpperCase().indexOf(filter) > -1 || td5.innerHTML.toUpperCase().indexOf(filter) > -1 || td6.innerHTML.toUpperCase().indexOf(filter) > -1 || td7.innerHTML.toUpperCase().indexOf(filter) > -1 || td8.innerHTML.toUpperCase().indexOf(filter) > -1 || td9.innerHTML.toUpperCase().indexOf(filter) > -1 || td10.innerHTML.toUpperCase().indexOf(filter) > -1 ) { if (td.innerHTML.toUpperCase().indexOf(filter) > -1 || td2.innerHTML.toUpperCase().indexOf(filter) > -1 || td3.innerHTML.toUpperCase().indexOf(filter) > -1 || td4.innerHTML.toUpperCase().indexOf(filter) > -1 || td5.innerHTML.toUpperCase().indexOf(filter) > -1 || td6.innerHTML.toUpperCase().indexOf(filter) > -1 || td7.innerHTML.toUpperCase().indexOf(filter) > -1 || td8.innerHTML.toUpperCase().indexOf(filter) > -1 || td9.innerHTML.toUpperCase().indexOf(filter) > -1) { tr[i].style.display = ""; } else { tr[i].style.display = "none"; } //} } } function swan_twist_myFunction() { //alert(); var input, filter, table, tr, td, i; input = document.getElementById("search_yarn_twist"); filter = input.value.toUpperCase(); table = document.getElementById("modal_data_twist"); tr = table.getElementsByTagName("tr"); // Loop through all table rows, and hide those who don't match the search query for (i = 0; i < tr.length; i++) { // alert() td = tr[i].getElementsByTagName("td")[1]; td2 = tr[i].getElementsByTagName("td")[2]; td3 = tr[i].getElementsByTagName("td")[3]; td4 = tr[i].getElementsByTagName("td")[4]; td5 = tr[i].getElementsByTagName("td")[5]; td6 = tr[i].getElementsByTagName("td")[6]; td7 = tr[i].getElementsByTagName("td")[7]; td8 = tr[i].getElementsByTagName("td")[8]; td9 = tr[i].getElementsByTagName("td")[9]; td10 = tr[i].getElementsByTagName("td")[10]; // if (td.innerHTML.toUpperCase().indexOf(filter) > -1 || td2.innerHTML.toUpperCase().indexOf(filter) > -1 || td3.innerHTML.toUpperCase().indexOf(filter) > -1 || td4.innerHTML.toUpperCase().indexOf(filter) > -1 || td5.innerHTML.toUpperCase().indexOf(filter) > -1 || td6.innerHTML.toUpperCase().indexOf(filter) > -1 || td7.innerHTML.toUpperCase().indexOf(filter) > -1 || td8.innerHTML.toUpperCase().indexOf(filter) > -1 || td9.innerHTML.toUpperCase().indexOf(filter) > -1 || td10.innerHTML.toUpperCase().indexOf(filter) > -1 ) { if (td.innerHTML.toUpperCase().indexOf(filter) > -1 || td2.innerHTML.toUpperCase().indexOf(filter) > -1 || td3.innerHTML.toUpperCase().indexOf(filter) > -1 || td4.innerHTML.toUpperCase().indexOf(filter) > -1 || td5.innerHTML.toUpperCase().indexOf(filter) > -1 || td6.innerHTML.toUpperCase().indexOf(filter) > -1 || td7.innerHTML.toUpperCase().indexOf(filter) > -1 || td8.innerHTML.toUpperCase().indexOf(filter) > -1 || td9.innerHTML.toUpperCase().indexOf(filter) > -1 || td10.innerHTML.toUpperCase().indexOf(filter) > -1) { tr[i].style.display = ""; } else { tr[i].style.display = "none"; } //} } } function swan_dyed_myFunction() { //alert(); var input, filter, table, tr, td, i; input = document.getElementById("search_yarn_dyed"); filter = input.value.toUpperCase(); table = document.getElementById("modal_data_dyed"); tr = table.getElementsByTagName("tr"); // Loop through all table rows, and hide those who don't match the search query for (i = 0; i < tr.length; i++) { // alert() td = tr[i].getElementsByTagName("td")[1]; td2 = tr[i].getElementsByTagName("td")[2]; td3 = tr[i].getElementsByTagName("td")[3]; td4 = tr[i].getElementsByTagName("td")[4]; td5 = tr[i].getElementsByTagName("td")[5]; td6 = tr[i].getElementsByTagName("td")[6]; td7 = tr[i].getElementsByTagName("td")[7]; td8 = tr[i].getElementsByTagName("td")[8]; td9 = tr[i].getElementsByTagName("td")[9]; td10 = tr[i].getElementsByTagName("td")[10]; // if (td.innerHTML.toUpperCase().indexOf(filter) > -1 || td2.innerHTML.toUpperCase().indexOf(filter) > -1 || td3.innerHTML.toUpperCase().indexOf(filter) > -1 || td4.innerHTML.toUpperCase().indexOf(filter) > -1 || td5.innerHTML.toUpperCase().indexOf(filter) > -1 || td6.innerHTML.toUpperCase().indexOf(filter) > -1 || td7.innerHTML.toUpperCase().indexOf(filter) > -1 || td8.innerHTML.toUpperCase().indexOf(filter) > -1 || td9.innerHTML.toUpperCase().indexOf(filter) > -1 || td10.innerHTML.toUpperCase().indexOf(filter) > -1 ) { if (td.innerHTML.toUpperCase().indexOf(filter) > -1 || td2.innerHTML.toUpperCase().indexOf(filter) > -1 || td3.innerHTML.toUpperCase().indexOf(filter) > -1 || td4.innerHTML.toUpperCase().indexOf(filter) > -1 || td5.innerHTML.toUpperCase().indexOf(filter) > -1 || td6.innerHTML.toUpperCase().indexOf(filter) > -1 || td7.innerHTML.toUpperCase().indexOf(filter) > -1 || td8.innerHTML.toUpperCase().indexOf(filter) > -1 || td9.innerHTML.toUpperCase().indexOf(filter) > -1 || td10.innerHTML.toUpperCase().indexOf(filter) > -1) { tr[i].style.display = ""; } else { tr[i].style.display = "none"; } //} } } function swan_yarn_myFunction() { //alert(); var input, filter, table, tr, td, i; input = document.getElementById("search_yarn_swan"); filter = input.value.toUpperCase(); table = document.getElementById("modal_data_swan"); tr = table.getElementsByTagName("tr"); // Loop through all table rows, and hide those who don't match the search query for (i = 0; i < tr.length; i++) { // alert() td = tr[i].getElementsByTagName("td")[1]; td2 = tr[i].getElementsByTagName("td")[2]; td3 = tr[i].getElementsByTagName("td")[3]; td4 = tr[i].getElementsByTagName("td")[4]; td5 = tr[i].getElementsByTagName("td")[5]; td6 = tr[i].getElementsByTagName("td")[6]; td7 = tr[i].getElementsByTagName("td")[7]; td8 = tr[i].getElementsByTagName("td")[8]; td9 = tr[i].getElementsByTagName("td")[9]; td10 = tr[i].getElementsByTagName("td")[10]; // if (td.innerHTML.toUpperCase().indexOf(filter) > -1 || td2.innerHTML.toUpperCase().indexOf(filter) > -1 || td3.innerHTML.toUpperCase().indexOf(filter) > -1 || td4.innerHTML.toUpperCase().indexOf(filter) > -1 || td5.innerHTML.toUpperCase().indexOf(filter) > -1 || td6.innerHTML.toUpperCase().indexOf(filter) > -1 || td7.innerHTML.toUpperCase().indexOf(filter) > -1 || td8.innerHTML.toUpperCase().indexOf(filter) > -1 || td9.innerHTML.toUpperCase().indexOf(filter) > -1 || td10.innerHTML.toUpperCase().indexOf(filter) > -1 ) { if (td.innerHTML.toUpperCase().indexOf(filter) > -1 || td2.innerHTML.toUpperCase().indexOf(filter) > -1 || td3.innerHTML.toUpperCase().indexOf(filter) > -1 || td4.innerHTML.toUpperCase().indexOf(filter) > -1 || td5.innerHTML.toUpperCase().indexOf(filter) > -1 || td6.innerHTML.toUpperCase().indexOf(filter) > -1 || td7.innerHTML.toUpperCase().indexOf(filter) > -1 || td8.innerHTML.toUpperCase().indexOf(filter) > -1 || td9.innerHTML.toUpperCase().indexOf(filter) > -1 || td10.innerHTML.toUpperCase().indexOf(filter) > -1) { tr[i].style.display = ""; } else { tr[i].style.display = "none"; } //} } } </script> <script> $(document).on('click','.yarn_raw_id',function(){ var yarn_raw=$(this); var yarn_name=$(this).closest('td').next().next().find('.m_yarn_name').val(); //alert(yarn_name); var yarn_denier=$(this).closest('td').next().next().next().find('.m_yarn_name').val(); //alert(yarn_denier); var yarn_specification=$(this).closest('td').next().next().next().next().find('.m_yarn_name').val(); //alert(yarn_specification); var yarn_shade=$(this).closest('td').next().next().next().next().next().find('.m_yarn_name').val(); //alert(yarn_shade); var yarn_lot=$(this).closest('td').next().next().next().next().next().next().find('.m_yarn_name').val(); //alert(yarn_lot); var yarn_bale=$(this).closest('td').next().next().next().next().next().next().next().find('.m_yarn_name').val(); //alert(yarn_bale); var yarn_gross=$(this).closest('td').next().next().next().next().next().next().next().next().find('.m_yarn_name').val(); //alert(yarn_gross); var yarn_net=$(this).closest('td').next().next().next().next().next().next().next().next().next().find('.m_yarn_name').val(); var yarn_id_id=$(this).closest('td').next().next().next().next().next().next().next().next().next().next().next().find('.m_yarn_name').val(); //alert(yarn_id_id); $('#yarn_name').val(yarn_name); $('#yarn_den').val(yarn_denier); $('#yarn_spec').val(yarn_specification); $('#ssl_shade').val(yarn_shade); $('#yarn_lot').val(yarn_lot); $('#yarn_bale').val(yarn_bale); $('#bal_net_wt').val(yarn_net); $('#ids').val(yarn_id_id); }); $(document).on('click','.yarn_swan_id',function(){ var yarn_raw=$(this); var yarn_name=$(this).closest('td').next().next().next().next().find('.m_yarn_name').val(); //alert(yarn_name); var yarn_denier=$(this).closest('td').next().next().next().next().next().find('.m_yarn_name').val(); //alert(yarn_denier); var yarn_specification=$(this).closest('td').next().next().next().next().next().next().find('.m_yarn_name').val(); //alert(yarn_specification); var yarn_shade=$(this).closest('td').next().next().next().next().next().next().next().find('.m_yarn_name').val(); //alert(yarn_shade); var yarn_lot=$(this).closest('td').next().find('.m_yarn_name').val(); var yarn_color=$(this).closest('td').next().next().next().next().next().next().next().next().find('.m_yarn_name').val(); //alert(yarn_color); var yarn_bale=$(this).closest('td').next().next().find('.m_yarn_name').val(); //alert(yarn_bale); //var yarn_gross=$(this).closest('td').next().next().next().next().next().next().next().next().find('.m_yarn_name').val(); //alert(yarn_gross); var yarn_net=$(this).closest('td').next().next().next().next().next().next().next().next().next().find('.m_yarn_name').val(); var yarn_id_id=$(this).closest('td').next().next().next().next().next().next().next().next().next().next().next().find('.m_yarn_name').val(); //alert(yarn_id_id); $('#yarn_name').val(yarn_name); $('#yarn_den').val(yarn_denier); $('#yarn_spec').val(yarn_specification); $('#ssl_shade').val(yarn_shade); $('#yarn_lot').val(yarn_lot); $('#yarn_bale').val(yarn_bale); $('#bal_net_wt').val(yarn_net); $('#w_color_code').val(yarn_color); $('#ids').val(yarn_id_id); }); function dyeing_issue_gross_weight(str) { var deying_net_weight =$('#bal_net_wt').val(); var dyeing_issued_net_wt =str; var balanced_weight = deying_net_weight - dyeing_issued_net_wt; $('#var_kgs').val(balanced_weight.toFixed(2)); ///$('#var_kgs').val(balanced_weight); } </script> <script type="text/javascript"> $(document).ready(function () { $('input[type="radio"]').click(function () { if ($(this).attr("value") == "Warp") { $("#portlet-body1").hide(); $("#portlet-body").show(); $("#yarn-swan-body").hide(); } if ($(this).attr("value") == "Weft") { $("#portlet-body").hide(); $("#portlet-body1").show(); $("#yarn-swan-body").hide(); } if ($(this).attr("value") == "raw") { $("#yarn-body").show(); $("#yarn-body1").hide(); $("#yarn-body2").hide(); $("#yarn-swan-body").hide(); } if ($(this).attr("value") == "twisting") { $("#yarn-body").hide(); $("#yarn-body1").show(); $("#yarn-body2").hide(); $("#yarn-swan-body").hide(); } if ($(this).attr("value") == "dyed") { $("#yarn-body").hide(); $("#yarn-body1").hide(); $("#yarn-body2").show(); $("#yarn-swan-body").hide(); } if ($(this).attr("value") == "yarn_raw") { $("#yarn-raw-body").show(); $("#yarn-raw-body1").hide(); $("#yarn-raw-body2").hide(); $("#yarn-swan-body").hide(); } if ($(this).attr("value") == "yarn_twisting") { $("#yarn-raw-body").hide(); $("#yarn-raw-body1").show(); $("#yarn-raw-body2").hide(); $("#yarn-swan-body").hide(); } if ($(this).attr("value") == "yarn_dyed") { $("#yarn-raw-body").hide(); $("#yarn-raw-body1").hide(); $("#yarn-raw-body2").show(); $("#yarn-swan-body").hide(); } if ($(this).attr("value") == "swan_yarn_dyed") { $("#yarn-raw-body").hide(); $("#yarn-raw-body1").hide(); $("#yarn-raw-body2").hide(); $("#yarn-swan-body").show(); } }); }); function grid_function(as) { window.location.href = '<?php echo base_url('weaving_panel/weaving_issue_data'); ?>/'+ '?id='+as; } </script> <style> .modal-open .modal { overflow-x: hidden !important; overflow-y: hidden !important; } </style> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <div class="page-bar"> <ul class="page-breadcrumb"> <li><i class="fa fa-home"></i> <a href="<?php echo base_url();?>dashboard/dashboard_fun">Home</a> <i class="fa fa-angle-right"></i> <a href="<?php echo base_url('weaving_panel/issued_loom'); ?>" >Issued to Loom </a></li> </ul> </div> <!-- END PAGE HEADER--> <!-- BEGIN DASHBOARD STATS --> <div class="portlet box blue-madison"> <div class="portlet-title"> <div class="caption">Material Issues </div> </div> <div class="portlet-body form"> <!-- BEGIN FORM--> <form> <div class="form-body"> <div id="myModal_weft_dying" class="modal fade" role="dialog" style="color:#000;"> <div class="modal-dialog" style="width: 95% !important; max-height: 600px !important; overflow-y: scroll; height: auto;"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Yarn Details</h4> </div> <div class="modal-body"> <fieldset> <div > <button id="yarn_generate" class="btn btn-primary generate" value="Generate" style="float:right;" data-dismiss="modal" >Submit</button> </div> <div class="row" style="padding-bottom:15px;padding-top:10px;"> <div class="col-sm-3"></div> <div class="col-sm-8"> <label class="radio-inline" style="margin-left: 200px !important;"><input type="radio" name="optradio" value="yarn_raw">Yarn - Raw </label> <label class="radio-inline"><input type="radio" name="optradio" value="yarn_twisting">Yarn - Twisting</label> <label class="radio-inline"><input type="radio" name="optradio" value="yarn_dyed">Yarn - Dyed</label> <label class="radio-inline"><input type="radio" name="optradio" checked value="swan_yarn_dyed">Swan - Yarn - Dyed</label> </div> <div class="col-sm-4"></div> </div> <!-- radio button ---> <!-- <input type="text" id="myInput" onkeyup="myFunction_filetr()" placeholder="Search for names.." title="Type in a name"> <input type="text" id="search" placeholder=" live search"></input>--> <!-- raw_yarn --> <div class="yarn-raw-body" id="yarn-raw-body" style="display:none;"> <label class="col-sm-1 col-xs-4" style="padding-right:0 !important;"><b>Search :</b> </label> <input type="text" id="search_yarn_raw" onkeyup="swan_myFunction()" placeholder="Type to search"> <br/><br/> <table class="table table-striped table-bordered table-hover" id="sample"> <thead> <tr> <th> Select yarn </th> <th> Purpose </th> <th> Yarn Name </th> <th> Yarn Denier </th> <th> Yarn Specification </th> <th style="display:none;"> shade </th> <th> Lot </th> <th> Bale </th> <th> Gross Weight </th> <th> Net Weight </th> <th > Location </th> <th style="display:none;"> Stage </th> </tr> </thead> <tbody id="modal_data_raw" class="modal_data_raw" > <?php $i=1; if(isset($yarn_raw)) { foreach($yarn_raw as $twisting) { ?> <tr> <td ><input type="radio" name="id" id="id" class="yarn_raw_id" value="<?php echo $i; ?>" style="width:20px !important;border:0px !important;padding:0px !important;"/></td> <td ><input type="text" name="m_yarn_name" id="m_yarn_name" class="m_yarn_name" value="<?php echo $twisting->purpose; ?>" style="width:170px !important;border:0px !important;padding:0px !important;" readonly="readonly"/></td> <td ><input type="text" name="m_yarn_name" id="m_yarn_name" class="m_yarn_name" value="<?php echo $twisting->yarnname; ?>" style="width:200px !important;border:0px !important;padding:0px !important;" readonly="readonly"/></td> <td ><input type="text" name="m_yarn_name" id="m_yarn_name" class="m_yarn_name" value="<?php echo $twisting->yarndenier; ?>" style="width:100px !important;border:0px !important;padding:0px !important;" readonly="readonly"/></td> <td ><input type="text" name="m_yarn_denier" id="m_yarn_denier" class="m_yarn_name" value="<?php echo $twisting->yarnspecification; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td style="display:none;" ><input type="text" name="m_yarn_specification" id="m_yarn_specification" class="m_yarn_name" style="width:120px !important;border:0px !important;" readonly="readonly"/></td> <td ><input type="text" name="m_yarn_specification" id="m_yarn_specification" class="m_yarn_name" value="<?php echo $twisting->lot; ?>" style="width:120px !important;border:0px !important" readonly="readonly"/></td> <td ><input type="text" name="lot" id="lot" class="m_yarn_name" value="<?php echo $twisting->bale; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td ><input type="text" name="lot" id="lot" class="m_yarn_name" value="<?php echo $twisting->issue_gross_weight; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td ><input type="text" name="bale" id="bale" class="m_yarn_name" value="<?php echo $twisting->issue_net_weight; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td ><input type="text" name="bale" id="bale" class="m_yarn_name" value="<?php echo $twisting->consumed_at; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td style="display:none;"><input type="text" name="bale" id="bale" class="m_yarn_name" value="<?php echo 'r'.$twisting->id; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> </tr> <?php $i++; }} ?> </tbody> </table> </div> <!--- twisted yarn ---> <div class="yarn-raw-body1" id="yarn-raw-body1" style="display:none;"> <label class="col-sm-1 col-xs-4" style="padding-right:0 !important;"><b>Search :</b> </label> <input type="text" id="search_yarn_twist" onkeyup="swan_twist_myFunction()" placeholder="Type to search"> <br/><br/> <table class="table table-striped table-bordered table-hover" id="sample"> <thead> <tr> <th> Select yarn </th> <th> Purpose </th> <th> Yarn Name </th> <th> Yarn Denier </th> <th> Yarn Specification </th> <th> DTL Shade </th> <th> Lot </th> <th> Bale </th> <th> Gross Weight </th> <th> Net Weight </th> <th > Location </th> <th style="display:none;"> Stage </th> </tr> </thead> <tbody id="modal_data_twist" class="modal_data_twist"> <?php if(isset($yarn_twist)) { foreach($yarn_twist as $twist_yarn) { ?> <tr> <td ><input type="radio" name="id" id="id" class="yarn_raw_id" style="width:20px !important;border:0px !important;padding:0px !important;"/></td> <td ><input type="text" name="m_yarn_name" id="m_yarn_name" class="m_yarn_name" value="<?php echo $twist_yarn->purpose; ?>" style="width:170px !important;border:0px !important;padding:0px !important;" readonly="readonly"/></td> <td ><input type="text" name="m_yarn_name" id="m_yarn_name" class="m_yarn_name" value="<?php echo $twist_yarn->yarnname; ?>" style="width:180px !important;border:0px !important;padding:0px !important;" readonly="readonly"/></td> <td><input type="text" name="m_yarn_name" id="m_yarn_name" class="m_yarn_name" value="<?php echo $twist_yarn->yarndenier; ?>" style="width:100px !important;border:0px !important;padding:0px !important;" readonly="readonly"/></td> <td ><input type="text" name="m_yarn_denier" id="m_yarn_denier" class="m_yarn_name" value="<?php echo $twist_yarn->yarnspecification; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td ><input type="text" name="m_yarn_specification" id="m_yarn_specification" class="m_yarn_name" value="<?php echo $twist_yarn->shades; ?>" style="width:90px !important;border:0px !important" readonly="readonly"/></td> <td ><input type="text" name="m_yarn_specification" id="m_yarn_specification" class="m_yarn_name" value="<?php echo $twist_yarn->lot; ?>" style="width:100px !important;border:0px !important" readonly="readonly"/></td> <td ><input type="text" name="lot" id="lot" class="m_yarn_name" value="<?php echo $twist_yarn->bale; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td ><input type="text" name="lot" id="lot" class="m_yarn_name" value="<?php echo $twist_yarn->issue_gross_weight; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td ><input type="text" name="bale" id="bale" class="m_yarn_name" value="<?php echo $twist_yarn->issue_net_weight; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td><input type="text" name="bale" id="bale" class="m_yarn_name" value="<?php echo $twist_yarn-> consumed_at; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td style="display:none;"><input type="text" name="bale" id="bale" class="m_yarn_name" value="<?php echo 't'.$twist_yarn->id; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> </tr> <?php }} ?> </tbody> </table> </div> <!----- dyed yarn ------------> <div class="yarn-raw-body2" id="yarn-raw-body2" style="display:none;"> <label class="col-sm-1 col-xs-4" style="padding-right:0 !important;"><b>Search : </b> </label> <input type="text" id="search_yarn_dyed" onkeyup="swan_dyed_myFunction()" placeholder="Type to search"> <br/><br/> <table class="table table-striped table-bordered table-hover" id="sample"> <thead> <tr> <th> Select yarn </th> <th> Purpose </th> <th> Yarn Name </th> <th> Yarn Denier </th> <th> Yarn Specification </th> <th> DTL Shade </th> <th> Lot </th> <th> Bale </th> <th> Gross Weight </th> <th> Net Weight </th> <th > Location </th> <th style="display:none;"> Stage </th> </tr> </thead> <tbody id="modal_data_dyed" class="modal_data_dyed"> <?php if(isset($yarn_dyed)) { foreach($yarn_dyed as $twisting) { ?> <tr> <td ><input type="radio" name="id" id="id" class="yarn_raw_id" style="width:20px !important;border:0px !important;padding:0px !important;"/></td> <td ><input type="text" name="m_yarn_name" id="m_yarn_name" class="m_yarn_name" value="<?php echo $twisting->purpose; ?>" style="width:170px !important;border:0px !important;padding:0px !important;" readonly="readonly"/></td> <td ><input type="text" name="m_yarn_name" id="m_yarn_name" class="m_yarn_name" value="<?php echo $twisting->yarnname; ?>" style="width:170px !important;border:0px !important;padding:0px !important;" readonly="readonly"/></td> <td><input type="text" name="m_yarn_name" id="m_yarn_name" class="m_yarn_name" value="<?php echo $twisting->yarndenier; ?>" style="width:100px !important;border:0px !important;padding:0px !important;" readonly="readonly"/></td> <td><input type="text" name="m_yarn_denier" id="m_yarn_denier" class="m_yarn_name" value="<?php echo $twisting->yarnspecification; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td><input type="text" name="m_yarn_specification" id="m_yarn_specification" class="m_yarn_name" value="<?php echo $twisting->shades; ?>" style="width:120px !important;border:0px !important" readonly="readonly"/></td> <td><input type="text" name="m_yarn_specification" id="m_yarn_specification" class="m_yarn_name" value="<?php echo $twisting->lot; ?>" style="width:70px !important;border:0px !important" readonly="readonly"/></td> <td><input type="text" name="lot" id="lot" class="m_yarn_name" value="<?php echo $twisting->bale; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td><input type="text" name="lot" id="lot" class="m_yarn_name" value="<?php echo $twisting->issue_gross_weight; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td><input type="text" name="bale" id="bale" class="m_yarn_name" value="<?php echo $twisting->issue_net_weight; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td><input type="text" name="bale" id="bale" class="m_yarn_name" value="<?php echo $twisting->consumed_at; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td style="display:none;"><input type="text" name="bale" id="bale" class="m_yarn_name" value="<?php echo 'd'.$twisting->id; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> </tr> <?php }} ?> </tbody> </table> </div> <!------- swan yarn -------------> <div class="yarn-swan-body" id="yarn-swan-body" > <label class="col-sm-1 col-xs-4" style="padding-right:0 !important;"><b>Search :</b> </label> <input type="text" id="search_yarn_swan" onkeyup="swan_yarn_myFunction()" placeholder="Type to search"> <br/><br/> <table class="table table-striped table-bordered table-hover" id="sample"> <thead> <tr> <th> Select yarn </th> <th> OSL No. </th> <th> Issue # </th> <th> Yarn Quality </th> <th> Yarn Name </th> <th> Yarn Denier </th> <th> Yarn Specification </th> <th> DTL Shade </th> <th> Color Code </th> <th> Dyed Weight </th> <th> Location </th> <th style="display:none;"> Stage </th> </tr> </thead> <tbody id="modal_data_swan" class="modal_data_swan" > <?php $i=1; if(isset($swan_dyed)) { foreach($swan_dyed as $twisting) { ?> <tr> <td ><input type="radio" name="id" id="id" class="yarn_swan_id" value="<?php echo $i; ?>" style="width:20px !important;border:0px !important;padding:0px !important;"/></td> <td ><input type="text" name="m_yarn_name" id="m_yarn_name" class="m_yarn_name" value="<?php echo $twisting->osl_no; ?>" style="width:200px !important;border:0px !important;padding:0px !important;" readonly="readonly"/></td> <td ><input type="text" name="m_yarn_name" id="m_yarn_name" class="m_yarn_name" value="<?php echo $twisting->issue_no; ?>" style="width:100px !important;border:0px !important;padding:0px !important;" readonly="readonly"/></td> <td ><input type="text" name="m_yarn_denier" id="m_yarn_denier" class="m_yarn_name" value="<?php echo $twisting->yarn_quality; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td ><input type="text" name="lot" id="lot" class="m_yarn_name" value="<?php echo $twisting->yarnName; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td ><input type="text" name="lot" id="lot" class="m_yarn_name" value="<?php echo $twisting->yarnSpecification; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td ><input type="text" name="bale" id="bale" class="m_yarn_name" value="<?php echo $twisting->yarnDenier; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td ><input type="text" name="bale" id="bale" class="m_yarn_name" value="<?php echo $twisting->shade; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td ><input type="text" name="bale" id="bale" class="m_yarn_name" value="<?php echo $twisting->color_code; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td ><input type="text" name="bale" id="bale" class="m_yarn_name" value="<?php echo $twisting->rec_dyed_qua; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td ><input type="text" name="bale" id="bale" class="m_yarn_name" value="<?php echo $twisting->location; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> <td style="display:none;"><input type="text" name="bale" id="bale" class="m_yarn_name" value="<?php echo 's'.$twisting->id; ?>" style="width:60px !important;border:0px !important" readonly="readonly"/></td> </tr> <?php $i++; }} ?> </tbody> </table> </div> </fieldset> </div> </div> </div> </div> <br/> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Select Yarn Details :</label> <div class="col-md-9"> <a id="addButton" onclick="grid_function(<?php echo $value_id; ?>)" class="modal_name" style="margin-left: 165px;"> <i class="fa fa-plus fa-2x" ></i></a><br/> </div> </div> </div> </div> <br/> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">OSL# :</label> <div class="col-md-9"> <input type="text" name="osl_no" id="osl_no" class="form-control" value="<?php echo $fetch->osl_no; ?>" readonly="readonly"> <input type="hidden" name="var_id" id="var_id" class="form-control" value="<?php echo $fetch->id; ?>" > <br> </div> </div> </div> </div> <div class="row" > <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Planned Width :</label> <div class="col-md-9"> <input type="text" name="planned_width" id="planned_width" class="form-control" readonly="readonly" value="<?php echo $fetch->selWidth; ?>"><br> </div> </div> </div> <!--/span--> </div> <div class="row" > <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Article :</label> <div class="col-md-9"> <input type="text" name="article" id="article" class="form-control" readonly="readonly" value="<?php echo $fetch->article; ?>"><br> </div> </div> </div> <!--/span--> </div> <div class="row" > <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Design :</label> <div class="col-md-9"> <input type="text" name="design" id="design" class="form-control" readonly="readonly" value="<?php echo $fetch->design; ?>"><br> </div> </div> </div> <!--/span--> </div> <div class="row" > <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">DTL Shade(Planning) :</label> <div class="col-md-9"> <input type="text" name="ssl_shade_w" id="ssl_shade_w" class="form-control" readonly="readonly" value="<?php echo $fetch->sslShade; ?>"><br> </div> </div> </div> <!--/span--> </div> <div class="row" > <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Planned Warp :</label> <div class="col-md-9"> <input type="text" name="planned_warp" id="planned_warp" class="form-control" readonly="readonly" value="<?php echo $fetch->warp_pland_mtr; ?>"><br> </div> </div> </div> <!--/span--> </div> <div class="row" > <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Planned Weft :</label> <div class="col-md-9"> <input type="text" name="planned_weft" id="planned_weft" class="form-control" readonly="readonly" value="<?php echo $fetch->weft_pland_mtr; ?>"><br> </div> </div> </div> <!--/span--> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Yarn Name :</label> <div class="col-md-9"> <input type="text" name="yarn_name" id="yarn_name" class="form-control" readonly="readonly"><br></div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Yarn Denier :</label> <div class="col-md-9"> <input type="text" name="yarn_den" id="yarn_den" class="form-control" readonly="readonly"><br> </div> </div> </div> <!--/span--> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Yarn Specification :</label> <div class="col-md-9"> <input type="text" name="yarn_spec" id="yarn_spec" class="form-control" readonly="readonly"><br> </div> </div> </div> <!--/span--> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">DTL Shade:</label> <div class="col-md-9"> <input type="text" name="ssl_shade" id="ssl_shade" class="form-control" readonly="readonly" readonly="readonly"><br> </div> </div> </div> <!--/span--> </div> <div class="row" > <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Color Code :</label> <div class="col-md-9"> <input type="text" name="w_color_code" id="w_color_code" class="form-control" readonly="readonly"><br> </div> </div> </div> <!--/span--> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Lot# :</label> <div class="col-md-9"> <input type="text" name="yarn_lot" id="yarn_lot" class="form-control" readonly="readonly"><br> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Bale / Issue # :</label> <div class="col-md-9"> <input type="text" name="yarn_bale" id="yarn_bale" class="form-control" readonly="readonly"><br></div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Stock Net Weight :</label> <div class="col-md-9"> <input type="text" name="bal_net_wt" id="bal_net_wt" class="form-control" readonly="readonly"><br> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Issued Net Weight :</label> <div class="col-md-9"> <input type="text" name="issue_net_wt" id="issue_net_wt" class="form-control" onkeyup="dyeing_issue_gross_weight(this.value)"><br> </div> </div> </div> </div> <div class="row" > <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Stock Balanced Net Weight :</label> <div class="col-md-9"> <input type="text" name="var_kgs" id="var_kgs" class="form-control" readonly="readonly"><br> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Issued Date :</label> <div class="col-md-9"> <input type="text" name="issued_date" id="issued_date" value="<?php echo Date('d-m-Y'); ?>" class="form-control" readonly><br> </div> </div> </div> </div> <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Remark :</label> <div class="col-md-9"> <input type="text" name="remark" id="remark" class="form-control" ><br> </div> </div> </div> </div> <div class="row" style="display:none;"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">id :</label> <div class="col-md-9"> <input type="text" name="ids" id="ids" class="form-control" readonly="readonly"><br> </div> </div> </div> </div> </div><br> </div> </div> <!--/row--> <!--/row--> <br> <div class="form-actions"> <div class="row"> <div class="col-md-8"> <div class="row"> <div class="col-md-offset-3 col-md-9"> <button id="deying_submit_data" class="btn default manag" style=" width:20%;" style=" width:30%; color:#FFFFFF; background:#485b7f;">Submit</button> <a href="<?php echo base_url(); ?>weaving_panel/issued_loom" class="btn default" style=" width:20%;">Cancel</a> </div> </div> </div> </div> </div> </div> </div> <!-- End BEGIN CONTAINER --> <!-- BEGIN FOOTER --> <!--Display content in new popup.. --> </span> </form> <!-- END FORM--> <!-- End BEGIN CONTAINER --> <!-- BEGIN FOOTER --> <script src="<?php echo base_url(); ?>assets/js/sweetalert.min.js" type="text/javascript"></script> <link href="<?php echo base_url(); ?>assets/css/sweetalert.min.css" rel="stylesheet" type="text/css" > <script> $("#deying_submit_data").click(function(e) { e.preventDefault(); var var_id =$('#var_id').val(); var osl_no =$('#osl_no').val(); var planned_width =$('#planned_width').val(); var article =$('#article').val(); var design =$('#design').val(); var ssl_shade_w =$('#ssl_shade_w').val(); var planned_warp =$('#planned_warp').val(); var planned_weft =$('#planned_weft').val(); var yarn_name =$('#yarn_name').val(); var yarn_den =$('#yarn_den').val(); var yarn_spec =$('#yarn_spec').val(); var ssl_shade =$('#ssl_shade').val(); var w_color_code =$('#w_color_code').val(); var yarn_lot =$('#yarn_lot').val(); var yarn_bale =$('#yarn_bale').val(); var bal_net_wt =$('#bal_net_wt').val(); var issue_net_wt =$('#issue_net_wt').val(); var issued_date =$('#issued_date').val(); var var_kgs =$('#var_kgs').val(); var ids =$('#ids').val(); var remark =$('#remark').val(); if(issue_net_wt > bal_net_wt ) { swal({ title: "Issue Net Weight is Exceeded", text: "", }); } else { // if(yarn_name != '' && yarn_den != '' && yarn_spec != '' && net_wt != '' && yarn_lot != '' && issue_net_wt != '') // { $.ajax({ url:"<?php echo base_url('weaving_panel/add_yarn_issue_loom_details');?>", type:"POST", data:{'issued_date':issued_date,'var_id':var_id,'osl_no':osl_no,'planned_width':planned_width,'article':article,'design':design,'ssl_shade_w':ssl_shade_w,'planned_warp':planned_warp,'planned_weft':planned_weft,'yarn_name':yarn_name,'yarn_den':yarn_den,'yarn_spec':yarn_spec,'ssl_shade':ssl_shade,'w_color_code':w_color_code,'yarn_lot':yarn_lot,'yarn_bale':yarn_bale,'bal_net_wt':bal_net_wt,'issue_net_wt':issue_net_wt,'var_kgs':var_kgs,'ids':ids,'remark':remark}, async:false, success:function(data) { window.location.href = '<?php echo base_url('weaving_panel/issued_loom');?>'; } }); } // else // { // swal({ // title: "Please Fill All The Fields", // text: "", // }); // } }); </script>