EVOLUTION-NINJA
Edit File: twisting_pending.php
<style> .ui-jqgrid { text-transform: capitalize !important; } .tablediv { text-transform: uppercase !important; } .ui-jqgrid tr.jqgrow td{ text-transform: uppercase !important; } </style> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <h3 class="page-title"> Pending Twisting Delivery Details </h3> <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="#" > Twisting </a></li> </ul> </div> <!--<form action="<?php echo base_url(); ?>out_source/work_order" method="post" class="form-horizontal"> <b>To insert data click here:</b> <input type="submit" name="Insert" value="Insert" /><br><br> </form>--> <!--<div class="radio-list" style="margin-left: 2%;"> <label class="radio-inline"> <input type="radio" checked="checked" name="planningorder" id="planningorder" onclick="planningtypes('indent_pending')" /> Pending Indent </label> <label class="radio-inline"> <input type="radio" name="planningorder" id="planningorder" onclick="planningtypes('approved_indent')" /> Approved Indent</label> </div><br>--> <input type="hidden" value="<?php echo $ref; ?>" id="ref_id" > <input type="hidden" value="<?php echo $url_val; ?>" id="url_ref" style="width: 230px;" > <input type="hidden" id="edit_id" class="edit_id" value="<?php echo $user_type_id; ?>" > <div id="myModall" class="modal fade" role="dialog" style="color:#000;"> <div class="modal-dialog" style="width:80%" > <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Weaving Fabric Details</h4> </div> <div class="modal-body"> <fieldset> <div > <input type="hidden" id="row_id" name="row_id" > <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Status :</label> <div class="col-md-9 "> <select name="statuss" id="statuss" class="form-control statuss"> <option value="Select">Select</option> <option value="NOT YET">NOT YET</option> <option value="PARTLY">PARTLY</option> <option value="COMPLETED">COMPLETED</option> </select> </div> </div> </div><br/> </div> <br/> <button id="generate" class="btn btn-primary generate" value="Generate" style="margin-left:40% !important;" data-dismiss="modal" onclick="update_tb()">Submit</button> </div> </div> </div> </div> </div> <input type="hidden" id="preview_id" class="preview_id" value="<?php if(empty($access_row)) { } else { echo $access_row->preview_id; } ?>" > <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 id="table_approved_indent"> <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> </div> </div> <!-- End BEGIN CONTAINER --> <!-- BEGIN FOOTER --> <script src="<?php echo base_url(); ?>assets/js/sweetalert.min.js" type="text/javascript"></script> <link href="<?php echo base_url(); ?>assets/css/sweetalert.min.css" rel="stylesheet" type="text/css" > <!-- The link to the CSS that the grid needs --> <!-- 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; } @media only screen and (min-width:320px) and (max-width:640px) { } </style> <!-----------------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; padding-right: 22px !important; padding-left: 23px !important; margin-top: 4px !important; color:bold !important; } .ui-jqgrid .ui-jqgrid-bdiv { overflow:hidden; } </style> <!-----------------datepicker-------------> <!-- The link to the CSS that the grid needs --> <script> $(document).ready(function (){ var l=$("#ref_id").val(); jQuery("#list2").jqGrid({ url:"<?php echo base_url('quality_check/deliveryconfirmation_grid_details')?>/s"+l+"/", datatype: "json", colNames:['Id','Work Order','WO Date','Vendor Name','Issue Total NT WT','Yarn Name','Rec Total NT WT','Variance','Variance%','Delivery Date','Status','Preview','PC'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'work_order_no',index:'work_order_no', width:220,editable:false}, {name:'date',index:'date', editable:true,editrules:{required: true},width:150}, {name:'vendor_name',index:'vendor_name', width:200,editable:true,editrules:{required: true}}, {name:'quty_kgs',index:'quty_kgs', editable:true,editrules:{required: true},width:170,formatter: 'number', formatoptions: { decimalSeparator: ".", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0.0000' }}, {name:'yarn_name',index:'yarn_name', width:200,editable:true,editrules:{required: true}}, {name:'net',index:'net', editable:true,editrules:{required: true},width:170,formatter: 'number', formatoptions: { decimalSeparator: ".", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0.0000' }}, {name:'variance',index:'variance', editable:true,editrules:{required: true},width:150,formatter: 'number', formatoptions: { decimalSeparator: ".", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0.0000' }}, {name:'variencess',index:'variencess', editable:true,editrules:{required: true},width:150,formatter: 'number', formatoptions: { decimalSeparator: ".", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0.0000' }}, {name:'delivery_date',index:'delivery_date', editable:true,editrules:{required: true},width:180,formatter: 'number', formatoptions: { decimalSeparator: ".", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0.0000' }}, {name:'quantity_approval',index:'quantity_approval', editable:true,editrules:{required: true},width:240,formatter: 'text', editoptions: { value: '1:0' }, formatoptions: { disabled: false }, cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="update_status('+rawObject.id+')" '; }}, {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:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_twisting_pc($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' class='fa fa-eye' value='PC' onclick='some_function' classes='preview' \>"; }} ], height: 'auto', rowNum:50, rowTotal: 20000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager2", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", caption:"Delivery Confirmation Details", footerrow: true, loadComplete: function () { var sumOfqnty = jQuery("#list2").jqGrid('getCol','quty_kgs',false,'sum'); sumOfqnty = sumOfqnty.toFixed(2); var sumOfvalue = jQuery("#list2").jqGrid('getCol','net',false,'sum'); sumOfvalue = sumOfvalue.toFixed(2); jQuery("#list2").jqGrid('footerData', 'set', { vendor_name: 'Total:', quty_kgs: sumOfqnty, net:sumOfvalue}); }, // subGrid: true, }); //$("#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 } ); }); function fun_twisting_pc(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; $.ajax({ type:'post', url:'<?php echo base_url("out_source/twisting_pc"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); window.location.href = '<?php echo base_url('out_source/twisting_pc');?>/'+ '?id='+as; } }); } function delsub(rowId) { var id = rowId.closest('tr').attr('id'); //alert(id); if( id != null ) $.ajax({ url:"<?php echo base_url('vendor/sub_yarn_twist_details_delete');?>", type:"POST", data:{'id':id}, async:false, success:function(data){ if(data==""){ alert('Successfully Deleted'); $("#delmodlist2").remove(); $("#list2").trigger("reloadGrid"); window.location.reload(); } else{ alert('Successfully Deleted'); $("#delmodlist2").remove(); $("#list2").trigger("reloadGrid"); // window.location.reload(); } } }); else $( "#dialogSelectRow" ).dialog(); } 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("out_source/outsource_twisting_preview"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); if(url_r == '1') { window.open ('<?php echo base_url('out_source/outsource_twisting_preview');?>/'+ '?id='+as); } else if(url_r == '2') { window.open('<?php echo base_url('out_source/wo_outsource_twisting_preview');?>/'+ '?id='+as); } else if(url_r == '3') { window.open('<?php echo base_url('out_source/outsource_wo_twisting_preview');?>/'+ '?id='+as); } else if(url_r == '4') { window.open ('<?php echo base_url('out_source/outsource_wo_twisting_view');?>/'+ '?id='+as); } } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } function update_status(key) { // var as = rowId.closest('tr').attr('id'); var as = key; // var dd= document.querySelector('statuss'); // var stat=dd.setAttribute("id", dd+as); var hh=$('.statuss').each(function() { $(this).attr("id", $(this).attr("id") + as); }); console.log(hh[0]); // alert(hh[0]); var v=$('#edit_id').val(); if(v == 1 || v == 2) { $('#row_id').val(as); $('#myModall').modal('show'); } else { swal({ title: "You Don't Have Access For This Edit", text: "", }); } } function update_tb(){ var id=$('#row_id').val(); // alert(id); var status=$("#statuss"+id).val(); // alert(status); // return; $.ajax({ url:"<?php echo base_url('quality_check/stat_updattwist')?>", type:"POST", data:{'id':id,'status':status}, async:false, success:function(data){ alert('Successfully Updated.'); //$("#editmodlist2").remove(); window.location.reload(); } }); } </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'); ?>" /> <style> .preview { padding-bottom:3px !important; padding-top:3px !important; } .preview { padding-bottom:3px !important; padding-top:3px !important; } .tablediv { width: auto !important; // overflow: scroll !important; } .ui-jqgrid .ui-jqgrid-btable tbody tr.jqgrow td { overflow: hidden; white-space: pre; } #jaytab{ width:100% !important; overflow-x:scroll !important; } #jaytab1{ width:100% !important; overflow-x:scroll !important; } .tablediv { overflow-x:scroll !important; } #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; } .radio-list { margin-left:7% !important; } #table_pending_indent{ //overflow-x: scroll; } #jaytab{ margin-top: 0 !important; margin-left: 0 !important; //overflow-x: scroll; //width: 600px !important; padding-left: 0 !important; } #jaytab1 { margin-top: 0 !important; margin-left: 0 !important; //overflow-x: scroll; //width: 300px !important; padding-left: 0 !important; } #editmodlist2 { //width:90% !important; } #sData span, #cData span { margin-left: 0 !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; } } #sData span, #cData span { margin-left: 3px; } #sData { height: 29px; } #cData { height: 29px; } .jqgfirstrow { height: 0px !important; } .preview { padding-bottom:3px !important; padding-top:3px !important; } .preview { padding-bottom:3px !important; padding-top:3px !important; } .tablediv { width: auto !important; // overflow: scroll !important; } .ui-jqgrid .ui-jqgrid-btable tbody tr.jqgrow td { overflow: hidden; white-space: pre; } </style>