EVOLUTION-NINJA
Edit File: fabric_details.php
<style> .ui-jqgrid { text-transform: capitalize !important; } .tablediv { text-transform: uppercase !important; } .ui-jqgrid tr.jqgrow td{ text-transform: uppercase !important; } #jaytab { overflow:scroll; } </style> <script> function planningtypes(str) { if(str=="all") { $('#table_all').show(); $('#table_ho').hide(); $('#table_peenya').hide(); $('#table_nandi').hide(); $('#table_tailoring').hide(); $('#table_park').hide(); $('#table_BYATRANPURA').hide(); $('#table_VIJAYAPURA').hide(); $('#table_DODDAJALA').hide(); } else if(str=="ho") { $('#table_ho').show(); $('#table_all').hide(); $('#table_peenya').hide(); $('#table_nandi').hide(); $('#table_tailoring').hide(); $('#table_park').hide(); $('#table_BYATRANPURA').hide(); $('#table_VIJAYAPURA').hide(); $('#table_DODDAJALA').hide(); } else if(str=="peenya") { $('#table_peenya').show(); $('#table_all').hide(); $('#table_ho').hide(); $('#table_nandi').hide(); $('#table_tailoring').hide(); $('#table_park').hide(); $('#table_BYATRANPURA').hide(); $('#table_VIJAYAPURA').hide(); $('#table_DODDAJALA').hide(); } else if(str=="nandi") { $('#table_nandi').show(); $('#table_all').hide(); $('#table_ho').hide(); $('#table_peenya').hide(); $('#table_tailoring').hide(); $('#table_park').hide(); $('#table_BYATRANPURA').hide(); $('#table_VIJAYAPURA').hide(); $('#table_DODDAJALA').hide(); } else if(str=="tailoring") { $('#table_tailoring').show(); $('#table_all').hide(); $('#table_ho').hide(); $('#table_nandi').hide(); $('#table_park').hide(); $('#table_peenya').hide(); $('#table_BYATRANPURA').hide(); $('#table_VIJAYAPURA').hide(); $('#table_DODDAJALA').hide(); } else if(str=="kumara_park") { $('#table_park').show(); $('#table_all').hide(); $('#table_ho').hide(); $('#table_nandi').hide(); $('#table_peenya').hide(); $('#table_tailoring').hide(); $('#table_BYATRANPURA').hide(); $('#table_VIJAYAPURA').hide(); $('#table_DODDAJALA').hide(); } else if(str=="BYATRANPURA") { $('#table_nandi').hide(); $('#table_all').hide(); $('#table_ho').hide(); $('#table_peenya').hide(); $('#table_tailoring').hide(); $('#table_park').hide(); $('#table_BYATRANPURA').show(); $('#table_VIJAYAPURA').hide(); $('#table_DODDAJALA').hide(); } else if(str=="VIJAYAPURA") { $('#table_tailoring').hide(); $('#table_all').hide(); $('#table_ho').hide(); $('#table_nandi').hide(); $('#table_park').hide(); $('#table_peenya').hide(); $('#table_BYATRANPURA').hide(); $('#table_VIJAYAPURA').show(); $('#table_DODDAJALA').hide(); } else if(str=="DODDAJALA") { $('#table_park').hide(); $('#table_all').hide(); $('#table_ho').hide(); $('#table_nandi').hide(); $('#table_peenya').hide(); $('#table_tailoring').hide(); $('#table_BYATRANPURA').hide(); $('#table_VIJAYAPURA').hide(); $('#table_DODDAJALA').show(); } } </script> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <h3 class="page-title"> Fabric Stock Details </h3> <?php // echo $this->load->view('templates/nav_menu'); ?> <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="#" > Fabric Stock Details </a></li> </ul> </div> <div class="col-sm-12 radio-list"> <label class="radio-inline h_radio"><input type="radio" name="optradio" checked id="planningorder" onclick="planningtypes('all')" value="ho">ALL </label> <label class="radio-inline"><input type="radio" name="optradio" class="" id="planningorder" onclick="planningtypes('ho')" value="ho">HO </label> <label class="radio-inline"><input type="radio" name="optradio" id="planningorder" onclick="planningtypes('peenya')" value="peenya">PEENYA DYEING </label> <label class="radio-inline"><input type="radio" name="optradio" id="planningorder" onclick="planningtypes('nandi')" value="nandi">NANDI </label> <label class="radio-inline"><input type="radio" name="optradio" id="planningorder" onclick="planningtypes('tailoring')" value="tailoring">PEENYA TAILORING</label> <label class="radio-inline"><input type="radio" name="optradio" id="planningorder" onclick="planningtypes('kumara_park')" value="tailoring">KUMARA PARK</label> <label class="radio-inline"><input type="radio" name="optradio" id="planningorder" onclick="planningtypes('BYATRANPURA')" value="ho">BYATRANPURA </label> <label class="radio-inline"><input type="radio" name="optradio" id="planningorder" onclick="planningtypes('VIJAYAPURA')" value="peenya">VIJAYAPURA </label> <label class="radio-inline"><input type="radio" name="optradio" id="planningorder" onclick="planningtypes('DODDAJALA')" value="nandi">DODDAJALA </label> </div><br><br> <div class="col-sm-12 radio-list"> <input type="button" name="co" value="Preview" onclick="fun_preview2()"/> <input type="button" name="co" value="Edit" onclick="edit()"/> </div><br><br> <input type="hidden" id="delete_id" class="delete_id" value="<?php if(empty($access_row)){ } else { echo $access_row->delete_id; } ?>" > <input type="hidden" id="preview_id" class="preview_id" value="<?php if(empty($access_row)){ } else { echo $access_row->preview_id; } ?>" > <input type="hidden" id="edit_id" class="edit_id" value="<?php if(empty($access_row)){ } else { echo $access_row->edit_id; } ?>" > <input type="hidden" id="hhh_id" > <div id="table_all"> <div id = "jaytab" class="jaytab"> <table id="list6"></table> <div id="pager6"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> <div id="table_ho" style="display:none;"> <div id = "jaytab" class="jaytab"> <table id="list2"></table> <div id="pager2"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> <div id="table_peenya" style="display:none;"> <div id = "jaytab" class="jaytab"> <table id="list3"></table> <div id="pager3"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> <div id="table_nandi" style="display:none;"> <div id = "jaytab" class="jaytab"> <table id="list4"></table> <div id="pager4"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> <div id="table_tailoring" style="display:none;"> <div class="col-sm-12 radio-list"> <input type="button" name="co" value="Cut" onclick="split()"/> <input type="button" name="co" value="Joint" onclick="merge()"/> </div> <br><br> <div id = "jaytab" class="jaytab"> <table id="list5"></table> <div id="pager5"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> <div id="table_park" style="display:none;"> <div id = "jaytab" class="jaytab"> <table id="list7"></table> <div id="pager7"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> <div id="table_BYATRANPURA" style="display:none;"> <div id = "jaytab" class="jaytab"> <table id="list8"></table> <div id="pager8"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> <div id="table_VIJAYAPURA" style="display:none;"> <div id = "jaytab" class="jaytab"> <table id="list9"></table> <div id="pager9"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> <div id="table_DODDAJALA" style="display:none;"> <div id = "jaytab" class="jaytab"> <table id="list10"></table> <div id="pager10"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> </div> </div> </div> <!-- End BEGIN CONTAINER --> <!-- BEGIN FOOTER --> <!-- split Modal --> <div class="modal fade" id="split_modal" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Fabric Stock Details</h4> </div> <div class="modal-body"> <b>Number Of Spilts </b> : <input type="text" id="no_of_split" class="no_of_split" > <input type="hidden" id="ref_id" class="ref_id" > </div> <div class="modal-footer"> <button id="submit_modal" name="submit" onclick="goods_details()" class="btn btn-primary">Submit</button> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- split new Modal --> <div class="modal fade" id="split_modal_new" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Fabric Stock Details</h4> </div> <div class="modal-body"> <b>Number Of Cut </b> : <input type="text" id="no_of_split_new" class="no_of_split" > <input type="hidden" id="ref_id1" class="ref_id" > </div> <div class="modal-footer"> <button id="submit_modal" name="submit" onclick="goods_details_new()" class="btn btn-primary">Next</button> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div> <div class="modal fade" id="content_modal_new" role="dialog" > <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Below Fabric To Be Cut :</h4> </div> <div class="table table-responsive"> <input type="hidden" id="table_split1" name="table_split" class="table_split" > <input type="hidden" id="table_ref_id1" name="table_ref_id" class="table_ref_id" > <input type="hidden" id="rec_weightt1" class="rec_weightt" > <input type="hidden" id="rec_qty1" class="rec_qty" > <table border="1" width="100%" style="border-spacing:0;margin-top: 1%;" cellpadding="5px"> <tr> <td ><b>SI No.</b></td> <td ><b>PO# / DTL #</b></td> <td ><b>DTL Piece No</b></td> <td ><b>Supplier Piece No</b></td> <td ><b>Article(PRODUCT)</b></td> <td ><b>Width</b></td> <td ><b>Design</b></td> <td ><b>Shades</b></td> <td ><b>Received Weight</b></td> <td ><b>Actual Quantity</b></td> </tr> <tbody id="dynamicTbody1" > </tbody> </table> <hr/> <h4 class="modal-title">The above fabrics cut into as below:</h4> <hr/> <table border="1" width="100%" style="border-spacing:0;margin-top: 1%;" cellpadding="5px"> <tr> <td ><b>SI No.</b></td> <td ><b>PO# / DTL #</b></td> <td ><b>DTL Piece No</b></td> <td ><b>Supplier Piece No</b></td> <td ><b>Article(PRODUCT)</b></td> <td ><b>Width</b></td> <td ><b>Design</b></td> <td ><b>Shades</b></td> <td ><b>Cut Width</b></td> <td ><b>Cut Weight</b></td> <td ><b>Cut Quantity</b></td> </tr> <tbody id="dynamicTbody2" > </tbody> </table> </div> <div class="modal-footer"> <button id="submit_modal" name="submit" onclick="content_goods_details_new()" class="btn btn-primary">Submit</button> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- merge--> <div class="modal fade" id="merge_model" role="dialog" > <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Fabric Stock Details</h4> </div> <div class="table table-responsive"> <input type="hidden" id="table_split2" name="table_split" class="table_split" > <input type="hidden" id="table_ref_id2" name="table_ref_id" class="table_ref_id" > <input type="hidden" id="rec_weightt2" class="rec_weightt" > <input type="hidden" id="rec_qty2" class="rec_qty" > <h4 class="modal-title">Following Fabrics to be joint:</h4> <hr/> <table border="1" width="100%" style="border-spacing:0;margin-top: 1%;" cellpadding="5px"> <tr> <td ><b>SI No.</b></td> <td ><b>PO# / DTL #</b></td> <td ><b>DTL Piece No</b></td> <td ><b>Supplier Piece No</b></td> <td ><b>Article(PRODUCT)</b></td> <td ><b>Width</b></td> <td ><b>Design</b></td> <td ><b>Shades</b></td> <td ><b>Received Weight</b></td> <td ><b>Actual Quantity</b></td> </tr> <tbody id="dynamicTbody3" > </tbody> </table> <hr/> <h4 class="modal-title">Joint Fabric Details:</h4> <hr/> <table border="1" width="100%" style="border-spacing:0;margin-top: 1%;" cellpadding="5px"> <tr> <td ><b>SI No.</b></td> <td ><b>PO# / DTL #</b></td> <td ><b>DTL Piece No</b></td> <td ><b>Supplier Piece No</b></td> <td ><b>Article(PRODUCT)</b></td> <td ><b>Width</b></td> <td ><b>Design</b></td> <td ><b>Shades</b></td> <td ><b>Received Weight</b></td> <td ><b>Actual Quantity</b></td> </tr> <tbody id="dynamicTbody4" > </tbody> </table> </div> <div class="modal-footer"> <button id="submit_modal" name="submit" onclick="content_goods_details_merge()" class="btn btn-primary">Submit</button> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- split content Modal --> <div class="modal fade" id="content_modal" role="dialog" > <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Fabric Stock Details</h4> </div> <div class="table table-responsive"> <input type="hidden" id="table_split" name="table_split" class="table_split" > <input type="hidden" id="table_ref_id" name="table_ref_id" class="table_ref_id" > <input type="hidden" id="rec_weightt" class="rec_weightt" > <input type="hidden" id="rec_qty" class="rec_qty" > <table border="1" width="100%" style="border-spacing:0;margin-top: 1%;" cellpadding="5px"> <tr> <td ><b>SI No.</b></td> <td ><b>PO# / DTL #</b></td> <td ><b>DTL Piece No</b></td> <td ><b>Supplier Piece No</b></td> <td ><b>Article(PRODUCT)</b></td> <td ><b>Width</b></td> <td ><b>Design</b></td> <td ><b>Shades</b></td> <td ><b>Received Weight</b></td> <td ><b>Actual Quantity</b></td> </tr> <tbody id="dynamicTbody" > </tbody> </table> </div> <div class="modal-footer"> <button id="submit_modal" name="submit" onclick="content_goods_details()" class="btn btn-primary">Submit</button> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- BEGIN FOOTER --> <link rel="stylesheet" href="<?php echo base_url('assets/css/code_jquery.min.css');?>"> <script src="<?php echo base_url('assets/js/jquery-ui.min.js'); ?>" type="text/javascript"></script> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/jquery-ui.min.css'); ?>" /> <style> .ss{ padding-right: 0 !important; padding-left: 0 !important; } .form-control { //width:65% !important; //height:27px !important; //padding: 3px 12px !important; //border-radius: 0px !important; //margin-bottom:15px; } label { font-weight: normal; text-align: left; } .hr-line{ border-top: 1px solid #465A81; } .well-sm { padding: 3px !important; border-radius: 0px !important; } input[type="file"] { padding-bottom: 28px !important; height: 25px !important; color:transparent; } .portlet.box.blue-madison { border: 1px solid #fff !important; border-top: 0; background:#fff !important; } #table_approved_indent { display:none; } #refresh_list3 { display:none !important; } </style> <script> function getDesignAndQuality(articleNo) { $.ajax({ type: "post", url: "<?php echo base_url(); ?>marketing/getDesignAndQuality", data: "articleNo=" + articleNo, success: function (data) { var objData = jQuery.parseJSON(data); document.getElementById("design").value = objData.design; document.getElementById("quality").value = objData.quality; } }); } </script> <!-----------------datepicker-------------> <!-- The link to the CSS that the grid needs --> <link href="<?php echo base_url('assets/css/sweetalert2.min.css');?>" rel="stylesheet"/> <script src="<?php echo base_url('assets/js/sweetalert2.min.js');?>"></script> <script type="text/ecmascript" src="<?php echo base_url('jqgrid/js/jquery.jqGrid.min.js'); ?>"></script> <!-- This is the localization file of the grid controlling messages, labels, etc. <!-- We support more than 40 localizations --> <script type="text/ecmascript" src="<?php echo base_url('jqgrid/js/i18n/grid.locale-en.min.js'); ?>"></script> <!-- A link to a jQuery UI ThemeRoller theme, more than 22 built-in and many more custom --> <!-- The link to the CSS that the grid needs --> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('jqgrid/css/ui.jqgrid.min.css'); ?>" /> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('jqgrid/css/ui.jqgrid-bootstrap.min.css'); ?>" /> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('jqgrid/css/ui.jqgrid-bootstrap-ui.min.css'); ?>" /> <link rel="stylesheet" href="<?php echo base_url('assets/css/code_jquery.min.css');?>"> <script src="<?php echo base_url('assets/js/jquery-ui.min.js'); ?>" type="text/javascript"></script> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/jquery-ui.min.css'); ?>" /> <style type="text/css"> .ss{ padding-right: 0 !important; padding-left: 0 !important; } label { font-weight: normal; text-align: left; } .hr-line{ border-top: 1px solid #465A81; } .well-sm { padding: 3px !important; border-radius: 0px !important; } input[type="file"] { padding-bottom: 28px !important; height: 25px !important; color:transparent; } .portlet.box.blue-madison { border: 1px solid #fff !important; border-top: 0; background:#fff !important; } input[type=file] { display: none; } .ui-jqgrid .ui-jqgrid-caption { text-align: left; background: rgb(72,91,127); color: white; } .ui-jqdialog .ui-jqdialog-titlebar { padding: .1em .1em; min-height: 35px; background: rgb(72,91,127); color: white; } .ui-jqdialog .ui-jqdialog-titlebar-close span { display: block; margin: -9px; } #sData { height: 27px; } #cData { height: 27px; } #dData { height: 27px; } #eData { height: 27px; } .coledit { cursor:pointer; text-align: right; padding-right: 33px !important; padding-left: 33px !important; } .ui-jqgrid .ui-jqgrid-btable tbody tr.jqgrow td { overflow: hidden; white-space: pre; } </style> <!-----------------datepicker-------------> <!-- The link to the CSS that the grid needs --> <script> <!----------------------------------ho access controll -------------------------------> $(document).ready(function (){ jQuery("#list2").jqGrid({ url:"<?php echo base_url('new_stores/details_ho_fetch1')?>", datatype: "json", colNames:['Id','Customer ID','Vendor Name / Factory','PO# / DTL No.','DTL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Recd Wt','Actual Quantity','Rejected Mtrs','Variance Mtrs','Recd Date','Location','Action','Preview','Edit'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'customer_id',index:'customer_id', width:50,editable:false,width:130}, {name:'vendor_name',index:'vendor_name', width:50,editable:false,width:130}, {name:'po_no',index:'po_no',edittype:'text',editable:true,editrules:{required: true}, width:120}, {name:'ssl_pc_no',index:'ssl_pc_no',editable:true, width:130}, {name:'splited_piece_no',index:'splited_piece_no',editable:true, width:120}, {name:'piece_no',index:'piece_no',editable:true, width:120}, {name:'product_name',index:'product_name', width:50,editable:false,width:130}, {name:'width',index:'width', width:50,editable:false,width:100}, {name:'design',index:'design', width:50,editable:false,width:100}, {name:'shades',index:'shades', width:50,editable:false,width:100}, {name:'rec_weight',index:'rec_weight',hidden:false,editable:true, width:120}, {name:'balanced_mtrs',index:'balanced_mtrs',hidden:false,editable:true, width:120}, {name:'rejected_mtrs',index:'rejected_mtrs',hidden:false,editable:true, width:120}, {name:'variance_mtrs',index:'variance_mtrs', editable:true,editrules:{required: true},width:120}, {name:'received_date',index:'received_date', editable:true,editrules:{required: true},width:120}, {name:'consumed_at',index:'consumed_at', editable:true,editrules:{required: true},width:120}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_split_model($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='SPLIT' onclick='some_function' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_preview($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='PREVIEW' onclick='some_function' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_edit($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='EDIT' onclick='some_function' \>"; }}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager2", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, caption:"Fabric Stock Details", footerrow: true, loadComplete: function () { var sumOfPrice_rec_weight = jQuery("#list2").jqGrid('getCol','rec_weight',false,'sum'); var sumOfPrice_balanced_mtrs = jQuery("#list2").jqGrid('getCol','balanced_mtrs',false,'sum'); var sumOfPrice_var_mtrs = jQuery("#list2").jqGrid('getCol','variance_mtrs',false,'sum'); //var s=sumOfPrice_rec_weight.toFixed(2); jQuery("#list2").jqGrid('footerData', 'set', { shades: 'Total:', rec_weight: sumOfPrice_rec_weight.toFixed(2) , balanced_mtrs: sumOfPrice_balanced_mtrs.toFixed(2) , variance_mtrs: sumOfPrice_var_mtrs.toFixed(2) }); }, }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list2").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list2").jqGrid('navGrid','#pager2', {edit:false,add:false,del:false,search:false,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true } ); }); <!----------------------------------peenya access controll -------------------------------> $(document).ready(function (){ jQuery("#list3").jqGrid({ url:"<?php echo base_url('new_stores/details_peenya_fetch1')?>", datatype: "json", colNames:['Id','Customer ID','Vendor Name / Factory','PO# / DTL No.','DTL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Recd Wt','Actual Quantity','Rejected Mtrs','Variance Mtrs','Recd Date','Location','Action','Preview','Edit'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'customer_id',index:'customer_id', width:50,editable:false,width:130}, {name:'vendor_name',index:'vendor_name', width:50,editable:false,width:100}, {name:'po_no',index:'po_no',edittype:'text',editable:true,editrules:{required: true}, width:80}, {name:'ssl_pc_no',index:'ssl_pc_no',editable:true, width:70}, {name:'splited_piece_no',index:'splited_piece_no',editable:true, width:120}, {name:'piece_no',index:'piece_no',editable:true, width:70}, {name:'product_name',index:'product_name', width:50,editable:false,width:70}, {name:'width',index:'width', width:50,editable:false,width:70}, {name:'design',index:'design', width:50,editable:false,width:70}, {name:'shades',index:'shades', width:50,editable:false,width:70}, {name:'rec_weight',index:'rec_weight',hidden:false,editable:true, width:70}, {name:'balanced_mtrs',index:'balanced_mtrs',hidden:false,editable:true, width:70}, {name:'rejected_mtrs',index:'rejected_mtrs',hidden:false,editable:true, width:70}, {name:'variance_mtrs',index:'variance_mtrs', editable:true,editrules:{required: true},width:80}, {name:'received_date',index:'received_date', editable:true,editrules:{required: true},width:120}, {name:'consumed_at',index:'consumed_at', editable:true,editrules:{required: true},width:80}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_split_model($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='SPLIT' onclick='some_function' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_preview($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='PREVIEW' onclick='some_function' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_edit($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='EDIT' onclick='some_function' \>"; }}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager3", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, caption:"Fabric Stock Details", footerrow: true, loadComplete: function () { var sumOfPrice_rec_weight = jQuery("#list3").jqGrid('getCol','rec_weight',false,'sum'); var sumOfPrice_balanced_mtrs = jQuery("#list3").jqGrid('getCol','balanced_mtrs',false,'sum'); var sumOfPrice_var_mtrs = jQuery("#list3").jqGrid('getCol','variance_mtrs',false,'sum'); //var s=sumOfPrice_rec_weight.toFixed(2); jQuery("#list3").jqGrid('footerData', 'set', { shades: 'Total:', rec_weight: sumOfPrice_rec_weight.toFixed(2) , balanced_mtrs: sumOfPrice_balanced_mtrs.toFixed(2) , variance_mtrs: sumOfPrice_var_mtrs.toFixed(2) }); }, }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list3").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list3").jqGrid('navGrid','#pager3', {edit:false,add:false,del:false,search:false,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true } ); }); <!----------------------------------nandi access controll -------------------------------> $(document).ready(function (){ jQuery("#list4").jqGrid({ url:"<?php echo base_url('new_stores/details_nandi_fetch1')?>", datatype: "json", colNames:['Id','Customer ID','Vendor Name / Factory','PO# / DTL No.','DTL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Recd Wt','Actual Quantity','Rejected Mtrs','Variance Mtrs','Recd Date','Location','Action','Preview','Edit'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'customer_id',index:'customer_id', width:50,editable:false,width:130}, {name:'vendor_name',index:'vendor_name', width:50,editable:false,width:100}, {name:'po_no',index:'po_no',edittype:'text',editable:true,editrules:{required: true}, width:70}, {name:'ssl_pc_no',index:'ssl_pc_no',editable:true, width:70}, {name:'splited_piece_no',index:'splited_piece_no',editable:true, width:120}, {name:'piece_no',index:'piece_no',editable:true, width:70}, {name:'product_name',index:'product_name', width:50,editable:false,width:70}, {name:'width',index:'width', width:50,editable:false,width:70}, {name:'design',index:'design', width:50,editable:false,width:70}, {name:'shades',index:'shades', width:50,editable:false,width:70}, {name:'rec_weight',index:'rec_weight',hidden:false,editable:true, width:70}, {name:'balanced_mtrs',index:'balanced_mtrs',hidden:false,editable:true, width:70}, {name:'rejected_mtrs',index:'rejected_mtrs',hidden:false,editable:true, width:70}, {name:'variance_mtrs',index:'variance_mtrs', editable:true,editrules:{required: true},width:80}, {name:'received_date',index:'received_date', editable:true,editrules:{required: true},width:120}, {name:'consumed_at',index:'consumed_at', editable:true,editrules:{required: true},width:80}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_split_model($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='SPLIT' onclick='some_function' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_preview($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='PREVIEW' onclick='some_function' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_edit($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='EDIT' onclick='some_function' \>"; }}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager4", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, caption:"Fabric Stock Details", footerrow: true, loadComplete: function () { var sumOfPrice_rec_weight = jQuery("#list4").jqGrid('getCol','rec_weight',false,'sum'); var sumOfPrice_balanced_mtrs = jQuery("#list4").jqGrid('getCol','balanced_mtrs',false,'sum'); var sumOfPrice_var_mtrs = jQuery("#list4").jqGrid('getCol','variance_mtrs',false,'sum'); //var s=sumOfPrice_rec_weight.toFixed(2); jQuery("#list4").jqGrid('footerData', 'set', { shades: 'Total:', rec_weight: sumOfPrice_rec_weight.toFixed(2) , balanced_mtrs: sumOfPrice_balanced_mtrs.toFixed(2) , variance_mtrs: sumOfPrice_var_mtrs.toFixed(2) }); }, }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list4").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list4").jqGrid('navGrid','#pager4', {edit:false,add:false,del:false,search:false,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true } ); }); <!----------------------------------tailoring access controll -------------------------------> $(document).ready(function (){ var ll; var currids =[]; jQuery("#list5").jqGrid({ url:"<?php echo base_url('new_stores/details_tailoring_fetch1')?>", datatype: "json", colNames:['Id','Customer ID','Vendor Name / Factory','PO# / DTL No.','DTL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Recd Wt','Actual Quantity','Rejected Mtrs','Variance Mtrs','Recd Date','Location','Action','Preview','Edit'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'customer_id',index:'customer_id', width:50,editable:false,width:130}, {name:'vendor_name',index:'vendor_name', width:50,editable:false,width:100}, {name:'po_no',index:'po_no',edittype:'text',editable:true,editrules:{required: true}, width:80}, {name:'ssl_pc_no',index:'ssl_pc_no',editable:true, width:70}, {name:'splited_piece_no',index:'splited_piece_no',editable:true, width:120}, {name:'piece_no',index:'piece_no',editable:true, width:70}, {name:'product_name',index:'product_name', width:50,editable:false,width:70}, {name:'width',index:'width', width:50,editable:false,width:70}, {name:'design',index:'design', width:50,editable:false,width:70}, {name:'shades',index:'shades', width:50,editable:false,width:70}, {name:'rec_weight',index:'rec_weight',hidden:false,editable:true, width:70}, {name:'balanced_mtrs',index:'balanced_mtrs',hidden:false,editable:true, width:70}, {name:'rejected_mtrs',index:'rejected_mtrs',hidden:false,editable:true, width:70}, {name:'variance_mtrs',index:'variance_mtrs', editable:true,editrules:{required: true},width:80}, {name:'received_date',index:'received_date', editable:true,editrules:{required: true},width:120}, {name:'consumed_at',index:'consumed_at', editable:true,editrules:{required: true},width:80}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_split_model($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='SPLIT' onclick='some_function' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_preview($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='PREVIEW' onclick='some_function' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_edit($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='EDIT' onclick='some_function' \>"; }}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager5", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, multiselect: true, onSelectRow: function(id) { if(id && id !== ll) { jQuery('#list5').jqGrid('restoreRow',ll); jQuery('#list5').jqGrid('editRow',id,true); ll=id; var id=jQuery("#list5").jqGrid('getGridParam','selrow'); currids.push(id); var result = []; $.each(currids, function(i, e) { if ($.inArray(e, result) == -1) result.push(e); }); changefunction(result); changefunction_merge(result); } }, onSelectAll:function(ids) { changefunction(ids); changefunction_merge(ids); }, caption:"Fabric Stock Details", footerrow: true, loadComplete: function () { var sumOfPrice_rec_weight = jQuery("#list5").jqGrid('getCol','rec_weight',false,'sum'); var sumOfPrice_balanced_mtrs = jQuery("#list5").jqGrid('getCol','balanced_mtrs',false,'sum'); var sumOfPrice_var_mtrs = jQuery("#list5").jqGrid('getCol','variance_mtrs',false,'sum'); //var s=sumOfPrice_rec_weight.toFixed(2); jQuery("#list5").jqGrid('footerData', 'set', { shades: 'Total:', rec_weight: sumOfPrice_rec_weight.toFixed(2) , balanced_mtrs: sumOfPrice_balanced_mtrs.toFixed(2) , variance_mtrs: sumOfPrice_var_mtrs.toFixed(2) }); }, }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list5").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list5").jqGrid('navGrid','#pager5', {edit:false,add:false,del:false,search:false,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true } ); }); function changefunction_merge(cellValues1) { const myArray = String(cellValues1).split(","); var as = myArray[myArray.length - 1]; var ref_id = String(cellValues1); var no_of_split = 1; //alert(ref_id); $.ajax({ type:'post', url:'<?php echo base_url("stock_history_details/fabric_stock_merge"); ?>', data:{'no_of_split':no_of_split,'ref_id':ref_id}, async:false, success:function(data) { var objData = jQuery.parseJSON(data); console.log(data); var split=objData.no_of_split; var value = objData.getalldata; //alert(objData.getalldata); var content = ''; $('#dynamicTbody3').empty(); $('#dynamicTbody4').empty(); $('#table_ref_id2').val(ref_id); $('#table_split2').val(split); //$('#rec_weightt2').val(val1.rec_weight); // $('#rec_qty2').val(val1.balanced_mtrs); //var weight=parseFloat(val1.rec_weight) / split; //var qty=parseFloat(val1.balanced_mtrs) / split; //var ww=parseFloat(weight.toFixed(2)); //var qq=parseFloat(qty.toFixed(2)); var i = 1; var error = 0; var shade = ''; var article = ''; $.each(value, function(k, val1) { if(shade == ''){ shade = val1.shades; article = val1.product_name; } else{ if(val1.shades != shade){ error = 1; } if(val1.product_name != article){ error = 1; } } }); // if((k+1) in value){ // if(value[k].product_name != value[k+1].product_name){ // error = 1; // } // if(value[k].shades != value[k+1].shades){ // error = 2; // } // } if(error != 0){ swal({ title: "Article and shade should same...", text: "", }); error = 0; return; } var ww = 0; var qq = 0; var width_total = 0; $.each(value, function(k, val1) { var weight = parseFloat(val1.rec_weight); var qty = parseFloat(val1.balanced_mtrs); var width = parseFloat(val1.width); ww += parseFloat(weight.toFixed(2)); qq += parseFloat(qty.toFixed(2)); width_total += parseFloat(width.toFixed(2)); console.log(ww); console.log(qq); content += '<tr id="rowCount1" class="rowCount">'; content += '<td><input type="text" name="ourShade1[1]" id="" class="form-control" value="'+i+'" /></td>'; content += '<td style="width: 214px;"><input type="hidden" name="refe_ids2[]" class="form-control refe_ids2" value="'+val1.id+'" readonly/><input type="text" name="po[]" id="" class="form-control" value="'+val1.po_no+'" readonly/></td>'; content += '<td><input type="text" name="ssl_pc_no2[]" id="" class="form-control ssl_piece_number2" value="'+val1.ssl_pc_no+'/'+i+'" readonly/></td>'; content += '<td><input type="text" name="ourShade2[1]" id="" class="form-control" value="'+val1.piece_no+'" readonly/></td>'; content += '<td><input type="text" name="ourShade2[1]" id="" class="form-control" value="'+val1.product_name+'" readonly /></td>'; content += '<td><input type="text" name="ourShade2[1]" id="" class="form-control" value="'+val1.width+'" readonly/></td>'; content += '<td><input type="text" name="ourShade2[1]" id="" class="form-control" value="'+val1.design+'" readonly/></td>'; content += '<td><input type="text" name="ourShade2[1]" id="" class="form-control" value="'+val1.shades+'" readonly/></td>'; content += '<td><input type="text" name="wei2[]" id="" class="form-control rec_w2" value="'+val1.rec_weight+'" readonly/></td>'; content += '<td><input type="text" name="qtty2[]" id="" class="form-control rec_q2" value="'+val1.balanced_mtrs+'" readonly/></td>'; content += '</tr>'; i+1; }); // content += '<tr >'; // content += '<td colspan="13" style="text-align: right;font-size: 14px;font-weight: bold;">'+'Total Received Weight : '+val1.rec_weight+' '+'</td>'; // content += '</tr>'; // content += '<tr >'; // content += '<td colspan="13" style="text-align: right;font-size: 14px;font-weight: bold;">'+'Total Actual Quantity : '+val1.balanced_mtrs+' '+'<input type="hidden" value="'+val1.balanced_mtrs+'" class="actual_qty1"></td>'; // content += '</tr>'; $("#dynamicTbody3").html(content); content = ''; i = 1; content += '<tr id="rowCount1" class="rowCount">'; content += '<td><input type="text" name="ourShade1[1]" id="" class="form-control" value="'+i+'" /></td>'; content += '<td style="width: 214px;"><input type="hidden" name="refe_ids3[]" class="form-control refe_ids3" value="'+value[0].id+'" readonly/><input type="text" name="po[]" id="" class="form-control po3" value="'+value[0].po_no+'" readonly/></td>'; content += '<td><input type="text" name="ssl_pc_no3[]" id="" class="form-control ssl_piece_number3" value="'+'JF '+value[0].ssl_pc_no+'" readonly/></td>'; content += '<td><input type="text" name="ourShade3[1]" id="" class="form-control piece_no3" value="'+value[0].piece_no+'" readonly/></td>'; content += '<td><input type="text" name="ourShade3[1]" id="" class="form-control product_name3" value="'+value[0].product_name+'" readonly /></td>'; content += '<td><input type="number" name="ourShade3[1]" id="" class="form-control width3" value=" " /></td>'; content += '<td><input type="text" name="ourShade3[1]" id="" class="form-control design3" value="'+value[0].design+'" readonly/></td>'; content += '<td><input type="text" name="ourShade3[1]" id="" class="form-control shades3" value="'+value[0].shades+'" readonly/></td>'; content += '<td><input type="text" name="wei3[]" id="" class="form-control rec_w3" value="'+ww+'" /></td>'; content += '<td><input type="text" name="qtty3[]" id="" class="form-control rec_q3" value="'+qq+'" /></td>'; content += '</tr>'; $("#dynamicTbody4").html(content); //$('#merge_model').modal('show'); } }); } function changefunction(cellValues1) { const myArray = String(cellValues1).split(","); var as = myArray[myArray.length - 1]; $('#ref_id1').val(as); $.ajax({ type : 'post', url : '<?php echo site_url("out_source/fabric_selected_stock")?>', data : {'stock':cellValues1}, success:function(response) { response=jQuery.parseJSON(response); console.log(response); if(response) { var con = ''; var a=1; var totSI=0; var rec=0; var act=0; var toteq=0; $.each(response, function(key, val) { totSI=parseFloat(totSI)+parseFloat(a); toteq=parseFloat(toteq)+parseFloat(val.sequence); con += '<tr class="new_product"><td><input type="hidden" class="indent_goods_id" name="goods_id[]" value="'+val.goods_id+'" readonly /><input type="hidden" class="indent_id" name="id[]" value="'+val.id+'" readonly />'+a+'</td><td>'+val.vendor_name+'</td><td>'+val.consumed_at+'</td><td>'+val.piece_no+'</td><td>'+val.product_name+'</td><td>'+val.shades+'</td><td>'+val.width+'</td><td>'+val.rec_weight+'</td><td>'+val.ssl_pc_no+'</td><td>'+val.updated_unit+'</td><td>'+val.value+'</td><td>'+val.received_date+'</td></tr>'; a++; //rec=parseFloat(rec)+parseFloat(val.received_wt); //act=parseFloat(act)+parseFloat(val.received_qty); }); // con += '<tr class="new_product" ><td style="background-color:none !important;border-right:none !important;"><input style="width:50px; border:none !important;" type="text" name="tot_sl_no" value="'+totSI+'" readonly /></td><td style="background-color:none !important;border-right:none !important;border-left:none !important;">TOTAL</td><td style="background-color:none !important;border-right:none !important;border-left:none !important;"></td><td style="background-color:none !important;border-right:none !important;border-left:none !important;"></td><td style="background-color:none !important;border-right:none !important;border-left:none !important;"></td><td style="background-color:none !important;border-right:none !important;border-left:none !important;"></td><td style="background-color:none !important;border-right:none !important;border-left:none !important;"></td><td style="background-color:none !important;border-right:none !important;border-left:none !important;"></td><td style="background-color:none !important;border-right:none !important;border-left:none !important;">'+rec.toFixed(2)+'</td><td style="background-color:none !important;border-right:none !important;border-left:none !important;">'+act.toFixed(2)+'</td><td style="background-color:none !important;border-right:none !important;border-left:none !important;"><input style="width:50px;border:none !important;" type="text" class="seq_tot" name="sequence" value="'+toteq+'" readonly /></td></tr>'; $('#hidden_table').empty(); $('#hidden_table').append(con); /* $(".remove").click(function(){ $(this).closest('.new_product').remove(); });*/ } } }); //$('#list2'+i).addClass( "ui-state-highlight" ); $('#edit_modal').modal('hide'); $('.show-remaining').show(); /*} else $( "#dialogSelectRow" ).dialog();*/ } function split() { $('#split_modal_new').modal('show'); } function merge() { $('#merge_model').modal('show'); } <!----------------------------------BYATRANPURA access controll -------------------------------> $(document).ready(function (){ jQuery("#list8").jqGrid({ url:"<?php echo base_url('new_stores/details_BYATRANPURA_fetch1')?>", datatype: "json", colNames:['Id','Customer ID','Vendor Name / Factory','PO# / DTL No.','DTL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Recd Wt','Actual Quantity','Rejected Mtrs','Variance Mtrs','Recd Date','Location','Action','Preview','Edit'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'customer_id',index:'customer_id', width:50,editable:false,width:130}, {name:'vendor_name',index:'vendor_name', width:50,editable:false,width:70}, {name:'po_no',index:'po_no',edittype:'text',editable:true,editrules:{required: true}, width:70}, {name:'ssl_pc_no',index:'ssl_pc_no',editable:true, width:70}, {name:'splited_piece_no',index:'splited_piece_no',editable:true, width:120}, {name:'piece_no',index:'piece_no',editable:true, width:70}, {name:'product_name',index:'product_name', width:50,editable:false,width:70}, {name:'width',index:'width', width:50,editable:false,width:70}, {name:'design',index:'design', width:50,editable:false,width:70}, {name:'shades',index:'shades', width:50,editable:false,width:70}, {name:'rec_weight',index:'rec_weight',hidden:false,editable:true, width:70}, {name:'balanced_mtrs',index:'balanced_mtrs',hidden:false,editable:true, width:70}, {name:'rejected_mtrs',index:'rejected_mtrs',hidden:false,editable:true, width:70}, {name:'variance_mtrs',index:'variance_mtrs', editable:true,editrules:{required: true},width:70}, {name:'received_date',index:'received_date', editable:true,editrules:{required: true},width:70}, {name:'consumed_at',index:'consumed_at', editable:true,editrules:{required: true},width:70}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_split_model($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='SPLIT' onclick='some_function' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:90,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_preview($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='PREVIEW' onclick='some_function' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_edit($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='EDIT' onclick='some_function' \>"; }}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager8", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, caption:"Fabric Stock Details", footerrow: true, loadComplete: function () { var sumOfPrice_rec_weight = jQuery("#list8").jqGrid('getCol','rec_weight',false,'sum'); var sumOfPrice_balanced_mtrs = jQuery("#list8").jqGrid('getCol','balanced_mtrs',false,'sum'); var sumOfPrice_var_mtrs = jQuery("#list8").jqGrid('getCol','variance_mtrs',false,'sum'); //var s=sumOfPrice_rec_weight.toFixed(2); jQuery("#list8").jqGrid('footerData', 'set', { shades: 'Total:', rec_weight: sumOfPrice_rec_weight.toFixed(2) , balanced_mtrs: sumOfPrice_balanced_mtrs.toFixed(2) , variance_mtrs: sumOfPrice_var_mtrs.toFixed(2) }); }, }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list8").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list8").jqGrid('navGrid','#pager8', {edit:false,add:false,del:false,search:false,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true } ); }); <!----------------------------------VIJAYAPURA access controll -------------------------------> $(document).ready(function (){ jQuery("#list9").jqGrid({ url:"<?php echo base_url('new_stores/details_VIJAYAPURA_fetch1')?>", datatype: "json", colNames:['Id','Customer ID','Vendor Name / Factory','PO# / DTL No.','DTL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Recd Wt','Actual Quantity','Rejected Mtrs','Variance Mtrs','Recd Date','Location','Action','Preview','Edit'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'customer_id',index:'customer_id', width:50,editable:false,width:130}, {name:'vendor_name',index:'vendor_name', width:50,editable:false,width:70}, {name:'po_no',index:'po_no',edittype:'text',editable:true,editrules:{required: true}, width:70}, {name:'ssl_pc_no',index:'ssl_pc_no',editable:true, width:70}, {name:'splited_piece_no',index:'splited_piece_no',editable:true, width:120}, {name:'piece_no',index:'piece_no',editable:true, width:70}, {name:'product_name',index:'product_name', width:50,editable:false,width:70}, {name:'width',index:'width', width:50,editable:false,width:70}, {name:'design',index:'design', width:50,editable:false,width:70}, {name:'shades',index:'shades', width:50,editable:false,width:70}, {name:'rec_weight',index:'rec_weight',hidden:false,editable:true, width:70}, {name:'balanced_mtrs',index:'balanced_mtrs',hidden:false,editable:true, width:70}, {name:'rejected_mtrs',index:'rejected_mtrs',hidden:false,editable:true, width:70}, {name:'variance_mtrs',index:'variance_mtrs', editable:true,editrules:{required: true},width:70}, {name:'received_date',index:'received_date', editable:true,editrules:{required: true},width:70}, {name:'consumed_at',index:'consumed_at', editable:true,editrules:{required: true},width:70}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_split_model($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='SPLIT' onclick='some_function' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:90,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_preview($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='PREVIEW' onclick='some_function' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_edit($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='EDIT' onclick='some_function' \>"; }}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager9", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, caption:"Fabric Stock Details", footerrow: true, loadComplete: function () { var sumOfPrice_rec_weight = jQuery("#list9").jqGrid('getCol','rec_weight',false,'sum'); var sumOfPrice_balanced_mtrs = jQuery("#list9").jqGrid('getCol','balanced_mtrs',false,'sum'); var sumOfPrice_var_mtrs = jQuery("#list9").jqGrid('getCol','variance_mtrs',false,'sum'); //var s=sumOfPrice_rec_weight.toFixed(2); jQuery("#list9").jqGrid('footerData', 'set', { shades: 'Total:', rec_weight: sumOfPrice_rec_weight.toFixed(2) , balanced_mtrs: sumOfPrice_balanced_mtrs.toFixed(2) , variance_mtrs: sumOfPrice_var_mtrs.toFixed(2) }); }, }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list9").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list9").jqGrid('navGrid','#pager9', {edit:false,add:false,del:false,search:false,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true } ); }); <!----------------------------------DODDAJALA access controll -------------------------------> $(document).ready(function (){ jQuery("#list10").jqGrid({ url:"<?php echo base_url('new_stores/details_DODDAJALA_fetch1')?>", datatype: "json", colNames:['Id','Customer ID','Vendor Name / Factory','PO# / DTL No.','DTL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Recd Wt','Actual Quantity','Rejected Mtrs','Variance Mtrs','Recd Date','Location','Action','Preview','Edit'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'customer_id',index:'customer_id', width:50,editable:false,width:130}, {name:'vendor_name',index:'vendor_name', width:50,editable:false,width:70}, {name:'po_no',index:'po_no',edittype:'text',editable:true,editrules:{required: true}, width:70}, {name:'ssl_pc_no',index:'ssl_pc_no',editable:true, width:70}, {name:'splited_piece_no',index:'splited_piece_no',editable:true, width:120}, {name:'piece_no',index:'piece_no',editable:true, width:70}, {name:'product_name',index:'product_name', width:50,editable:false,width:70}, {name:'width',index:'width', width:50,editable:false,width:70}, {name:'design',index:'design', width:50,editable:false,width:70}, {name:'shades',index:'shades', width:50,editable:false,width:70}, {name:'rec_weight',index:'rec_weight',hidden:false,editable:true, width:70}, {name:'balanced_mtrs',index:'balanced_mtrs',hidden:false,editable:true, width:70}, {name:'rejected_mtrs',index:'rejected_mtrs',hidden:false,editable:true, width:70}, {name:'variance_mtrs',index:'variance_mtrs', editable:true,editrules:{required: true},width:70}, {name:'received_date',index:'received_date', editable:true,editrules:{required: true},width:70}, {name:'consumed_at',index:'consumed_at', editable:true,editrules:{required: true},width:70}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_split_model($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='SPLIT' onclick='some_function' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:70,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_preview($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='PREVIEW' onclick='some_function' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_edit($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='EDIT' onclick='some_function' \>"; }}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager10", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, caption:"Fabric Stock Details", footerrow: true, loadComplete: function () { var sumOfPrice_rec_weight = jQuery("#list10").jqGrid('getCol','rec_weight',false,'sum'); var sumOfPrice_balanced_mtrs = jQuery("#list10").jqGrid('getCol','balanced_mtrs',false,'sum'); var sumOfPrice_var_mtrs = jQuery("#list10").jqGrid('getCol','variance_mtrs',false,'sum'); //var s=sumOfPrice_rec_weight.toFixed(2); jQuery("#list10").jqGrid('footerData', 'set', { shades: 'Total:', rec_weight: sumOfPrice_rec_weight.toFixed(2) , balanced_mtrs: sumOfPrice_balanced_mtrs.toFixed(2) , variance_mtrs: sumOfPrice_var_mtrs.toFixed(2) }); }, }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list10").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list10").jqGrid('navGrid','#pager10', {edit:false,add:false,del:false,search:false,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true } ); }); <!----------------------------------------------------all location----------------------------------------> $(document).ready(function (){ jQuery("#list6").jqGrid({ url:"<?php echo base_url('new_stores/details_fetch1')?>", datatype: "json", colNames:['Id','Select','Customer ID','Vendor Name / Factory','PO# / DTL No.','DTL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Recd Wt','Actual Quantity','Rejected Mtrs','Variance Mtrs','Recd Date','Location','Action','Preview','Edit'], colModel:[ {name:'id',index:'id',hidden:false, width:50,editable:true,width:100}, { name: 'select', width:50,align: 'center',cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_radio_val($(this))" '; }, formatter: function radio(cellValue, option) { return '<input type="radio" name="radio_' + option.id + '" />'; } }, {name:'customer_id',index:'customer_id', width:50,editable:false,width:130}, {name:'vendor_name',index:'vendor_name', width:50,editable:false,width:130}, {name:'po_no',index:'po_no',edittype:'text',editable:true,editrules:{required: true}, width:120}, {name:'ssl_pc_no',index:'ssl_pc_no',editable:true, width:130}, {name:'splited_piece_no',index:'splited_piece_no',editable:true, width:120}, {name:'piece_no',index:'piece_no',editable:true, width:120}, {name:'product_name',index:'product_name', width:50,editable:false,width:130}, {name:'width',index:'width', width:50,editable:false,width:100}, {name:'design',index:'design', width:50,editable:false,width:100}, {name:'shades',index:'shades', width:50,editable:false,width:100}, {name:'rec_weight',index:'rec_weight',hidden:false,editable:true, width:100}, {name:'balanced_mtrs',index:'balanced_mtrs',hidden:false,editable:true, width:120}, {name:'rejected_mtrs',index:'rejected_mtrs',hidden:false,editable:true, width:120}, {name:'variance_mtrs',index:'variance_mtrs', editable:true,editrules:{required: true},width:120}, {name:'received_date',index:'received_date', editable:true,editrules:{required: true},width:120}, {name:'consumed_at',index:'consumed_at', editable:true,editrules:{required: true},width:120}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_split_model($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='SPLIT' onclick='some_function' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_preview($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='PREVIEW' onclick='some_function' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_edit($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='EDIT' onclick='some_function' \>"; }}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager6", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, caption:"Fabric Stock Details", //footerrow: true, footerrow: true, loadComplete: function () { var sumOfPrice_rec_weight = jQuery("#list6").jqGrid('getCol','rec_weight',false,'sum'); var sumOfPrice_balanced_mtrs = jQuery("#list6").jqGrid('getCol','balanced_mtrs',false,'sum'); var sumOfPrice_var_mtrs = jQuery("#list6").jqGrid('getCol','variance_mtrs',false,'sum'); //var s=sumOfPrice_rec_weight.toFixed(2); jQuery("#list6").jqGrid('footerData', 'set', { shades: 'Total:', rec_weight: sumOfPrice_rec_weight.toFixed(2) , balanced_mtrs: sumOfPrice_balanced_mtrs.toFixed(2) , variance_mtrs: sumOfPrice_var_mtrs.toFixed(2) }); }, }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list6").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list6").jqGrid('navGrid','#pager6', {edit:false,add:false,del:false,search:false,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true } ); }); function fun_preview(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#preview_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("stock_history_details/fabric_stock_preview"); ?>', data:{'id':as}, async:false, success:function() { //window.location.href = '<?php echo base_url('stock_history_details/fabric_stock_preview');?>/'+ '?id='+as; window.open( '<?php echo base_url('stock_history_details/fabric_stock_preview');?>/'+ '?id='+as, '_blank' // <- This is what makes it open in a new window. ); } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } function fun_split_model(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; $('#ref_id').val(as); $('#split_modal').modal('show'); } function fun_edit(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#edit_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("stock_history_details/fabric_stock_edit"); ?>', data:{'id':as}, async:false, success:function() { window.open( '<?php echo base_url('stock_history_details/fabric_stock_edit');?>/'+ '?id='+as, '_blank' // <- This is what makes it open in a new window. ); //window.location.href = '<?php echo base_url('stock_history_details/fabric_stock_edit');?>/'+ '?id='+as; } }); } else { swal({ title: "You Don't Have Access For This To Edit", text: "", }); } } <!------------------------------------kumara park----------------------------------> $(document).ready(function (){ jQuery("#list7").jqGrid({ url:"<?php echo base_url('new_stores/details_kumara_fetch1')?>", datatype: "json", colNames:['Id','Customer ID','Vendor Name / Factory','PO# / DTL No.','DTL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Recd Wt','Actual Quantity','Rejected Mtrs','Variance Mtrs','Recd Date','Location','Action','Preview','Edit'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:70}, {name:'customer_id',index:'customer_id', width:50,editable:false,width:130}, {name:'vendor_name',index:'vendor_name', width:50,editable:false,width:70}, {name:'po_no',index:'po_no',edittype:'text',editable:true,editrules:{required: true}, width:70}, {name:'ssl_pc_no',index:'ssl_pc_no',editable:true, width:80}, {name:'splited_piece_no',index:'splited_piece_no',editable:true, width:120}, {name:'piece_no',index:'piece_no',editable:true, width:60}, {name:'product_name',index:'product_name', width:50,editable:false,width:70}, {name:'width',index:'width', width:50,editable:false,width:60}, {name:'design',index:'design', width:50,editable:false,width:60}, {name:'shades',index:'shades', width:50,editable:false,width:70}, {name:'rec_weight',index:'rec_weight',hidden:false,editable:true, width:70}, {name:'balanced_mtrs',index:'balanced_mtrs',hidden:false,editable:true, width:70}, {name:'rejected_mtrs',index:'rejected_mtrs',hidden:false,editable:true, width:70}, {name:'variance_mtrs',index:'variance_mtrs', editable:true,editrules:{required: true},width:70}, {name:'received_date',index:'received_date', editable:true,editrules:{required: true},width:70}, {name:'consumed_at',index:'consumed_at', editable:true,editrules:{required: true},width:70}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_split_model($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='SPLIT' onclick='some_function' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:70,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_preview($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='PREVIEW' onclick='some_function' \>"; }}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_edit($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='EDIT' onclick='some_function' \>"; }}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager7", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, caption:"Fabric Stock Details", footerrow: true, loadComplete: function () { var sumOfPrice_rec_weight = jQuery("#list7").jqGrid('getCol','rec_weight',false,'sum'); var sumOfPrice_balanced_mtrs = jQuery("#list7").jqGrid('getCol','balanced_mtrs',false,'sum'); var sumOfPrice_var_mtrs = jQuery("#list7").jqGrid('getCol','variance_mtrs',false,'sum'); //var s=sumOfPrice_rec_weight.toFixed(2); jQuery("#list7").jqGrid('footerData', 'set', { shades: 'Total:', rec_weight: sumOfPrice_rec_weight.toFixed(2) , balanced_mtrs: sumOfPrice_balanced_mtrs.toFixed(2) , variance_mtrs: sumOfPrice_var_mtrs.toFixed(2) }); }, }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list7").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list7").jqGrid('navGrid','#pager7', {edit:false,add:false,del:false,search:false,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true } ); }); </script> <style> .preview { padding-bottom:3px !important; padding-top:3px !important; } </style> <link rel="stylesheet" href="<?php echo base_url('assets/css/code_jquery.min.css');?>"> <script src="<?php echo base_url('assets/js/jquery-ui.min.js'); ?>" type="text/javascript"></script> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/jquery-ui.min.css'); ?>" /> <script> $(document).ready(function() { $( "#customer" ).autocomplete({ source: '<?php echo base_url('request/auto_sea'); ?>', }); }); function searchname() { var customer = document.getElementById('customer').value; $.ajax({ url:"<?php echo base_url('request/search_by_fetch')?>", dataType: "json", data:{'customer':customer}, type:"POST", async:true, success:function(data) { // alert('hai'); var obj=JSON.parse(data); document.getElementById('customer_id').value=obj[0].customerID; } }); } </script> <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 type="text/javascript"> function goods_details_new() { var no_of_split =$('#no_of_split_new').val(); if(no_of_split <= 1){ swal({ title: "Split count sould be more than one..", text: "", }); $('#split_modal_new').modal('hide'); $('#no_of_split1').val(''); } else{ var ref_id =$('#ref_id1').val(); //alert(ref_id); $.ajax({ type:'post', url:'<?php echo base_url("stock_history_details/fabric_stock_split"); ?>', data:{'no_of_split':no_of_split,'ref_id':ref_id}, async:false, success:function(data) { var objData = jQuery.parseJSON(data); var split=objData.no_of_split; var val1=objData.getalldata; //alert(objData.getalldata.received_date); var content = ''; $('#dynamicTbody1').empty(); $('#dynamicTbody2').empty(); $('#table_ref_id1').val(ref_id); $('#table_split1').val(split); $('#rec_weightt1').val(val1.rec_weight); $('#rec_qty1').val(val1.balanced_mtrs); var weight=parseFloat(val1.rec_weight) / split; var qty=parseFloat(val1.balanced_mtrs) / split; var ww=parseFloat(weight.toFixed(2)); var qq=parseFloat(qty.toFixed(2)); for (var i = 1; i <= split; i++) { content += '<tr id="rowCount1" class="rowCount">'; content += '<td><input type="text" name="ourShade1[1]" id="" class="form-control" value="'+i+'" /></td>'; content += '<td style="width: 214px;"><input type="hidden" name="refe_ids1[]" class="form-control refe_ids1" value="'+val1.id+'" readonly/><input type="text" name="po[]" id="" class="form-control" value="'+val1.po_no+'" readonly/></td>'; content += '<td><input type="text" name="ssl_pc_no1[]" id="" class="form-control ssl_piece_number1" value="'+val1.ssl_pc_no+'/'+i+'" readonly/></td>'; content += '<td><input type="text" name="ourShade1[1]" id="" class="form-control" value="'+val1.piece_no+'" readonly/></td>'; content += '<td><input type="text" name="ourShade1[1]" id="" class="form-control" value="'+val1.product_name+'" readonly /></td>'; content += '<td><input type="text" name="ourShade1[1]" id="" class="form-control" value="'+val1.width+'" readonly/></td>'; content += '<td><input type="text" name="ourShade1[1]" id="" class="form-control" value="'+val1.design+'" readonly/></td>'; content += '<td><input type="text" name="ourShade1[1]" id="" class="form-control" value="'+val1.shades+'" readonly/></td>'; content += '<td><input type="text" name="cut_width1[]" id="" class="form-control cut_width1" value="" /></td>'; content += '<td><input type="text" name="wei1[]" id="" class="form-control rec_w1" onchange="myFunction()" value="'+ww+'" /></td>'; content += '<td><input type="text" name="qtty1[]" id="" class="form-control rec_q1" onchange="myFunction1()" value="'+qq+'" /></td>'; content += '</tr>'; i+1; } content += '<tr >'; content += '<td colspan="10" style="text-align: right;font-size: 14px;font-weight: bold;">'+'Total Received Weight : </td><td><p id = "total_r_weight">'+val1.rec_weight+'</p> '+'</td>'; content += '</tr>'; content += '<tr >'; content += '<td colspan="10" style="text-align: right;font-size: 14px;font-weight: bold;">'+'Total Actual Quantity : </td><td><p id = "total_b_mtrs">'+val1.balanced_mtrs+'</p> '+'<input type="hidden" value="'+val1.balanced_mtrs+'" class="actual_qty1"></td>'; content += '</tr>'; $('#split_modal_new').modal('hide'); $('#no_of_split1').val(''); $("#dynamicTbody2").html(content); content = ''; i = 1; content += '<tr id="rowCount1" class="rowCount">'; content += '<td>'+i+'</td>'; content += '<td style="width: 214px;">'+val1.po_no+'</td>'; content += '<td>'+val1.ssl_pc_no+'</td>'; content += '<td>'+val1.piece_no+'</td>'; content += '<td>'+val1.product_name+'</td>'; content += '<td>'+val1.width+'</td>'; content += '<td>'+val1.design+'</td>'; content += '<td>'+val1.shades+'</td>'; content += '<td>'+val1.rec_weight+'</td>'; content += '<td>'+val1.balanced_mtrs+'</td>'; content += '</tr>'; $("#dynamicTbody1").html(content); $('#content_modal_new').modal('show'); } }); } } function myFunction(){ var tott=0; $('.rec_w1').each(function () { var totss = $(this).val(); tott +=parseFloat(totss); }); $('#total_r_weight').text((tott.toFixed(2))); } function myFunction1(){ var tott=0; $('.rec_q1').each(function () { var totss = $(this).val(); tott +=parseFloat(totss); }); $('#total_b_mtrs').text((tott.toFixed(2))); } function goods_details() { var no_of_split =$('#no_of_split').val(); var ref_id =$('#ref_id').val(); //alert(ref_id); $.ajax({ type:'post', url:'<?php echo base_url("stock_history_details/fabric_stock_split"); ?>', data:{'no_of_split':no_of_split,'ref_id':ref_id}, async:false, success:function(data) { var objData = jQuery.parseJSON(data); var split=objData.no_of_split; var val1=objData.getalldata; //alert(objData.getalldata.received_date); var content = ''; $('#dynamicTbody').empty(); $('#table_ref_id').val(ref_id); $('#table_split').val(split); $('#rec_weightt').val(val1.rec_weight); $('#rec_qty').val(val1.balanced_mtrs); var weight=parseFloat(val1.rec_weight) / split; var qty=parseFloat(val1.balanced_mtrs) / split; var ww=parseFloat(weight.toFixed(2)); var qq=parseFloat(qty.toFixed(2)); for (var i = 1; i <= split; i++) { content += '<tr id="rowCount1" class="rowCount">'; content += '<td><input type="text" name="ourShade[1]" id="" class="form-control" value="'+i+'" /></td>'; content += '<td style="width: 214px;"><input type="hidden" name="refe_ids[]" class="form-control refe_ids" value="'+val1.id+'" readonly/><input type="text" name="po[]" id="" class="form-control" value="'+val1.po_no+'" readonly/></td>'; content += '<td><input type="text" name="ssl_pc_no[]" id="" class="form-control ssl_piece_number" value="'+val1.ssl_pc_no+'/'+i+'" readonly/></td>'; content += '<td><input type="text" name="ourShade[1]" id="" class="form-control" value="'+val1.piece_no+'" readonly/></td>'; content += '<td><input type="text" name="ourShade[1]" id="" class="form-control" value="'+val1.product_name+'" readonly /></td>'; content += '<td><input type="text" name="ourShade[1]" id="" class="form-control" value="'+val1.width+'" readonly/></td>'; content += '<td><input type="text" name="ourShade[1]" id="" class="form-control" value="'+val1.design+'" readonly/></td>'; content += '<td><input type="text" name="ourShade[1]" id="" class="form-control" value="'+val1.shades+'" readonly/></td>'; content += '<td><input type="text" name="wei[]" id="" class="form-control rec_w" value="'+ww+'" /></td>'; content += '<td><input type="text" name="qtty[]" id="" class="form-control rec_q" value="'+qq+'" /></td>'; content += '</tr>'; i+1; } content += '<tr >'; content += '<td colspan="13" style="text-align: right;font-size: 14px;font-weight: bold;">'+'Total Received Weight : '+val1.rec_weight+' '+'</td>'; content += '</tr>'; content += '<tr >'; content += '<td colspan="13" style="text-align: right;font-size: 14px;font-weight: bold;">'+'Total Actual Quantity : '+val1.balanced_mtrs+' '+'<input type="hidden" value="'+val1.balanced_mtrs+'" class="actual_qty"></td>'; content += '</tr>'; $('#split_modal').modal('hide'); $('#no_of_split').val(''); $("#dynamicTbody").html(content); $('#content_modal').modal('show'); } }); } </script> <link href="<?php echo base_url('assets/css/sweetalert2.min.css');?>" rel="stylesheet"/> <script src="<?php echo base_url('assets/js/sweetalert2.min.js');?>"></script> <link rel="stylesheet" href="<?php echo base_url('assets/css/code_jquery.min.css');?>"> <script src="<?php echo base_url('assets/js/jquery-ui.min.js'); ?>" type="text/javascript"></script> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/jquery-ui.min.css'); ?>" /> <script> r_ids=[]; rec_wt=[]; rec_qt=[]; ssl_pc=[]; cut_width=[]; function fun_preview2() { //var id = rowId.closest('tr').attr('id'); var as=$('#hhh_id').val(); var v=$('#preview_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("stock_history_details/fabric_stock_preview"); ?>', data:{'id':as}, async:false, success:function() { //window.location.href = '<?php echo base_url('stock_history_details/fabric_stock_preview');?>/'+ '?id='+as; window.open( '<?php echo base_url('stock_history_details/fabric_stock_preview');?>/'+ '?id='+as, '_blank' // <- This is what makes it open in a new window. ); } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } function edit() { //var id = rowId.closest('tr').attr('id'); var as=$('#hhh_id').val(); var v=$('#edit_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("stock_history_details/fabric_stock_edit"); ?>', data:{'id':as}, async:false, success:function() { window.open( '<?php echo base_url('stock_history_details/fabric_stock_edit');?>/'+ '?id='+as, '_blank' // <- This is what makes it open in a new window. ); //window.location.href = '<?php echo base_url('stock_history_details/fabric_stock_edit');?>/'+ '?id='+as; } }); } else { swal({ title: "You Don't Have Access For This To Edit", text: "", }); } } function fun_radio_val(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var m=$('#hhh_id').val(as); //var n=$('#ref_id').val(as); } function content_goods_details_merge() { po = []; piece_no = []; product_name = []; width = []; design = []; shades = []; //alert('hai'); r_ids.length=0; rec_wt.length=0; rec_qt.length=0; ssl_pc.length=0; cut_width.length=0; var rec_weight = $('#rec_weightt').val(); var rec_qty = $('#rec_qty').val(); var tot=0; $('.refe_ids3').each(function () { r_ids.push($(this).val()); }); $('.po3').each(function () { po.push($(this).val()); }); $('.ssl_piece_number3').each(function () { ssl_pc.push($(this).val()); }); $('.piece_no3').each(function () { piece_no.push($(this).val()); }); $('.product_name3').each(function () { product_name.push($(this).val()); }); $('.width3').each(function () { width.push($(this).val()); }); $('.design3').each(function () { design.push($(this).val()); }); $('.shades3').each(function () { shades.push($(this).val()); }); $('.rec_w3').each(function () { rec_wt.push($(this).val()); }); $('.rec_q3').each(function () { rec_qt.push($(this).val()); }); var table_ref_id=$('#table_ref_id2').val(); var table_split=$('#table_split2').val(); $.ajax({ type:'post', url:'<?php echo base_url("stock_history_details/insert_madeups_merge"); ?>', data:{'table_split':table_split,'r_ids':r_ids,'ssl_pc':ssl_pc,'table_ref_id':table_ref_id,'rec_wt':rec_wt,'rec_qt':rec_qt,'po':po,'piece_no':piece_no,'product_name':product_name,'width':width,'design':design,'shades':shades}, async:false, success:function(data) { $('#merge_model').modal('toggle'); $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list3").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list4").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list5").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list6").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list7").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list8").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list9").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list10").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } }); // } } function content_goods_details_new() { //alert('hai'); r_ids.length=0; rec_wt.length=0; rec_qt.length=0; ssl_pc.length=0; cut_width.length=0; var rec_weight = $('#rec_weightt').val(); var rec_qty = $('#rec_qty').val(); var tot=0; $('.rec_w').each(function () { var tots=$(this).val(); tot +=parseFloat(tots); }); var tott=0; $('.rec_q1').each(function () { var totss=$(this).val(); tott +=parseFloat(totss); }); $('.refe_ids1').each(function () { r_ids.push($(this).val()); }); $('.rec_w1').each(function () { rec_wt.push($(this).val()); }); $('.rec_q1').each(function () { rec_qt.push($(this).val()); }); $('.ssl_piece_number1').each(function () { ssl_pc.push($(this).val()); }); $('.cut_width1').each(function () { cut_width.push($(this).val()); }); var actual_qty=$('.actual_qty1').val(); var table_ref_id=$('#table_ref_id1').val(); var table_split=$('#table_split1').val(); $.ajax({ type:'post', url:'<?php echo base_url("stock_history_details/insert_madeups_split_data_cut_width"); ?>', data:{'cut_width':cut_width,'table_split':table_split,'ssl_pc':ssl_pc,'table_ref_id':table_ref_id,'r_ids':r_ids,'rec_wt':rec_wt,'rec_qt':rec_qt,'actual_qty':actual_qty}, async:false, success:function(data) { $('#content_modal_new').modal('toggle'); $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list3").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list4").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list5").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list6").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list7").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list8").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list9").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list10").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } }); // } } function content_goods_details() { //alert('hai'); r_ids.length=0; rec_wt.length=0; rec_qt.length=0; ssl_pc.length=0; var rec_weight = $('#rec_weightt').val(); var rec_qty = $('#rec_qty').val(); var tot=0; $('.rec_w').each(function () { var tots=$(this).val(); tot +=parseFloat(tots); //alert(tot); }); var tott=0; $('.rec_q').each(function () { var totss=$(this).val(); tott +=parseFloat(totss); //alert(tot); }); <!--------- UNCOMMENT -------------> // if(tot > rec_weight) // { // swal({ // title: "Received Weight Is Excceded", // text: "", // }); // } // else if(tott > rec_qty) // { // swal({ // title: "Received Quantity Is Excceded", // text: "", // }); // } <!--------- ALL COMMENT -------------> // else if(tot < rec_weight ) // { // swal({ // title: "Received Quantity Is Not Equal", // text: "", // }); // } // else if(tott < rec_qty) // { // swal({ // title: "Received Quantity Is Not Equal", // text: "", // }); // } // else // { $('.refe_ids').each(function () { r_ids.push($(this).val()); }); $('.rec_w').each(function () { rec_wt.push($(this).val()); }); $('.rec_q').each(function () { rec_qt.push($(this).val()); }); $('.ssl_piece_number').each(function () { ssl_pc.push($(this).val()); }); var actual_qty=$('.actual_qty').val(); var table_ref_id=$('#table_ref_id').val(); var table_split=$('#table_split').val(); $.ajax({ type:'post', url:'<?php echo base_url("stock_history_details/insert_madeups_split_data"); ?>', data:{'table_split':table_split,'ssl_pc':ssl_pc,'table_ref_id':table_ref_id,'r_ids':r_ids,'rec_wt':rec_wt,'rec_qt':rec_qt,'actual_qty':actual_qty}, async:false, success:function(data) { $('#content_modal').modal('toggle'); $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list3").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list4").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list5").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list6").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list7").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list8").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list9").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $("#list10").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } }); // } } </script> <style> #search_list2 { display:none !important; } #list2_122_t { height:0px !important; } list2_136_t { height:12px !important; } .scroll { height:12px !important; } .ui-jqgrid-btable { } .ui-common-table { height:12px !important; } #refresh_list2 { display:none !important; } #client_edit { padding-right:12px !important; } #list2 { width: 1050px; height: 0px !important; } #gbox_list2 { height: auto !important; } #gview_list2 { height: auto !important; } @media only screen and (min-width:320px) and (max-width:641px){ .ui-jqgrid { margin-left: 1px !important; } #jaytab{ margin-top: 0 !important; margin-left: 0 !important; overflow-x: scroll; width: 100% !important; padding-left: 0 !important; } #editmodlist2 { width:90% !important; } #sData span, #cData span { margin-left: 0 !important; } .h_radio { margin-left:10% !important; } } @media only screen and (min-width:641px) and (max-width:991px){ .ui-jqgrid { margin-left: 1px !important; } #jaytab{ margin-top: 0 !important; margin-left: 0 !important; overflow-x: scroll; width: 100% !important; padding-left:0 !important; padding-right:9px !important; } .h_radio { margin-left:4.3% !important; } } @media only screen and (min-width:992px) and (max-width:1258px){ #jaytab{ margin-top: 0 !important; margin-left: 0 !important; overflow-x: scroll; width: 100% !important; padding-left:0 !important; padding-right:9px !important; } .h_radio { margin-left:4.3% !important; } } #sData span, #cData span { margin-left: 3px; } #sData { height: 29px; } #cData { height: 29px; } .jqgfirstrow { height: 0px !important; } </style> <style> .modal-dialog { width: 90%; } .modal-content { padding:0 10px; } #list2 { width: 1300px !important; } #pager2 { width: 1300px !important; } #gbox_list2 { width: 1300px !important; } #gview_list2 { width: 1300px !important; } #list3 { width: 1300px !important; } #pager3 { width: 1300px !important; } #gbox_list3 { width: 1300px !important; } #gview_list3 { width: 1300px !important; } #list4 { width: 1300px !important; } #pager4 { width: 1300px !important; } #gbox_list4 { width: 1300px !important; } #gview_list4 { width: 1300px !important; } #list5 { width: 1300px !important; } #pager5 { width: 1300px !important; } #gbox_list5 { width: 1300px !important; } #gview_list5 { width: 1300px !important; } #list6 { width: 1300px !important; } #pager6 { width: 1300px !important; } #gbox_list6 { width: 1300px !important; } #gview_list6 { width: 1300px !important; } #list7 { width: 1300px !important; } #pager7 { width: 1300px !important; } #gbox_list7 { width: 1300px !important; } #gview_list7 { width: 1300px !important; } #list8 { width: 1300px !important; } #pager8 { width: 1300px !important; } #gbox_list8 { width: 1300px !important; } #gview_list8 { width: 1300px !important; } #list9 { width: 1300px !important; } #pager9 { width: 1300px !important; } #gbox_list9 { width: 1300px !important; } #gview_list9 { width: 1300px !important; } #list10 { width: 1300px !important; } #pager10 { width: 1300px !important; } #gbox_list10 { width: 1300px !important; } #gview_list10 { width: 1300px !important; } .ui-jqgrid-hdiv { width: 1300px !important; } .ui-jqgrid-htable { width: 1300px !important; } .ui-jqgrid-bdiv { width: 1300px !important; } </style>