EVOLUTION-NINJA
Edit File: spares_stock.php
<script src="<?php echo base_url('assets/js/jquery.table2excel.js');?>"></script> <script src="<?php echo base_url('assets/js/jspdf.debug.js');?>"></script> <script src="<?php echo base_url('assets/js/jspdf.min.js');?>"></script> <script type="text/javascript" src="<?php echo base_url('assets/js/shim.min.js');?>"></script> <script type="text/javascript" src="<?php echo base_url('assets/js/xlsx.full.min.js');?>"></script> <script type="text/javascript" src="<?php echo base_url('assets/js/Blob.js');?>"></script> <script type="text/javascript" src="<?php echo base_url('assets/js/FileSaver.js');?>"></script> <?php //include("menu.php"); error_reporting(E_ALL); ?> <style> #jaytab { overflow-x: inherit !important; } #ui-datepicker-div { z-index: 1000 !important; } .date_row { padding-bottom: 3%; } </style> <script> function displaycustomer(str) { $.ajax({ type:"post", url:"<?php echo base_url(); ?>display_data/testingcustomer", data:"id="+str, success:function(data) { document.getElementById("dynamicdatamster").innerHTML=data; } }); } </script> <!-- BEGIN CONTENT --> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <h3 class="page-title"> Spares Stock Details </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="https://swansilk.co/dashboard/dashboard_fun">Home</a> <i class="fa fa-angle-right"></i> <a href="#" >Spares Stock Details </a></li> </ul> </div> <div class="row date_row"> <form action="<?php echo base_url('reports/spares_stock_data'); ?>" method="post" class="form"> <div class="col-md-3"> <div class="form-group"> <label class="control-label col-md-4">From Date :</label> <div class="col-md-8"> <input type="text" class="form-control input-group openDatePicker from_delivery_date_required_on" name="from_delivery_date_required_on" id="from_delivery_date_required_on" data-provide="datepicker"> </div> </div> </div> <div class="col-md-3"> <div class="form-group"> <label class="control-label col-md-4">To Date :</label> <div class="col-md-8"> <input type="text" class="form-control input-group openDatePicker to_delivery_date_required_on" name="to_delivery_date_required_on" id="to_delivery_date_required_on" data-provide="datepicker" > </div> </div> </div> <div class="col-md-3"> <div class="form-group"> <label class="control-label col-md-4">Location :</label> <div class="col-md-8"> <select class="form-control" id="location" name="location"> <option value="all">ALL</option> <?php foreach($loc as $loc){ ?> <option value="<?php echo $loc->consumed_at; ?>"><?php echo $loc->consumed_at; ?></option> <?php } ?> </select> </div> </div> </div> <div class="col-md-3"> <input type="submit" id="" value="Submit" class="" style="margin-right: 2px;"/> </div> </form> </div> <!-- row -2--> <?php $this->load->view('import_module/masters_data_display'); ?> <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="preview_id" class="preview_id" value="<?php if(empty($access_row)){ } else { echo $access_row->preview_id; } ?>" > <!--<br/> <select class="col-sm-8 col-xs-7" id="osl_num" name="osl_num" style="height:26px;text-transform: uppercase !important;width: 174px !important;" readonly> <option value="">Select Location</option> <option value="HO">HO</option> <option value="DYEING">PEENYA DYEING</option> <option value="NANDI">NANDI </option> <option value="TAILORING">PEENYA TAILORING</option> <option value="BYATRANPURA">BYATRANPURA</option> <option value="VIJAYAPURA">VIJAYAPURA</option> <option value="DODDAJALA">DODDAJALA </option> <option value="KUMARA">KUMARA PARK</option> </select> <button id="osl_button" class="btn" style="height: 27px; background: rgb(72,91,127); color: white; margin-right: 12px; margin-top: 0px !important; padding-top: 3px; padding-bottom: 8px;margin-left: 15px;" >View</button> --> <br><br> <!-- ----------------------------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> <!-- END DASHBOARD STATS --> </div> </div> </div> <!-- End BEGIN CONTAINER --> <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> $(function(){ $(".from_delivery_date_required_on").datepicker({ dateFormat: 'dd/mm/yy', }).on('changeDate', function(ev){ $('.from_delivery_date_required_on').datepicker('hide'); }); }); $('.from_delivery_date_required_on').on('change', function(){ var date = $(this).val(); $('.to_delivery_date_required_on').datepicker({ dateFormat: 'dd/mm/yy', minDate: date, }); }); </script> <!-- 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> $("#osl_button").click(function(e) { var as =$('#osl_num').val(); //alert(as); var yarn_type =$('#yarn_type').val(); var preview_id=$('#preview_id').val(); $.ajax({ type:'post', url:'<?php echo base_url("stock_history_details/outsource_consumable_preview"); ?>', data:{'as':as}, async:false, success:function() { window.location.href = '<?php echo base_url('stock_history_details/outsource_consumable_preview');?>/'+ '?id='+as+'/'+yarn_type+'/'+preview_id; } }); }); </script> <script> $("#addnew").click(function(e){ $.ajax({ url:"<?php echo base_url('request/autofill'); ?>", type:"GET", data:"", async:false, success:function(data){ $('#client_code1').val(data); if(data==''){ alert('Unsuccessful!'); } else{ var obj = jQuery.parseJSON(data); obj.id++; $("#customer").val(obj.customer_name); $("#customer_id").val(obj.customer_id); $("#reference").val(obj.reference); $("#orderDate").val(obj.date); $("#currency").val(obj.currency); $("#terms").val(obj.terms); } } }); e.preventDefault(); }); </script> <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 myFunction() { //alert(); var customer = document.getElementById('customer').value; $.ajax({ url:"<?php echo base_url('request/search_by_customer')?>", dataType: "json", data:{'customer':customer}, type:"POST", async:true, success:function(data) { // alert('hai'); if(data=="") { alert('This customer is not a Swansilk Customer'); window.location.reload(); } else { 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> <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> #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; } .ui-jqgrid .ui-jqgrid-caption { text-align: left; background: rgb(72,91,127); color: white; } .ui-jqdialog .ui-jqdialog-titlebar { padding: .1em .1em; min-height: 35px; background: rgb(72,91,127); color: white; } .ui-jqdialog .ui-jqdialog-titlebar-close span { display: block; margin: -9px !important; } .ui-jqdialog .ui-jqdialog-titlebar-close span { display: block; margin: -9px !important; } #sData { height: 27px; } #cData { height: 27px; } #dData { height: 27px; } #eData { height: 27px; } </style> <script> function getDesignAndQuality(articleNo) { $.ajax({ type: "post", url: "<?php echo base_url(); ?>marketing/getDesignAndQuality", data: "articleNo=" + articleNo, success: function (data) { // alert(); var objData = jQuery.parseJSON(data); // document.getElementById("design").value = objData.design; document.getElementById("quality").value = objData.arrArticleDet.quality; var comp=""; $.each(objData.composition, function(key,val){ comp +=val.yarnQuality +":" + ((val.sum)*100).toFixed(2) +"% " ; }); document.getElementById("composition").value = comp; } }); } </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'); ?>" /> </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; } .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; } #search_list6 { display:none !important; } #refresh_list6 { display:none !important; } #search_list7 { display:none !important; } #refresh_list7 { display:none !important; } </style> <style> </style> <!-----------------datepicker-------------> <!-- The link to the CSS that the grid needs --> <script> $(document).ready(function (){ $('#table_consumables').show(); $('#table_spares').hide(); jQuery("#list6").jqGrid({ url:"<?php echo base_url('vendor/confirmed_po_list_spares_data')?>", datatype: "json", colNames:['Id','PO No','Product','Indent No#','Department','Quantity','Total Quantity','Unit','Received Date','Location'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'po_no',index:'po_no', width:120,editable:false}, // {name:'vendor_name',index:'vendor_name', editable:true,editrules:{required: true},width:200}, {name:'product_name',index:'product_name', editable:true,editrules:{required: true},width:120}, {name:'indent_no',index:'indent_no', editable:true,editrules:{required: true},width:120}, {name:'department',index:'department', editable:true,editrules:{required: true},width:120}, {name:'quantity',index:'quantity', width:120,editable:true,editrules:{required: true}}, {name:'total_quantity',index:'total_quantity', width:120,editable:true,editrules:{required: true}}, {name:'indent_unit',index:'indent_unit', width:200,editable:true,editrules:{required: true}}, // {name:'currency',index:'currency', editable:true,editrules:{required: true},width:200}, {name:'received_date',index:'received_date', width:142,editable:true,editrules:{required: true}}, {name:'consumed_at',index:'consumed_at', width:142,editable:true,editrules:{required: true}}, // {name:'rec_by',index:'rec_by', width:142,editable:true,editrules:{required: true}}, // { // name: 'confirm', index: 'confirm', width: 70, align: 'center', // formatter: 'checkbox', editoptions: { value: '1:0' }, // formatoptions: { disabled: false }, // cellattr: function (rowId, tv, rawObject, cm, rdata) // { // return ' onclick="fun($(this))" '; // } // }, // {name:'approved_by',index:'approved_by', width:120,editable:true,editrules:{required: true}}, // {name:'remark',index:'remark', width:120,editable:true,editrules:{required: true}}, ], 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:"Spares Stock Details", footerrow: true, loadComplete: function () { var sumOfPrice_total_quantity = jQuery("#list6").jqGrid('getCol','total_quantity',false,'sum'); jQuery("#list6").jqGrid('footerData', 'set', { quantity: 'Total:', total_quantity: sumOfPrice_total_quantity.toFixed(2) }); }, }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list6").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list6").jqGrid('navGrid','#pager6', {edit:false,add:false,del:false,search:true,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true, multipleGroup:true, caption:"search" } ); // $("#list6").navButtonAdd('#pager6', // { caption:"Delete", // buttonicon:"ui-icon-trash", // onClickButton: deleteRow, // position: "last", // title:"", // cursor: "pointer", // id:"client_delete" // } // ); }); function fun(rowId) { // var rowid = 123; 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==""){ $("#editmodlist6").remove(); $("#list6").trigger("reloadGrid"); $("#jaytab").trigger("reloadGrid"); $("#jqGrid").trigger("reloadGrid"); window.location.reload(); } else{ } } }); swal({ type: 'success', // title: 'Approved By', // html: '' + email }) }) ///alert(email); } else if (confirmMsg==false) { $("#editmodlist6").remove(); $("#list6").trigger("reloadGrid"); } } function deleteRow() { // Get the currently selected row var v=$('#delete_id').val(); if(v == 1) { var row = $("#list6").jqGrid('getGridParam','selrow'); $("#id").val(row); if( row != null ) $("#list6").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'); $("#delmodlist6").remove(); $("#list6").trigger("reloadGrid"); window.location.reload(); } else{ alert('Successfully Deleted'); $("#delmodlist6").remove(); $("#list6").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: "", }); } } $(document).ready(function (){ jQuery("#list7").jqGrid({ url:"<?php echo base_url('vendor/confirmed_po_list_spares_data')?>", datatype: "json", colNames:['Id','PO No','Product','Indent No#','Department','Quantity','Total Quantity','Unit','Received Date','Location','Preview'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'po_no',index:'po_no', width:120,editable:false}, // {name:'vendor_name',index:'vendor_name', editable:true,editrules:{required: true},width:200}, {name:'product_name',index:'product_name', editable:true,editrules:{required: true},width:120}, {name:'indent_no',index:'indent_no', editable:true,editrules:{required: true},width:120}, {name:'department',index:'department', editable:true,editrules:{required: true},width:120}, {name:'quantity',index:'quantity', width:120,editable:true,editrules:{required: true}}, {name:'total_quantity',index:'total_quantity', width:120,editable:true,editrules:{required: true}}, {name:'indent_unit',index:'indent_unit', width:200,editable:true,editrules:{required: true}}, // {name:'currency',index:'currency', editable:true,editrules:{required: true},width:200}, {name:'received_date',index:'received_date', width:142,editable:true,editrules:{required: true}}, {name:'consumed_at',index:'consumed_at', width:142,editable:true,editrules:{required: true}}, // {name:'rec_by',index:'rec_by', width:142,editable:true,editrules:{required: true}}, // { // name: 'confirm', index: 'confirm', width: 70, align: 'center', // formatter: 'checkbox', editoptions: { value: '1:0' }, // formatoptions: { disabled: false }, // cellattr: function (rowId, tv, rawObject, cm, rdata) // { // return ' onclick="fun($(this))" '; // } // }, // {name:'approved_by',index:'approved_by', width:120,editable:true,editrules:{required: true}}, // {name:'remark',index:'remark', width:120,editable:true,editrules:{required: true}}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_preview($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='PREVIEW' onclick='some_function' \>"; }}, ], height: 'auto', rowNum:50, rowTotal: 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 Stock Details", footerrow: true, loadComplete: function () { var sumOfPrice_total_quantity = jQuery("#list7").jqGrid('getCol','total_quantity',false,'sum'); jQuery("#list7").jqGrid('footerData', 'set', { quantity: 'Total:', total_quantity: sumOfPrice_total_quantity.toFixed(2) }); }, }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list7").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list7").jqGrid('navGrid','#pager7', {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" } ); // $("#list7").navButtonAdd('#pager7', // { caption:"Delete", // buttonicon:"ui-icon-trash", // onClickButton: deleteRow1, // position: "last", // title:"", // cursor: "pointer", // id:"client_delete" // } // ); }); function fun7(rowId) { // var rowid = 123; 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==""){ $("#editmodlist7").remove(); $("#list7").trigger("reloadGrid"); $("#jaytab").trigger("reloadGrid"); $("#jqGrid").trigger("reloadGrid"); window.location.reload(); } else{ } } }); swal({ type: 'success', // title: 'Approved By', // html: '' + email }) }) ///alert(email); } else if (confirmMsg==false) { $("#editmodlist7").remove(); $("#list7").trigger("reloadGrid"); } } function deleteRow1() { // Get the currently selected row var v=$('#delete_id').val(); if(v == 1) { var row = $("#list7").jqGrid('getGridParam','selrow'); $("#id").val(row); if( row != null ) $("#list7").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'); $("#delmodlist7").remove(); $("#list7").trigger("reloadGrid"); window.location.reload(); } else{ alert('Successfully Deleted'); $("#delmodlist7").remove(); $("#list7").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: "", }); } } function fun_preview(rowId) { var id = rowId.closest('tr').attr('id'); //alert(id); var as=id; var v=$('#preview_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("stock_history_details/cs_stock_preview"); ?>', data:{'id':as}, async:false, success:function() { window.location.href = '<?php echo base_url('stock_history_details/cs_stock_preview');?>/'+ '?id='+as; } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } </script> <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> <script> var form = document.getElementById('formID'); // form has to have ID: <form id="formID"> form.noValidate = true; form.addEventListener('submit', function(event) { // listen for form submitting if (!event.target.checkValidity()) { event.preventDefault(); // dismiss the default functionality alert('Please, fill the form'); // error message } }, false); </script> <script> $(document).ready(function(){ $('#min_quality').on('change keyup', function() { var sanitized = $(this).val().replace(/[^0-9]/g, ''); $(this).val(sanitized); }); }); $(document).ready(function(){ $('#customer').on('change keyup', function() { var sanitized = $(this).val().replace(/[^a-zA-Z -]+$/,''); $(this).val(sanitized); }); }); </script> <style> #list2_122_t { height:0px !important; } list2_136_t { height:12px !important; } .scroll { height:12px !important; } .ui-jqgrid-btable { } .tablediv { text-transform: uppercase !important; } .ui-jqgrid tr.jqgrow td{ text-transform: uppercase !important; } .ui-common-table { height:12px !important; } #refresh_list2 { display:none !important; } #client_edit { padding-right:18px !important; } #list2 { width: 1050px; height: 0px !important; } #gview_list2 { height: auto !important; } @media only screen and (min-width:320px) and (max-width:641px){ .ui-jqgrid { margin-left: 1px !important; } #jaytab{ margin-top: 0 !important; margin-left: 0 !important; overflow-x: scroll; width: 100% !important; padding-left: 0 !important; } #editmodlist2 { width:90% !important; } #sData span, #cData span { margin-left: 0 !important; } } @media only screen and (min-width:641px) and (max-width:991px){ .ui-jqgrid { margin-left: 1px !important; } #jaytab{ margin-top: 0 !important; margin-left: 0 !important; overflow-x: scroll; width: 100% !important; padding-left:0 !important; padding-right:9px !important; } } </style> <script> function remove() { 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(''); } </script> <style> .radio-list { margin-left: 2% !important; } @media only screen and (min-width:320px) and (min-height:640px){ #gbox_list6{ width:1052px !important; } #gview_list6{ width:100% !important; } .ui-jqgrid-hdiv{ width:100% !important; } .ui-jqgrid-htable{ width:100% !important; } #list6{ width:100% !important; } .radio-list { margin-left: 5% !important; } } </style>