EVOLUTION-NINJA
Edit File: fabric_inspection_history.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"> Fabric Inspected History 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="#" > Fabric Inspected History </a></li> </ul> </div> <input type="submit" id="generate_submit" value="Submit" class="generate_submit" style="float: right; !important;margin-right: 22px;"/> <form action="<?php echo base_url('new_stores/fabric_piece_card'); ?>" method="post" class="form"> <input type="hidden" id="checked_ids" name="checked_ids" class="checked_ids"> </form> <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> </div> <!-- End BEGIN CONTAINER --> <!-- BEGIN FOOTER --> <!-- 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> <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; 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> <!----------------------------------access controll -------------------------------> $(document).ready(function (){ //var l=$("#loc").val(); var ll; jQuery("#list2").jqGrid({ url:"<?php echo base_url('new_stores/details_fetch_sys_date')?>", datatype: "json", colNames:['Id','Select','Customer ID','Vendor Name / Factory','PO# / OSL No.','DTL Piece No','Supplier Piece No','Article(PRODUCT)','Width','Design','Shade','Rec Mtr','Rec Wt','Inspt Mtrs','Reject Mtrs','Vari Mtrs','Rec Date','Created By','QC'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:50,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='checkbox' id='check' class='check' value='SELECT' \>"; }}, {name:'customer_id',index:'customer_id', width:50,editable:false,width:100}, {name:'vendor_name',index:'vendor_name', width:50,editable:false,width:100}, // {name:'po_no',index:'po_no',edittype:'text',editable:false,editrules:{required: true}, width:100,key: true, // searchoptions: { // sopt: ["eq","ge","le"] // }}, {name:'po_no',index:'po_no',edittype:'text',editable:false,editrules:{required: true}, width:100}, {name:'ssl_pc_no',index:'ssl_pc_no',editable:false, width:100}, {name:'piece_no',index:'piece_no',editable:false, width:100}, {name:'product_name',index:'product_name', width:50,editable:false,width:100}, {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_goods',index:'rec_goods',edittype:'text',editable:false,editrules:{required: true}, width:100}, {name:'rec_weight',index:'rec_weight',edittype:'text',editable:false,editrules:{required: true}, width:100}, {name:'inspected_mtrs',index:'inspected_mtrs', width:170,editable:false,editrules:{required: true},formatter: 'number', formatoptions: { decimalSeparator: ".", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0.0000' },}, {name:'rejected_mtrs',index:'rejected_mtrs', editable:false,editrules:{required: true},width:170,formatter: 'number', formatoptions: { decimalSeparator: ".", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0.0000' },}, {name:'variance_mtrs',index:'variance_mtrs', editable:false,editrules:{required: true},width:170,formatter: 'number', formatoptions: { decimalSeparator: ".", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0.0000' },}, {name:'sys_date',index:'sys_date',edittype:'text',editable:false,editrules:{required: true}, width:100}, {name:'created_by',index:'created_by',edittype:'text',editable:false,editrules:{required: true}, width:100}, {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: 200000000, 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, gridview: true, onSelectRow: function(id){ if(id && id!==ll){ jQuery('#list2').jqGrid('restoreRow',ll); jQuery('#list2').jqGrid('editRow',id,true);ll=id; } }, editurl: "<?php echo base_url('new_stores/edit_received_goods_details');?>", caption:"Fabric Inspected History Details", footerrow: true, loadComplete: function () { var sumOfPrice_rec_weight = jQuery("#list2").jqGrid('getCol','rec_weight',false,'sum'); var sumOfPrice_rec_mtrs = jQuery("#list2").jqGrid('getCol','rec_goods',false,'sum'); var sumOfPrice_insp_mtrs = jQuery("#list2").jqGrid('getCol','inspected_mtrs',false,'sum'); var sumOfPrice_var_mtrs = jQuery("#list2").jqGrid('getCol','variance_mtrs',false,'sum'); jQuery("#list2").jqGrid('footerData', 'set', { shades: 'Total:', rec_goods: sumOfPrice_rec_mtrs.toFixed(2) , rec_weight: sumOfPrice_rec_weight.toFixed(2) , inspected_mtrs: sumOfPrice_insp_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" }); }); </script> <script> $("#generate_submit").on('click', function () { var id=''; $("input[type=checkbox]:checked").each(function() { id += $(this).closest('tr').attr('id') + "|"; }); //alert(); $(".checked_ids").val(''); $(".checked_ids").val(id); $(".form").submit(); }); 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_history');?>/'+ '?id='+as; } }); // } // else // { // swal({ // title: "You Don't Have Access For This Preview", // text: "", // }); // } } </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> <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>