EVOLUTION-NINJA
Edit File: consumable_spares_location.php
<?php //include("menu.php"); error_reporting(E_ALL); ?> <?php //include("menu.php"); ?> <style> #jaytab { overflow-x: inherit !important; } </style><!-- BEGIN CONTENT --> <div class="page-content-wrapper"> <div class="page-content"> <h3 class="page-title"> Consumables and Spares Details </h3> <span class="close-right" ><a href="<?php echo base_url('stock_history_details/cs_stock_details');?>" style="font-size: 18px;border: 1px solid;padding-left: 15px;padding-right: 15px;background: rgb(72,91,127);color: white;padding-bottom: 5px;text-decoration:none;">Back</a></span> <br><br> <!-- BEGIN PAGE HEADER--> <input type="hidden" id="yarn_type" class="yarn_type" name="yarn_type" value="<?php echo $yarn_type; ?>"> <input type="hidden" id="location" class="location" name="location" value="<?php echo $location; ?>"> <input type="hidden" id="preview_id" class="preview_id" name="preview_id" value="<?php echo $preview_id; ?>"> <!-- ----------------------------Consumables------------------------------------- --> <div id="table_consumables"> <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> </div> <style> .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 !important; } .ui-jqdialog .ui-jqdialog-titlebar-close span { display: block; margin: -9px !important; } #sData { height: 27px; } #cData { height: 27px; } #dData { height: 27px; } #eData { height: 27px; } </style> <!-----------------datepicker-------------> <!-- The link to the CSS that the grid needs --> <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'); ?>" /> <style type="text/css"> #search_list6 { display:none !important; } #refresh_list6 { display:none !important; } #search_list7 { display:none !important; } #refresh_list7 { display:none !important; } #jaytab { overflow-x: none !important; } </style> <style> </style> <!-----------------datepicker-------------> <!-- The link to the CSS that the grid needs --> <script> $(document).ready(function (){ var as=$("#location").val(); var yarn_type=$("#yarn_type").val(); //alert(l); jQuery("#list6").jqGrid({ url:"<?php echo base_url('vendor/outsource_cs_location');?>/"+ '?id='+as+"/"+yarn_type+"/",page:1, //url:'<?php echo base_url('vendor/outsource_cs_location');?>/'+ '?id='+as+'/'+yarn_type; datatype: "json", colNames:['Id','PO No','Product','Indent No#','Department','Quantity','Total Quantity','Location','Preview'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'po_no',index:'po_no', width:200,editable:false}, {name:'product_name',index:'product_name', editable:true,editrules:{required: true},width:200}, {name:'indent_no',index:'indent_no', editable:true,editrules:{required: true},width:200}, {name:'department',index:'department', editable:true,editrules:{required: true},width:200}, {name:'quantity',index:'quantity', width:200,editable:true,editrules:{required: true}}, {name:'total_quantity',index:'total_quantity', width:200,editable:true,editrules:{required: true}}, {name:'consumed_at',index:'received_date', width:142,editable:true,editrules:{required: true}}, {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' \>"; }}, ], height: 'auto', rowNum:50, rowTotal: 20000000000000000000000000, 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:"Stock Details", footerrow: true, loadComplete: function () { var sumOfPrice_total_quantity = jQuery("#list6").jqGrid('getCol','total_quantity',false,'sum'); jQuery("#list6").jqGrid('footerData', 'set', { quantity: 'Total:', total_quantity: sumOfPrice_total_quantity.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:true,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true, multipleGroup:true, caption:"search" } ); $("#list6").navButtonAdd('#pager6', { caption:"Delete", buttonicon:"ui-icon-trash", onClickButton: deleteRow, position: "last", title:"", cursor: "pointer", id:"client_delete" } ); }); function fun_preview(rowId) { var id = rowId.closest('tr').attr('id'); //alert(id); var as=id; var v=$('#preview_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("stock_history_details/cs_stock_preview"); ?>', data:{'id':as}, async:false, success:function() { window.location.href = '<?php echo base_url('stock_history_details/cs_stock_preview');?>/'+ '?id='+as; } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } </script> <style> #list2_122_t { height:0px !important; } list2_136_t { height:12px !important; } .scroll { height:12px !important; } .ui-jqgrid-btable { } .tablediv { text-transform: uppercase !important; } .ui-jqgrid tr.jqgrow td{ text-transform: uppercase !important; } .ui-common-table { height:12px !important; } #refresh_list2 { display:none !important; } #client_edit { padding-right:18px !important; } #list2 { width: 1050px; height: 0px !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; width: 100% !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; width: 100% !important; padding-left:0 !important; padding-right:9px !important; } } </style> <style> .radio-list { margin-left: 2% !important; } @media only screen and (min-width:320px) and (min-height:640px){ #gbox_list6{ width:1052px !important; } #gview_list6{ width:100% !important; } .ui-jqgrid-hdiv{ width:100% !important; } .ui-jqgrid-htable{ width:100% !important; } #list6{ width:100% !important; } .radio-list { margin-left: 5% !important; } } </style>