EVOLUTION-NINJA
Edit File: weaving_fabric_stock.php
<style> .ui-jqgrid { text-transform: capitalize !important; } .tablediv { text-transform: uppercase !important; } .ui-jqgrid tr.jqgrow td{ text-transform: uppercase !important; } #more { display:none; } </style> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <h3 class="page-title"> Weaving Fabric Stock History </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="http://deco-textil.com/dashboard">Home</a> <i class="fa fa-angle-right"></i> <a href="#" > Weaving Fabric Stock History </a></li> </ul> </div> <input type="submit" id="less" value="View" onclick="show();" /> <input type="submit" id="more" value="View" onclick="hide();" /> <div class="table-responsive"> <div id="jaytab" class="jaytab table-responsive"> <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 --> <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 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" > <!-- BEGIN FOOTER --> <script> $("#less").click(function() { $("#more").show(); $("#less").hide(); }); </script> <script> $("#more").click(function() { $("#less").show(); $("#more").hide(); }); </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> <!---------------------------compelte indent -----------------------------------------> $(document).ready(function (){ var ll; $('#more').hide(); jQuery("#list2").jqGrid({ url:"<?php echo base_url('vendor/history_weaving_fabric_grid_details')?>", datatype: "json", colNames:['Id','Customer ID','Delivery Date','Party Order #','OSL','Article','Width','Reed','Reed Width','PPC','Quality','Design','SSL Shade','Warp Planned Mtr','Weft Planned Mtr','Weaving Factory','Finished Weight Per Mtr','Piece Length','Ordered Qty','Units','Received Mtrs','Balanced Mtrs','Status'], colModel:[ {name:'id',index:'id',hidden:true, editable:true,width:70}, {name:'fileNo',index:'fileNo', width:110,editable:false}, {name:'delivery_date', index:'delivery_date', align:'center',editable:true, width:90,formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'d-m-Y'}}, {name:'orderNo',index:'orderNo', width:110,editable:false}, {name:'osl_no',index:'osl_no', width:110,editable:false}, {name:'article',index:'article', width:70,editable:false,editrules:{required: true}}, {name:'selWidth',index:'selWidth', editable:false,editrules:{required: true},width:70}, {name:'reed',index:'reed',editable:false,width:45}, {name:'reed_width',index:'reed_width',hidden:true, width:60,editable:false}, {name:'ppc',index:'ppc', width:45,editable:false,hidden:true,editrules:{required: true}}, {name:'quality',index:'quality', editable:false,editrules:{required: true},width:160}, {name:'design',index:'design', editable:false,width:90}, {name:'sslShade',index:'sslShade', width:80,editable:false}, {name:'warp_pland_mtr',index:'warp_pland_mtr', width:60,editable:false}, {name:'weft_pland_mtr',index:'weft_pland_mtr', width:60,editable:false}, {name:'weaving_factory',index:'weaving_factory',hidden:true, editable:false,width:70}, {name:'finished_weight',index:'finished_weight',hidden:true, width:70,editable:false,editrules:{required: true}}, {name:'piece_length',index:'piece_length', editable:false,editrules:{required: true},width:70}, {name:'ordered_mtrs',index:'ordered_mtrs', width:70,editable:false}, {name:'unit',index:'unit', width:70,editable:false}, {name:'total_quantity',index:'total_quantity', width:80,editable:true,editrules:{required: true}}, {name:'balanced_quantity',index:'balanced_quantity', width:80,editable:true,editrules:{required: true}}, {name:'fabric_details',index:'fabric_details', width:80,editable:true,editrules:{required: true}}, // {name:'status', index:'status', width:100, align:'center', sortable:false,editable:true, edittype:'select',formatter: 'select',editoptions:{value:{'Waiting for Yarn' :' Waiting for Yarn','Received Yarn' :'Received Yarn','Winding & Warping' :'Winding & Warping','Weaving' :'Weaving','Completed' :'Completed', // } } }, ], 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, 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('out_source/edit_tentative_goods_details');?>", autowidth: true, sortorder:"asc", loadonce:true, caption:"Weaving Fabric Stock Details", subGrid: true, subGridRowExpanded: function(subgrid_id, row_id) { var subgrid_table_id; //alert(row_id); swan_id=row_id; //alert(swan_id); subgrid_table_id = subgrid_id+"_t"; jQuery("#"+subgrid_id).html("<table id='"+subgrid_table_id+"' class='scroll'></table>"); jQuery("#"+subgrid_table_id).jqGrid({ url:"<?php echo base_url('out_source/weaving_subgrid');?>/s"+row_id+"/", //data:{'sub_id':123}, mtype : "get", datatype: "json", colNames:['Id','Article','Finished Weight','Weaving Factory','Ordered Mtrs','Received Mtrs','Received Date','Location','Piece No.','Invoice/DC No.','Received By'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'article',index:'article', width:120,editable:true,editrules:{required: true}}, {name:'finished_weight',index:'finished_weight', width:140,editable:true,editrules:{required: true}}, {name:'factory',index:'factory', width:140,editable:true,editrules:{required: true}}, {name:'ordered_mtrs',index:'ordered_mtrs', editable:true,editrules:{required: true},width:110}, {name:'received_mtrs',index:'received_mtrs', editable:true,editrules:{required: true},width:100}, {name:'rec_date', index:'rec_date', width:120,editable:true,editrules:{required: true}}, {name:'location',index:'location', editable:true,editrules:{required: true},width:160}, {name:'piece_no',index:'piece_no', width:120,editable:true,editrules:{required: true}}, {name:'in_dc_val',index:'in_dc_val', width:100,editable:true,editrules:{required: true}}, {name:'rec_by',index:'rec_by', width:140,editable:true,editrules:{required: true}}, ], height: 'auto', rowNum:20000000, sortname: 'num', sortorder: "asc" }); } }); //$("#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 } ); // $("#list2").navButtonAdd('#pager2', // { caption:"Add", // buttonicon:"ui-icon-plus", // onClickButton: addRow, // position: "last", // title:"", // cursor: "pointer", // id:"service_add" // } // ); }); function show () { // // Position of the name column var colPos = 0; var navGrid = $('#list2'); // alert(navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[colPos + 6].name)); // navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[colPos].name); // navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[3].name); //navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[4].name); navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[8].name); navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[9].name); navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[15].name); navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[16].name); navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[17].name); } function hide() { var colPos = 0; var navGrid = $('#list2'); // navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[4].name); navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[8].name); navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[9].name); navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[15].name); navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[16].name); navGrid.jqGrid('hideCol', navGrid.getGridParam("colModel")[17].name); } function fun_preview(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; //alert(as); $.ajax({ type:'post', url:'<?php echo base_url("out_source/outsource_weaving_delivery_preview"); ?>', data:{'as':as}, async:false, success:function() { window.location.href = '<?php echo base_url('out_source/outsource_weaving_delivery_preview');?>/'+ '?id='+as; } }); } </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; } </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'); ?>" /> <style> #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>