EVOLUTION-NINJA
Edit File: fabric_stock.php
<style> .ui-jqgrid { text-transform: capitalize !important; } .tablediv { text-transform: uppercase !important; } .ui-jqgrid tr.jqgrow td{ text-transform: uppercase !important; } </style> <script> function planningtypes(str) { if(str=="all") { $('#table_all').show(); $('#table_all_with_zero').hide(); $('#table_ho').hide(); $('#table_peenya').hide(); $('#table_nandi').hide(); $('#table_tailoring').hide(); $('#table_park').hide(); $('#table_BYATRANPURA').hide(); $('#table_VIJAYAPURA').hide(); $('#table_DODDAJALA').hide(); } if(str=="all_with_zero") { $('#table_all_with_zero').show(); $('#table_all').hide(); $('#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_with_zero').hide(); $('#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_with_zero').hide(); $('#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_with_zero').hide(); $('#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_with_zero').hide(); $('#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_with_zero').hide(); $('#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_with_zero').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_with_zero').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_with_zero').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="https://swansilk.co/dashboard/dashboard_fun">Home</a> <i class="fa fa-angle-right"></i> <a href="#" > Fabric Stock Details </a></li> </ul> </div> <div class="row date_row"> <form action="<?php echo base_url('reports/fabric_stock_data'); ?>" method="post" class="form"> <div class="col-md-3"> <div class="form-group"> <label class="control-label col-md-4">From Date :</label> <div class="col-md-8"> <input type="text" class="form-control input-group openDatePicker from_delivery_date_required_on" name="from_delivery_date_required_on" id="from_delivery_date_required_on" data-provide="datepicker"> </div> </div> </div> <div class="col-md-3"> <div class="form-group"> <label class="control-label col-md-4">To Date :</label> <div class="col-md-8"> <input type="text" class="form-control input-group openDatePicker to_delivery_date_required_on" name="to_delivery_date_required_on" id="to_delivery_date_required_on" data-provide="datepicker"> </div> </div> </div> <div class="col-md-3"> <div class="form-group"> <label class="control-label col-md-4">Location :</label> <div class="col-md-8"> <select class="form-control" id="location" name="location"> <option value="all">ALL</option> <?php foreach($loc as $loc){ ?> <option value="<?php echo $loc->consumed_at; ?>"><?php echo $loc->consumed_at; ?></option> <?php } ?> </select> </div> </div> </div> <div class="col-md-3"> <input type="submit" id="" value="Submit" class="" style="margin-right: 22px;"/> </div> </form> </div> <!-- row -2--> <br/> <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> <label class="radio-inline"><input type="radio" name="optradio" id="planningorder" onclick="planningtypes('all_with_zero')" value="ho">ALL With Zero Weight </label> </div><br><br> <div class="col-sm-12 radio-list"> <input type="button" name="sequence" id="sequence" onclick="sequence_master()" value="Update Value" style="float: right; !important;margin-right:15px;"> </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; } ?>" > <div id="myModal" class="modal fade" role="dialog" style="color:#000;"> <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">Update Stock Details</h4> </div> <div class="modal-body"> <fieldset> <!-- Form Name --> <div class="portlet-body" id="portlet-body"> <div class="col-xs-4"> <label class="col-sm-4 col-xs-2" style="padding-right:0 !important;"><b>Search :</b> </label> <input type="text" id="search_warp" class="col-sm-6 col-xs-5" placeholder="Type to search"> </div> <div class="col-xs-4"> <label class="col-sm-4 col-xs-2" style="padding-right:0 !important;"><b>Update Value :</b> </label> <input type="text" name = "new_value" id="new_value" class="col-sm-6 col-xs-5"> </div> <div class="col-xs-4"> <label class="col-sm-4 col-xs-2" style="padding-right:0 !important;"><b>Update Date :</b> </label> <input type="text" name = "date_update" id="date_update" class="col-sm-6 col-xs-5"> </div> <br/><br/> <table class="table table-striped table-bordered table-hover" > <thead> <tr> <th> SI No </th> <th> vendor_name </th> <th> consumed_at </th> <th> piece_no </th> <th> product_name </th> <th> shades </th> <th> width </th> <th> rec_weight </th> <th> ssl_pc_no </th> <th> updated unit </th> <th> Value </th> <th> Recieve date </th> </tr> </thead> <tbody id="hidden_table"> </tbody> </table> </div> <div class="modal-footer"> <button id="submit_modal" name="submit" onclick="update_new_val()" class="btn btn-primary">Submit</button> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </fieldset> </div> </div> </div> </div> <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_all_with_zero" style="display:none;"> <div id = "jaytab" class="jaytab"> <table id="list61"></table> <div id="pager61"></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 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 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# / OSL #</b></td> <td ><b>SSL 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> <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> function sequence_master() { $("#myModal").modal('show'); } $(function(){ $(".from_delivery_date_required_on").datepicker({ dateFormat: 'dd-mm-yy', }).on('changeDate', function(ev){ $('.from_delivery_date_required_on').datepicker('hide'); }); }); $('.from_delivery_date_required_on').on('change', function(){ var date = $(this).val(); $('.to_delivery_date_required_on').datepicker({ dateFormat: 'dd-mm-yy', minDate: date, }); }); </script> <!-- 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; } #ui-datepicker-div { z-index: 1000 !important; } .date_row { padding-bottom: 3%; } </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# / OSL No.','SSL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Received Weight','Actual Quantity','Rejected Mtrs','Variance Mtrs','Unit Price','Received Date','Location'], 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:'unit',index:'unit', editable:true,editrules:{required: true},width:120}, {name:'received_date',index:'received_date',editable:false,editrules:{required: true}}, {name:'consumed_at',index:'consumed_at', editable:true,editrules:{required: true},width:120}, ], 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# / OSL No.','SSL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Received Weight','Actual Quantity','Rejected Mtrs','Variance Mtrs','Unit Price','Received Date','Location'], 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:'unit',index:'unit', 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:80}, ], 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# / OSL No.','SSL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Received Weight','Actual Quantity','Rejected Mtrs','Variance Mtrs','Unit Price','Received Date','Location'], 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:'unit',index:'unit', 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:80}, ], 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 (){ jQuery("#list5").jqGrid({ url:"<?php echo base_url('new_stores/details_tailoring_fetch1')?>", datatype: "json", colNames:['Id','Customer ID','Vendor Name / Factory','PO# / OSL No.','SSL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Received Weight','Actual Quantity','Rejected Mtrs','Variance Mtrs','Unit Price','Received Date','Location'], 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:'unit',index:'unit', 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:80}, ], 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, 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 } ); }); <!----------------------------------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# / OSL No.','SSL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Received Weight','Actual Quantity','Rejected Mtrs','Variance Mtrs','Unit Price','Received Date','Location'], 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:'unit',index:'unit', editable:true,editrules:{required: true},width:120}, {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}, ], 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# / OSL No.','SSL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Received Weight','Actual Quantity','Rejected Mtrs','Variance Mtrs','Unit Price','Received Date','Location'], 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:'unit',index:'unit', editable:true,editrules:{required: true},width:120}, {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}, ], 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# / OSL No.','SSL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Received Weight','Actual Quantity','Rejected Mtrs','Variance Mtrs','Unit Price','Received Date','Location'], 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:'unit',index:'unit', editable:true,editrules:{required: true},width:120}, {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}, ], 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 (){ var flag = 0; var url_val = ''; var ll; var currids =[]; if(flag == 0){ url_val = "<?php echo base_url('new_stores/details_fetch1')?>"; } else{ url_val = "<?php echo base_url('new_stores/details_fetch_with_zero')?>"; } jQuery("#list6").jqGrid({ url:"<?php echo base_url('new_stores/details_fetch1')?>", datatype: "json", colNames:['','Id','Customer ID','Vendor Name / Factory','PO# / OSL No.','SSL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Received Weight','Actual Quantity','Updated Rate','Val','Rejected Mtrs','Variance Mtrs','Unit Price','Received Date','Location'], colModel:[ {name:'myac', width:50, fixed:true, sortable:false, search:false,resize:false, formatter:'actions', formatoptions:{keys:true,delbutton:false}}, {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:false,editrules:{required: true}, width:120}, {name:'ssl_pc_no',index:'ssl_pc_no',editable:false, width:130}, {name:'splited_piece_no',index:'splited_piece_no',editable:false, width:120}, {name:'piece_no',index:'piece_no',editable:false, 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:true,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:'updated_unit',index:'updated_unit', width:120,editable:true}, {name:'val',index:'val', width:120,editable:false,align: 'center',formatter: 'number', formatoptions: { decimalSeparator: ".", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0.0000' }}, {name:'rejected_mtrs',index:'rejected_mtrs',hidden:false,editable:true, width:120}, {name:'variance_mtrs',index:'variance_mtrs', editable:false,editrules:{required: true},width:120}, {name:'unit',index:'unit', editable:false,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:false,editrules:{required: true},width:120}, ], 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, multiselect: true, autowidth: true, sortorder:"asc", loadonce:true, onSelectRow: function(id) { if(id && id !== ll) { jQuery('#list6').jqGrid('restoreRow',ll); jQuery('#list6').jqGrid('editRow',id,true); ll=id; var id=jQuery("#list6").jqGrid('getGridParam','selrow'); currids.push(id); var result = []; $.each(currids, function(i, e) { if ($.inArray(e, result) == -1) result.push(e); }); changefunction(result); } }, onSelectAll:function(ids) { changefunction(ids); }, editurl: "<?php echo site_url('out_source/update_faric_data');?>", caption:"Fabric Stock Details All", //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 sumOfval = jQuery("#list6").jqGrid('getCol','val',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),val:sumOfval.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 } ); }); $(document).ready(function (){ jQuery("#list61").jqGrid({ url:"<?php echo base_url('new_stores/details_fetch_with_zero')?>", datatype: "json", colNames:['','Id','Customer ID','Vendor Name / Factory','PO# / OSL No.','SSL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Received Weight','Actual Quantity','Updated Rate','Val','Rejected Mtrs','Variance Mtrs','Unit Price','Received Date','Location'], colModel:[ {name:'myac', width:50, fixed:true, sortable:false, search:false,resize:false, formatter:'actions', formatoptions:{keys:true,delbutton:false}}, {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:false,editrules:{required: true}, width:120}, {name:'ssl_pc_no',index:'ssl_pc_no',editable:false, width:130}, {name:'splited_piece_no',index:'splited_piece_no',editable:false, width:120}, {name:'piece_no',index:'piece_no',editable:false, 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:true,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:'updated_unit',index:'updated_unit', width:120,editable:true}, {name:'val',index:'val', width:120,editable:false,align: 'center',formatter: 'number', formatoptions: { decimalSeparator: ".", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0.0000' }}, {name:'rejected_mtrs',index:'rejected_mtrs',hidden:false,editable:true, width:120}, {name:'variance_mtrs',index:'variance_mtrs', editable:false,editrules:{required: true},width:120}, {name:'unit',index:'unit', editable:false,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:false,editrules:{required: true},width:120}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager61", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, editurl: "<?php echo site_url('out_source/update_faric_data');?>", caption:"Fabric Stock Details All With Zero", //footerrow: true, footerrow: true, loadComplete: function () { var sumOfPrice_rec_weight = jQuery("#list61").jqGrid('getCol','rec_weight',false,'sum'); var sumOfPrice_balanced_mtrs = jQuery("#list61").jqGrid('getCol','balanced_mtrs',false,'sum'); var sumOfPrice_var_mtrs = jQuery("#list61").jqGrid('getCol','variance_mtrs',false,'sum'); var sumOfval = jQuery("#list61").jqGrid('getCol','val',false,'sum'); //var s=sumOfPrice_rec_weight.toFixed(2); jQuery("#list61").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),val:sumOfval.toFixed(2) }); }, }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list61").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list61").jqGrid('navGrid','#pager61', {edit:false,add:false,del:false,search:false,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true } ); }); $(document).ready(function() { var user=$("#edit_row_id").val(); if(user > 2) { $("#list6").hideCol("myac"); } }); 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; } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } 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.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 changefunction(cellValues1) { //alert(cellValues1); $.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 update_new_val() { s_ids=[]; indent_goods_id =[]; $('.indent_id').each(function () { s_ids.push($(this).val()); }); $('.indent_goods_id').each(function () { indent_goods_id.push($(this).val()); }); var value = $('#new_value').val(); var date_update = $('#date_update').val(); $.ajax({ type:'post', url:'<?php echo base_url("out_source/update_fabric_val"); ?>', data:{'indent_id':s_ids,'val':value,'indent_goods_id':indent_goods_id,'date_update':date_update}, async:false, success:function(data) { $('#myModal').modal('toggle'); location.reload(true); //$("#list3").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } }); } function fun_split_model(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; $('#ref_id').val(as); $('#split_modal').modal('show'); } <!------------------------------------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# / OSL No.','SSL Piece No','Splited Piece#','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Received Weight','Actual Quantity','Rejected Mtrs','Variance Mtrs','Unit Price','Received Date','Location'], 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:'unit',index:'unit', 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}, ], 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> .modal-dialog { width: 90%; } .modal-content { padding:0 10px; } .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() { 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+' '+'</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=[]; function content_goods_details() { //alert('hai'); r_ids.length=0; rec_wt.length=0; rec_qt.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 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}, 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>