EVOLUTION-NINJA
Edit File: services_details_grid.php
<style> .ui-jqgrid { text-transform: capitalize !important; } .tablediv { text-transform: uppercase !important; } .ui-jqgrid tr.jqgrow td{ text-transform: uppercase !important; } @media only screen and (min-width:641px) and (max-width:991px) { #jaytab { overflow-x: scroll; } } @media only screen and (min-width:992px) and (max-width:1258px) { #jaytab { overflow-x: scroll; } } .badge { background: -webkit-radial-gradient( 1px -11px, circle, rgba(17, 208, 85, 0.98) 8%, rgb(7, 46, 80) 26px ); background-color: #ef0e0e; border: 1px solid white; border-radius: 12px; color: white; font: bold 12px/9px Helvetica, Verdana, Tahoma; height: 17px; padding: 3px 3px 0 3px; text-align: center; min-width: 19px; margin-bottom: 16px; } </style> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <h3 class="page-title">Services List</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="#" > Services List </a></li> </ul> </div> <input type="hidden" id="edit_id" class="edit_id" value="<?php if(empty($access_row)){ } else { echo $access_row->edit_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="delete_id" class="delete_id" value="<?php if(empty($access_row)){ } else { echo $access_row->delete_id; } ?>" > <input type="hidden" id="approval_id" class="approval_id" value="<?php if(empty($access_row)){ } else { echo $access_row->approval_id; } ?>" > <div class="radio-list" style="margin-left: 2%;"> <input type="hidden" value="<?php echo $ref; ?>" id="ref_id" > <input type="hidden" value="<?php echo $url_val; ?>" id="url_ref" style="width: 230px;" > </div><br> <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> <!-- 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> #refresh_list1 { display:none !important; } #search_list2 { display:none !important; } .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; } </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-------------> <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" type="text/css" href="<?php echo base_url();?>assets/css/bootstrap-datepicker.min.css"/> <script src="<?php echo base_url();?>assets/js/bootstrap-datepicker.min.js"></script> <script> $('.datepicker').datepicker({ format: 'yyyy/mm/dd', }); </script> <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; } #search_list3 { display:none; } .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: 24px !important; padding-left: 24px !important; } .ui-jqgrid .ui-jqgrid-btable tbody tr.jqgrow td { overflow: hidden; white-space: pre; } #table_approved_po { display:none; } .coledit{ cursor: pointer; padding-right: 45px !important; padding-left: 45px !important; } </style> <style> </style> <!-----------------datepicker-------------> <!-- The link to the CSS that the grid needs --> <script> function fun_delete(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; //alert(as); var v=$('#delete_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("vendor/vendor_delete_po"); ?>', data:{'as':as}, async:false, success:function() { $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } }); } else { swal({ title: "You Don't Have Access For This Delete", text: "", }); } } function fun_edit(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#edit_id').val(); var url_r=$('#url_ref').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("vendor/po_list_edit"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); if(url_r == '1') { window.location.href = '<?php echo base_url('vendor/po_list_edit');?>/'+ '?id='+as; } else if(url_r == '2') { window.location.href = '<?php echo base_url('vendor/po_pending_edit');?>/'+ '?id='+as; } else if(url_r == '3') { window.location.href = '<?php echo base_url('vendor/purchase_order_pending_edit');?>/'+ '?id='+as; } else if(url_r == '4') { window.location.href = '<?php echo base_url('vendor/purchase_order_edit');?>/'+ '?id='+as; } } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } function fun(rowId) { var v=$('#approval_id').val(); if(v == 1) { var id = rowId.closest('tr').attr('id'); //alert(id); var confirmMsg= confirm("Do You Want To Confirm!"); if (confirmMsg==true) { swal({ title: 'Remarks', input: 'text', showCancelButton: true, confirmButtonText: 'Submit', showLoaderOnConfirm: true, }).then(function (email) { $.ajax({ //alert(email); url:"<?php echo base_url('vendor/purchase_order_list_yes_confirmation')?>", type:"POST", data:{'id':id,'remarks':email}, success:function(data){ if(data==""){ $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } else{ $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } } }); swal({ type: 'success', // title: 'Approved By', // html: '' + email }) }) ///alert(email); } else if (confirmMsg==false) { $("#editmodlist2").remove(); $("#list2").trigger("reloadGrid"); } } else { swal({ title: "You Don't Have Access For This Approval", text: "", }); $( ".check" ).prop( "checked", false ); } } function fun_pending_preview(rowId) { var v=$('#preview_id').val(); if(v == 1) { var id = rowId.closest('tr').attr('id'); var as=id; var url_r=$('#url_ref').val(); //alert(url_r); $.ajax({ type:'post', url:'<?php echo base_url("vendor/purchase_pending_preview"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); if(url_r == '1') { window.location.href = '<?php echo base_url('vendor/purchase_pending_preview');?>/'+ '?id='+as; } else if(url_r == '2') { window.location.href = '<?php echo base_url('vendor/po_pending_preview');?>/'+ '?id='+as; } else if(url_r == '3') { window.location.href = '<?php echo base_url('vendor/purchase_order_pending_preview');?>/'+ '?id='+as; } else if(url_r == '4') { window.location.href = '<?php echo base_url('vendor/purchase_order_preview');?>/'+ '?id='+as; } } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } function deleteRow() { // Get the currently selected row var v=$('#delete_id').val(); if(v == 1) { var row = $("#list2").jqGrid('getGridParam','selrow'); $("#id").val(row); if( row != null ) $("#list2").jqGrid('delGridRow',row, { modal:true,jqModal:true, recreateForm: true, beforeSubmit: function(postdata,formid){ $.ajax({ url:"<?php echo base_url('vendor/purchase_order_delete');?>", type:"POST", data:{'id':row}, 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(); } } }); }, closeAfterEdit: true, reloadAfterSubmit:false, afterSubmit : false }); else $( "#dialogSelectRow" ).dialog(); } else { swal({ title: "You Don't Have Access For This Delete", text: "", }); } } <!-----------------------------------------approved pending grid---------------------------------------> $(document).ready(function (){ var l=$('#ref_id').val(); $("#list3").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); jQuery("#list3").jqGrid({ url:"<?php echo base_url('vendor/services_grid_details')?>/s"+l+"/", datatype: "json", colNames:['Id','PO No','Vendor Name','Date','Currency','Created By','Approved By','PO preview'], colModel:[ {name:'id',index:'id',hidden:true, width:100,editable:true,width:100}, {name:'po_no',index:'po_no', width:150,editable:false}, {name:'vendor_name',index:'vendor_name', editable:true,editrules:{required: true},width:150}, {name:'g_date',index:'g_date', width:115,editable:true,editrules:{required: true}}, {name:'currency',index:'currency', editable:true,editrules:{required: true},width:60}, {name:'created_by',index:'created_by', editable:true,editrules:{required: true},width:120}, {name:'approved_by',index:'approved_by', editable:true,editrules:{required: true},width:100}, {name:'preview',index:'preview',align: "center",editable:false,editrules:{required: true}, width:120,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: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager3", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"desc", loadonce:true, caption:"Services 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('vendor/purchase_order_approved_list_grid');?>/s"+row_id+"/", //data:{'sub_id':123}, mtype : "get", datatype: "json", colNames:['Id','Indent No','Department','Product Name','Product Type','Quantity','Unit','Unit Price','INR Value','CGST','SGST','IGST','Total Value','Created By','Approved By'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'indent_no',index:'indent_no', width:150,editable:true,editrules:{required: true}}, {name:'department',index:'department', editable:true,editrules:{required: true},width:120}, {name:'product_name',index:'product_name', width:200,editable:false}, {name:'product_type',index:'product_type', width:102,editable:false}, {name:'quantity',index:'quantity', width:71,editable:true,editrules:{required: true}}, {name:'indent_unit',index:'indent_unit', width:60,editable:true,editrules:{required: true}}, {name:'unit',index:'unit', editable:true,editrules:{required: true},width:70}, {name:'inrvalue',index:'inrvalue', width:80,editable:true,editrules:{required: true}}, {name:'cgst',index:'cgst', editable:true,editrules:{required: true},width:47}, {name:'sgst',index:'sgst', editable:true,editrules:{required: true},width:47}, {name:'igst',index:'igst', editable:true,editrules:{required: true},width:47}, {name:'totalvalue',index:'totalvalue', width:117,editable:true,editrules:{required: true}}, {name:'created_by',index:'created_by', width:117,editable:true,editrules:{required: true}}, {name:'approved_by',index:'approved_by', width:117,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("#list3").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list3").jqGrid('navGrid','#pager3', {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" } ); }); 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("vendor/purchase_preview"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); if(url_r == '1') { window.location.href = '<?php echo base_url('vendor/purchase_preview');?>/'+ '?id='+as; } else if(url_r == '2') { window.location.href = '<?php echo base_url('vendor/po_purchase_preview');?>/'+ '?id='+as; } else if(url_r == '3') { window.location.href = '<?php echo base_url('vendor/purchase_order_approved_preview');?>/'+ '?id='+as; } else if(url_r == '4') { window.location.href = '<?php echo base_url('vendor/po_approved_preview');?>/'+ '?id='+as; } //window.location.href = '<?php echo base_url('vendor/purchase_preview');?>/'+ '?id='+as; } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } function fun_grn_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("vendor/purchase_grn_preview"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); if(url_r == '1') { window.location.href = '<?php echo base_url('vendor/purchase_grn_preview');?>/'+ '?id='+as; } else if(url_r == '2') { window.location.href = '<?php echo base_url('vendor/po_purchase_grn_details');?>/'+ '?id='+as; } else if(url_r == '3') { window.location.href = '<?php echo base_url('vendor/grn_po_purchase_order_approved_preview');?>/'+ '?id='+as; } else if(url_r == '4') { window.location.href = '<?php echo base_url('vendor/grn_po_approved_preview');?>/'+ '?id='+as; } // window.location.href = '<?php //echo base_url('vendor/purchase_grn_preview');?>/'+ '?id='+as; } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } </script> <style> #jaytab { width: 100% !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; } #refresh_list3 { display:none !important; } #client_edit { padding-right:12px !important; } #list2 { width: 1050px !important; //height: 0px !important; } #gbox_list2 { //width:100% !important; 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; } .radio-list { margin-left:7% !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; } .tablediv { width:auto !important; overflow-x:scroll; } .ui-jqgrid .ui-jqgrid-bdiv { overflow: inherit !important; } </style> <style> @media only screen and (min-width:320px) and (min-height:640px){ #gbox_list2{ //width:1052px !important; } #gview_list2{ // width:100% !important; } .ui-jqgrid-hdiv{ //width:100% !important; } .ui-jqgrid-htable{ // width:100% !important; } #list2{ // width:100% !important; } } .ui-jqgrid-view { width: 1300px !important; } .ui-jqgrid-hdiv { width: 1300px !important; } .ui-jqgrid-htable { width: 1300px !important; } .ui-jqgrid-bdiv { width: 1300px !important; } #list1 { width: 1300px !important; } #pager1 { width: 1300px !important; } #list3 { width: 1300px !important; } #pager3 { width: 1300px !important; } #list2 { width: 1300px !important; } #pager2 { width: 1300px !important; } #gbox_list2 { width: 1300px !important; } #gview_list2 { width: 1300px !important; } .ui-jqgrid-hdiv { // width: 1300px !important; } .ui-jqgrid-htable { width: 1300px !important; } .ui-jqgrid-bdiv { //width: 1300px !important; } </style>