EVOLUTION-NINJA
Edit File: add_link_product_grid.php
<style> .ui-jqgrid tr.jqgrow td{ text-transform: uppercase !important; } </style> <script> //$('#table_planned').hide(); function planningtypes(str) { if(str=="fabrics") { $('#table_yarn_raw').hide(); $('#table_yarn_twisted').hide(); $('#table_yarn_dyed').hide(); $('#table_consumables').hide(); $('#table_spares').hide(); $('#table_fabrics').show(); $('#table_services').hide(); } else if(str=="yarn_raw") { $('#table_yarn_raw').show(); $('#table_yarn_twisted').hide(); $('#table_yarn_dyed').hide(); $('#table_consumables').hide(); $('#table_spares').hide(); $('#table_fabrics').hide(); $('#table_services').hide(); } else if(str=="yarn_twisted") { $('#table_yarn_raw').hide(); $('#table_yarn_twisted').show(); $('#table_yarn_dyed').hide(); $('#table_consumables').hide(); $('#table_spares').hide(); $('#table_fabrics').hide(); $('#table_services').hide(); } else if(str=="yarn_dyed") { $('#table_yarn_raw').hide(); $('#table_yarn_twisted').hide(); $('#table_yarn_dyed').show(); $('#table_consumables').hide(); $('#table_spares').hide(); $('#table_fabrics').hide(); $('#table_services').hide(); } else if(str=="consumables") { $('#table_yarn_raw').hide(); $('#table_yarn_twisted').hide(); $('#table_yarn_dyed').hide(); $('#table_consumables').show(); $('#table_spares').hide(); $('#table_fabrics').hide(); $('#table_services').hide(); } else if(str=="spares") { $('#table_yarn_raw').hide(); $('#table_yarn_twisted').hide(); $('#table_yarn_dyed').hide(); $('#table_consumables').hide(); $('#table_spares').show(); $('#table_fabrics').hide(); $('#table_services').hide(); } else if(str=="services") { $('#table_yarn_raw').hide(); $('#table_yarn_twisted').hide(); $('#table_yarn_dyed').hide(); $('#table_consumables').hide(); $('#table_spares').hide(); $('#table_fabrics').hide(); $('#table_services').show(); } } </script> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <h3 class="page-title"> Product 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="#" > Product Master </a></li> </ul> </div> <?php if(empty($access_row)) { } else { if($access_row->insert_id == '1') { ?> <form action="<?php echo base_url(); ?>vendor/add_link_product" method="post" class="form-horizontal"> <b>To insert data click here:</b> <input type="submit" name="Insert" value="Insert" /><br><br> </form> <?php } else { ?> <?php } }?> <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="edit_id" class="edit_id" value="<?php if(empty($access_row)){ } else { echo $access_row->edit_id; } ?>" > <div class="radio-list" style="margin-left: 2%;"> <label class="radio-inline"> <input type="radio" checked="checked" name="planningorder" id="planningorder" onclick="planningtypes('fabrics')" /> Fabrics</label> <label class="radio-inline"> <input type="radio" name="planningorder" id="planningorder" onclick="planningtypes('yarn_raw')" /> Yarn - Raw</label> <label class="radio-inline"> <input type="radio" name="planningorder" id="planningorder" onclick="planningtypes('yarn_twisted')" /> Yarn - Twisted </label> <label class="radio-inline"> <input type="radio" name="planningorder" id="planningorder" onclick="planningtypes('yarn_dyed')" /> Yarn - Dyed</label> <label class="radio-inline"> <input type="radio" name="planningorder" id="planningorder" onclick="planningtypes('consumables')" /> Consumables </label> <label class="radio-inline"> <input type="radio" name="planningorder" id="planningorder" onclick="planningtypes('spares')" /> Spares</label> <label class="radio-inline"> <input type="radio" name="planningorder" id="planningorder" onclick="planningtypes('services')" /> Services</label> </div><br> <!-- ----------------------------Fabric------------------------------------- --> <div id="table_fabrics"> <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> <!-- ----------------------------Yarn - Raw------------------------------------- --> <div id="table_yarn_raw"> <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> <!-- ----------------------------Yarn - Twisted------------------------------------- --> <div id="table_yarn_twisted"> <div id = "jaytab" class="jaytab"> <table id="list4"></table> <div id="pager4"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> <!-- ----------------------------Yarn - Dyed------------------------------------- --> <div id="table_yarn_dyed"> <div id = "jaytab" class="jaytab"> <table id="list5"></table> <div id="pager5"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> <!-- ----------------------------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> <!-- ----------------------------Spares------------------------------------- --> <div id="table_spares"> <div id = "jaytab" class="jaytab"> <table id="list7"></table> <div id="pager7"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> <!-- ----------------------------Services------------------------------------- --> <div id="table_services" style="display:none"> <div id = "jaytab" class="jaytab"> <table id="list8"></table> <div id="pager8"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> <!-- END DASHBOARD STATS --> </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'); ?>" /> <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_id1').value=obj.customerID; } }); } </script> <script> function adddetails() { var customer=$("#customer").val(); var date=$("#date").val(); var product_type=$("#product_type").val(); var description=$("#description").val(); var size=$("#size").val(); var min_quality=$("#min_quality").val(); var customer_id=$("#customer_id").val(); var currency= $("#currency").val(); var article=$("#article").val(); var design=$("#design").val(); var price=$("#price").val(); var image=$("#image").val(); var reference= $("#reference").val(); var terms=$("#terms").val(); var quality= $("#quality").val(); var color=$("#color").val(); var composition=$("#composition").val(); var note=$("#note").val(); $.ajax({ url:"<?php echo base_url('request/customer_insert')?>", type:"POST", data:{'customer':customer,'date':date,'product_type':product_type,'description':description,'size':size,'min_quality':min_quality,'customer_id':customer_id,'currency':currency,'article':article,'design':design,'price':price,'image':image,'reference':reference,'terms':terms,'quality':quality,'color':color,'composition':composition,'note':note}, async:false, success:function(data){ alert('Successfully Added.'); //$("#editmodlist2").remove(); window.location.reload(); } }); } </script> <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_yarn_raw { display:none; } #table_yarn_twisted { display:none; } #table_yarn_dyed { display:none; } #table_consumables { display:none; } #table_spares { display:none; } </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 --> <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"> #search_list2 { display:none !important; } .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; } .col_edit { text-align: center; margin-top: 0px !important; padding-left: 15px !important; padding-right: 12px !important; } .ui-jqgrid td input, .ui-jqgrid td select, .ui-jqgrid td textarea { margin: 0; } .col_edit1 { text-align: center; margin-top: 0px !important; padding-left: 20px !important; padding-right: 14px !important; } .col_edit4 { text-align: center; padding-left: 27px !important; padding-right: 26px !important; } .col_edit5 { text-align: center; padding-left: 28px !important; padding-right: 26px !important; } </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" > <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.css'); ?>"/> <script> <!-----------------------------Fabric --------------------------------------------------> $(document).ready(function (){ //var l=$("#loc").val(); //alert(l); jQuery("#list2").jqGrid({ url:"<?php echo base_url('vendor/vendor_add_link_product_details')?>", datatype: "json", colNames:['Id','Product Name','Product Type','Product Quality','Composition','Width','Weight','Price / MTR','Created Date','Created By','Action','Delete','Preview'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:50}, {name:'product',index:'product', width:200,editable:false}, {name:'product_type',index:'product_type', width:200,editable:true,editrules:{required: true}}, {name:'product_description',index:'product_description', editable:true,editrules:{required: true},width:250}, {name:'construction_details',index:'construction_details', editable:true,editrules:{required: true},width:170}, {name:'width',index:'width', editable:true,editrules:{required: true},width:100}, {name:'weight',index:'weight', editable:true,editrules:{required: true},width:100}, {name:'price_mtr',index:'price_mtr', editable:true,editrules:{required: true},width:100}, {name:'created_by',index:'created_by', editable:true,editrules:{required: true},width:150}, {name:'created_date',index:'created_date', editable:true,editrules:{required: true},width:150}, {name:'edit',index:'edit',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_edit($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' class='fa fa-eye' value='SELECT' \>"; }}, // {name:'edit',index:'edit',align: "center",editable:true,style:'cursor:pointer',editrules:{required: true},width:100,classes:'fa fa-pencil-square-o col_edit',formatter:'showlink',formatoptions:{baseLinkUrl:'<?php echo base_url('vendor/edit_product_details')?>'}}, {name:'preview',index:'preview',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fab_delete($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='DELETE' onclick='some_function' \>"; }}, {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' class='fa fa-eye' value='PREVIEW' \>"; }}, ], 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, autowidth: true, sortorder:"asc", loadonce:true, caption:"Fabric Product Details", }); //$("#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:"Delete", // buttonicon:"ui-icon-trash", // onClickButton: deleteRow, // position: "last", // title:"", // cursor: "pointer", // id:"client_delete" // } // ); }); function fab_delete(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#delete_id').val(); if(v == 1) { var confirmMsg= confirm("Do You Want To Delete!"); if (confirmMsg==true) { swal({ title: "Fabric Product is Successfully Removed", text: "", }); $.ajax({ type:'post', url:'<?php echo base_url("vendor/product_delete"); ?>', data:{'id':as}, async:false, success:function() { $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } }); } else if (confirmMsg==false) { window.location = "<?php echo base_url('vendor/add_link_product_details')?>"; } } else { swal({ title: "You Don't Have Access For This Delete", text: "", }); } } function fun_preview(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#edit_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("vendor/preview_product_details"); ?>', data:{'as':as}, async:false, success:function() { window.location.href = '<?php echo base_url('vendor/preview_product_details');?>/'+ '?id='+as; } }); } else { swal({ title: "You Don't Have Access For This Edit", text: "", }); } } function fun_edit(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#edit_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("vendor/edit_product_details"); ?>', data:{'as':as}, async:false, success:function() { window.location.href = '<?php echo base_url('vendor/edit_product_details');?>/'+ '?id='+as; } }); } else { swal({ title: "You Don't Have Access For This Edit", text: "", }); } } <!-----------------------------Yarn Raw --------------------------------------------------> $(document).ready(function (){ //var l=$("#loc").val(); //alert(l); jQuery("#list3").jqGrid({ url:"<?php echo base_url('vendor/vendor_add_link_product_type_raw')?>", datatype: "json", colNames:['Id','Product Name','Product Type','Yarn Type','Yarn Quality','Yarn Name','Yarn Specification','Created Date','Created By','Action','Delete','Preview'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:50}, {name:'product',index:'product', width:150,editable:false}, {name:'product_type',index:'product_type', width:100,editable:true,editrules:{required: true}}, {name:'yarntype',index:'yarntype', editable:true,editrules:{required: true},width:80}, {name:'yarnquality',index:'yarnquality', editable:true,editrules:{required: true},width:120}, {name:'yarnname',index:'yarnname', editable:true,editrules:{required: true},width:120}, {name:'yarnspecification',index:'yarnspecification', editable:true,editrules:{required: true},width:100}, {name:'created_by',index:'created_by', editable:true,editrules:{required: true},width:150}, {name:'created_date',index:'created_date', editable:true,editrules:{required: true},width:100}, {name:'edit',index:'edit',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_edit2($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' class='fa fa-eye' value='SELECT' \>"; }}, // {name:'edit',index:'edit',align: "center",editable:true,style:'cursor:pointer',editrules:{required: true},width:100,classes:'fa fa-pencil-square-o col_edit1',formatter:'showlink',formatoptions:{baseLinkUrl:'<?php echo base_url('vendor/edit_yarn_product_details')?>'}}, {name:'preview',index:'preview',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="raw_delete($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='DELETE' onclick='some_function' \>"; }} , {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' class='fa fa-eye' value='PREVIEW' \>"; }}, ], 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:"asc", loadonce:true, caption:"Yarn - Raw Product Details", }); //$("#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:false,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true } ); }); function raw_delete(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#delete_id').val(); if(v == 1) { var confirmMsg= confirm("Do You Want To Delete!"); if (confirmMsg==true) { swal({ title: "Yarn-Raw Product is Successfully Removed", text: "", }); $.ajax({ type:'post', url:'<?php echo base_url("vendor/product_delete"); ?>', data:{'id':as}, async:false, success:function() { $("#list3").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } }); } else if (confirmMsg==false) { window.location = "<?php echo base_url('vendor/add_link_product_details')?>"; } } else { swal({ title: "You Don't Have Access For This Delete", text: "", }); } } function fun_edit2(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#edit_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("vendor/edit_yarn_product_details"); ?>', data:{'as':as}, async:false, success:function() { window.location.href = '<?php echo base_url('vendor/edit_yarn_product_details');?>/'+ '?id='+as; } }); } else { swal({ title: "You Don't Have Access For This Edit", text: "", }); } } <!-----------------------------Yarn Twisted --------------------------------------------------> $(document).ready(function (){ //var l=$("#loc").val(); //alert(l); jQuery("#list4").jqGrid({ url:"<?php echo base_url('vendor/vendor_add_link_product_type_twisted')?>", datatype: "json", colNames:['Id','Product Name','Product Type','Yarn Type','Yarn Quality','Yarn Name','Yarn Specification','Created Date','Created By','Action','Delete','Preview'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:50}, {name:'product',index:'product', width:150,editable:false}, {name:'product_type',index:'product_type', width:150,editable:true,editrules:{required: true}}, {name:'yarntype',index:'yarntype', editable:true,editrules:{required: true},width:90}, {name:'yarnquality',index:'yarnquality', editable:true,editrules:{required: true},width:100}, {name:'yarnname',index:'yarnname', editable:true,editrules:{required: true},width:100}, {name:'yarnspecification',index:'yarnspecification', editable:true,editrules:{required: true},width:100}, {name:'created_by',index:'created_by', editable:true,editrules:{required: true},width:150}, {name:'created_date',index:'created_date', editable:true,editrules:{required: true},width:100}, {name:'edit',index:'edit',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_edit3($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' class='fa fa-eye' value='SELECT' \>"; }}, // {name:'edit',index:'edit',align: "center",editable:true,style:'cursor:pointer',editrules:{required: true},width:100,classes:'fa fa-pencil-square-o col_edit1',formatter:'showlink',formatoptions:{baseLinkUrl:'<?php echo base_url('vendor/edit_yarn_product_details')?>'}}, {name:'preview',index:'preview',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="twisted_delete($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='DELETE' onclick='some_function' \>"; }}, {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' class='fa fa-eye' value='PREVIEW' \>"; }}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager4", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, caption:"Yarn - Twisted Product Details", }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list4").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list4").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 twisted_delete(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#delete_id').val(); if(v == 1) { var confirmMsg= confirm("Do You Want To Delete!"); if (confirmMsg==true) { swal({ title: "Yarn-Twisted Product is Successfully Removed", text: "", }); $.ajax({ type:'post', url:'<?php echo base_url("vendor/product_delete"); ?>', data:{'id':as}, async:false, success:function() { $("#list4").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } }); } else if (confirmMsg==false) { window.location = "<?php echo base_url('vendor/add_link_product_details')?>"; } } else { swal({ title: "You Don't Have Access For This Delete", text: "", }); } } function fun_edit3(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#edit_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("vendor/edit_yarn_product_details"); ?>', data:{'as':as}, async:false, success:function() { window.location.href = '<?php echo base_url('vendor/edit_yarn_product_details');?>/'+ '?id='+as; } }); } else { swal({ title: "You Don't Have Access For This Edit", text: "", }); } } <!-----------------------------Yarn Dyed --------------------------------------------------> $(document).ready(function (){ //var l=$("#loc").val(); //alert(l); jQuery("#list5").jqGrid({ url:"<?php echo base_url('vendor/vendor_add_link_product_type_dyed')?>", datatype: "json", colNames:['Id','Product Name','Product Type','Yarn Type','Yarn Quality','Yarn Name','Yarn Specification','Created Date','Created By','Action','Delete','Preview'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:50}, {name:'product',index:'product', width:150,editable:false}, {name:'product_type',index:'product_type', width:150,editable:true,editrules:{required: true}}, {name:'yarntype',index:'yarntype', editable:true,editrules:{required: true},width:100}, {name:'yarnquality',index:'yarnquality', editable:true,editrules:{required: true},width:140}, {name:'yarnname',index:'yarnname', editable:true,editrules:{required: true},width:100}, {name:'yarnspecification',index:'yarnspecification', editable:true,editrules:{required: true},width:100}, {name:'created_by',index:'created_by', editable:true,editrules:{required: true},width:100}, {name:'created_date',index:'created_date', editable:true,editrules:{required: true},width:100}, {name:'edit',index:'edit',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_edit4($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' class='fa fa-eye' value='SELECT' \>"; }}, /// {name:'edit',index:'edit',align: "center",editable:true,style:'cursor:pointer',editrules:{required: true},width:100,classes:'fa fa-pencil-square-o col_edit1',formatter:'showlink',formatoptions:{baseLinkUrl:'<?php echo base_url('vendor/edit_yarn_product_details')?>'}}, {name:'preview',index:'preview',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="dyed_delete($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='DELETE' onclick='some_function' \>"; }}, {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' class='fa fa-eye' value='PREVIEW' \>"; }}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager5", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, caption:"Yarn - Dyed Product Details", }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list5").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list5").jqGrid('navGrid','#pager5', {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 dyed_delete(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#delete_id').val(); if(v == 1) { var confirmMsg= confirm("Do You Want To Delete!"); if (confirmMsg==true) { swal({ title: "Yarn-Dyed Product is Successfully Removed", text: "", }); $.ajax({ type:'post', url:'<?php echo base_url("vendor/product_delete"); ?>', data:{'id':as}, async:false, success:function() { $("#list5").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } }); } else if (confirmMsg==false) { window.location = "<?php echo base_url('vendor/add_link_product_details')?>"; } } else { swal({ title: "You Don't Have Access For This Delete", text: "", }); } } function fun_edit4(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#edit_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("vendor/edit_yarn_product_details"); ?>', data:{'as':as}, async:false, success:function() { window.location.href = '<?php echo base_url('vendor/edit_yarn_product_details');?>/'+ '?id='+as; } }); } else { swal({ title: "You Don't Have Access For This Edit", text: "", }); } } <!-----------------------------consumables --------------------------------------------------> $(document).ready(function (){ //var l=$("#loc").val(); //alert(l); jQuery("#list6").jqGrid({ url:"<?php echo base_url('vendor/vendor_add_link_product_type_consumables')?>", datatype: "json", colNames:['Id','Product Name','Product Type','Product Description','Created Date','Created By','Action','Delete','Preview'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:50}, {name:'product',index:'product', width:380,editable:false}, {name:'product_type',index:'product_type', width:160,editable:true,editrules:{required: true}}, {name:'product_description',index:'product_description', editable:true,editrules:{required: true},width:200}, // {name:'construction_details',index:'construction_details', editable:true,editrules:{required: true},width:250}, // {name:'width',index:'width', editable:true,editrules:{required: true},width:100}, // {name:'weight',index:'weight', editable:true,editrules:{required: true},width:100}, {name:'created_by',index:'created_by', editable:true,editrules:{required: true},width:100}, {name:'created_date',index:'created_date', editable:true,editrules:{required: true},width:100}, {name:'edit',index:'edit',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_edit5($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' class='fa fa-eye' value='SELECT' \>"; }}, // {name:'edit',index:'edit',align: "center",editable:true,style:'cursor:pointer',editrules:{required: true},width:120,classes:'fa fa-pencil-square-o col_edit4',formatter:'showlink',formatoptions:{baseLinkUrl:'<?php echo base_url('vendor/edit_product_details')?>'}}, {name:'preview',index:'preview',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="consumables_delete($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='DELETE' onclick='some_function' \>"; }}, {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' class='fa fa-eye' value='PREVIEW' \>"; }}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, 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:"Consumables Product Details", }); //$("#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:false,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true } ); }); function consumables_delete(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#delete_id').val(); if(v == 1) { var confirmMsg= confirm("Do You Want To Delete!"); if (confirmMsg==true) { swal({ title: "Consumable Product is Successfully Removed", text: "", }); $.ajax({ type:'post', url:'<?php echo base_url("vendor/product_delete"); ?>', data:{'id':as}, async:false, success:function() { window.location.reload(); //window.location.href = '<?php //echo base_url('vendor/product_delete');?>'; } }); } else if (confirmMsg==false) { window.location = "<?php echo base_url('vendor/add_link_product_details')?>"; } } else { swal({ title: "You Don't Have Access For This Delete", text: "", }); } } function fun_edit5(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#edit_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("vendor/edit_product_details"); ?>', data:{'as':as}, async:false, success:function() { window.location.href = '<?php echo base_url('vendor/edit_product_details');?>/'+ '?id='+as; } }); } else { swal({ title: "You Don't Have Access For This Edit", text: "", }); } } <!-----------------------------spares --------------------------------------------------> $(document).ready(function (){ //var l=$("#loc").val(); //alert(l); jQuery("#list7").jqGrid({ url:"<?php echo base_url('vendor/vendor_add_link_product_type_spares')?>", datatype: "json", colNames:['Id','Product Name','Product Type','Product Description','Created Date','Created By','Action','Delete','Preview'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:50}, {name:'product',index:'product', width:250,editable:false}, {name:'product_type',index:'product_type', width:200,editable:true,editrules:{required: true}}, {name:'product_description',index:'product_description', editable:true,editrules:{required: true},width:250}, //{name:'construction_details',index:'construction_details', editable:true,editrules:{required: true},width:250}, // {name:'width',index:'width', editable:true,editrules:{required: true},width:100}, // {name:'weight',index:'weight', editable:true,editrules:{required: true},width:100}, {name:'created_by',index:'created_by', editable:true,editrules:{required: true},width:100}, {name:'created_date',index:'created_date', editable:true,editrules:{required: true},width:100}, {name:'edit',index:'edit',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_edit6($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' class='fa fa-eye' value='SELECT' \>"; }}, // {name:'edit',index:'edit',align: "center",editable:true,style:'cursor:pointer',editrules:{required: true},width:120,classes:'fa fa-pencil-square-o col_edit5',formatter:'showlink',formatoptions:{baseLinkUrl:'<?php echo base_url('vendor/edit_product_details')?>'}}, {name:'preview',index:'preview',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="spares_delete($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='DELETE' onclick='some_function' \>"; }}, {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' class='fa fa-eye' value='PREVIEW' \>"; }}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager7", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, caption:"Spares Product Details", }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list7").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list7").jqGrid('navGrid','#pager7', {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 spares_delete(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#delete_id').val(); if(v == 1) { var confirmMsg= confirm("Do You Want To Delete!"); if (confirmMsg==true) { swal({ title: "Spares Product is Successfully Removed", text: "", }); $.ajax({ type:'post', url:'<?php echo base_url("vendor/product_delete"); ?>', data:{'id':as}, async:false, success:function() { window.location.reload(); //window.location.href = '<?php //echo base_url('vendor/product_delete');?>'; } }); } else if (confirmMsg==false) { window.location = "<?php echo base_url('vendor/add_link_product_details')?>"; } } else { swal({ title: "You Don't Have Access For This Delete", text: "", }); } } function fun_edit6(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#edit_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("vendor/edit_product_details"); ?>', data:{'as':as}, async:false, success:function() { window.location.href = '<?php echo base_url('vendor/edit_product_details');?>/'+ '?id='+as; } }); } else { swal({ title: "You Don't Have Access For This Edit", text: "", }); } } <!-----------------------------services --------------------------------------------------> $(document).ready(function (){ //var l=$("#loc").val(); //alert(l); jQuery("#list8").jqGrid({ url:"<?php echo base_url('vendor/vendor_add_link_product_type_services')?>", datatype: "json", colNames:['Id','Product Name','Product Type','Product Description','Created Date','Created By','Action','Delete','Preview'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:50}, {name:'product',index:'product', width:250,editable:false}, {name:'product_type',index:'product_type', width:200,editable:true,editrules:{required: true}}, {name:'product_description',index:'product_description', editable:true,editrules:{required: true},width:300}, //{name:'construction_details',index:'construction_details', editable:true,editrules:{required: true},width:250}, // {name:'width',index:'width', editable:true,editrules:{required: true},width:100}, // {name:'weight',index:'weight', editable:true,editrules:{required: true},width:100}, {name:'created_by',index:'created_by', editable:true,editrules:{required: true},width:100}, {name:'created_date',index:'created_date', editable:true,editrules:{required: true},width:100}, {name:'edit',index:'edit',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_edit7($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' class='fa fa-eye' value='SELECT' \>"; }}, // {name:'edit',index:'edit',align: "center",editable:true,style:'cursor:pointer',editrules:{required: true},width:120,classes:'fa fa-pencil-square-o col_edit5',formatter:'showlink',formatoptions:{baseLinkUrl:'<?php echo base_url('vendor/edit_product_details')?>'}}, {name:'preview',index:'preview',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="services_delete($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='DELETE' onclick='some_function' \>"; }}, {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' class='fa fa-eye' value='PREVIEW' \>"; }}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager8", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, caption:"Services Product Details", }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list8").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list8").jqGrid('navGrid','#pager8', {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 services_delete(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#delete_id').val(); if(v == 1) { var confirmMsg= confirm("Do You Want To Delete!"); if (confirmMsg==true) { swal({ title: "Spares Product is Successfully Removed", text: "", }); $.ajax({ type:'post', url:'<?php echo base_url("vendor/product_delete"); ?>', data:{'id':as}, async:false, success:function() { window.location.reload(); //window.location.href = '<?php //echo base_url('vendor/product_delete');?>'; } }); } else if (confirmMsg==false) { window.location = "<?php echo base_url('vendor/add_link_product_details')?>"; } } else { swal({ title: "You Don't Have Access For This Delete", text: "", }); } } function fun_edit7(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#edit_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("vendor/edit_product_details"); ?>', data:{'as':as}, async:false, success:function() { window.location.href = '<?php echo base_url('vendor/edit_product_details');?>/'+ '?id='+as; } }); } else { swal({ title: "You Don't Have Access For This Edit", text: "", }); } } </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'); ?>" /> <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> #search_list2 { display:none !important; } #refresh_list2 { display:none !important; } #search_list7 { display:none !important; } #refresh_list7 { display:none !important; } #search_list3 { display:none !important; } #refresh_list3 { display:none !important; } #search_list4 { display:none !important; } #refresh_list4 { display:none !important; } #search_list5 { display:none !important; } #refresh_list5 { display:none !important; } #search_list6 { display:none !important; } #refresh_list6 { 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 !important; //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; } #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 { } #sData { height: 29px; } #cData { height: 29px; } .jqgfirstrow { height: 0px !important; } #gbox_list2 { margin-left: 2%; } #gbox_list3 { margin-left: 2%; } #gbox_list4 { margin-left: 2%; } #gbox_list5 { margin-left: 2%; } #gbox_list6 { margin-left: 2%; } #gbox_list7 { margin-left: 2%; } </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; } } @media only screen and (min-width:320px) and (min-height:640px){ .checkbox-inline, .radio-inline { //padding-left: 0px !important; } .checkbox-inline + .checkbox-inline, .radio-inline + .radio-inline { //margin-left: 0px !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; } } </style>