EVOLUTION-NINJA
Edit File: cs_recived_details.php
<div class="page-content-wrapper"> <div class="page-content"> <h3 class="page-title">Consumables/Spares Goods Received 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="<?php echo base_url('new_stores/consumable_received_details?prop_id=1'); ?>" >Consumables and Spares </a></li> </ul> </div> <form id="land_owner" class="form-inline" enctype="multipart/form-data" method="post"> <div class="row" style="padding-bottom:15px;"> <div class="form-group col-sm-12 col-md-7"> <div class="row" style="padding-left:15px;padding-right:15px;" > <label class="col-sm-2 col-xs-4" style="width:12%;">PO. No.</label> <input type="text" class="col-sm-6 col-xs-8" name="po_no" id="po_no"> <input type="hidden" id="delete_id" class="delete_id" name="delete_id" value="<?php echo $delete_id; ?>"> <button id="search" name="search" class="btn add" style="padding:3px 24px !important;margin-left:8px">Search</button> </div> </div> </div> <!-- row 1---> <div class="row select_product"> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4 col-xs-5">PO. No.</label> <input type="text" class="col-sm-8 col-xs-7" id="po_no_id" name="po_no_id" style="text-transform: uppercase !important" readonly> <input type="hidden" class="col-sm-8 col-xs-7" name="po_id" id="po_id"> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4 col-xs-5">Purpose</label> <input type="text" class="col-sm-8 col-xs-7" id="purpose" name="purpose" style="text-transform: uppercase !important" readonly> <input type="hidden" class="col-sm-8 col-xs-7" id="invoice_no_id" name="invoice_no_id" readonly> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-5 col-xs-5">Unit / Department</label> <input type="text" class="col-sm-7 col-xs-7" style="text-transform: uppercase !important" name="department" id="department" readonly> </div> </div> <!-- row 2---> <div class="row select_product"> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4 col-xs-5">Date </label> <input type="text" class="col-sm-8 col-xs-7" name="current_date" id="current_date" readonly> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4 col-xs-5">Description</label> <input type="text" class="col-sm-8 col-xs-7" style="text-transform: uppercase !important" name="des_goods" id="des_goods"> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-5 col-xs-5" style="padding-right: 0 !important;">Received goods from M/s</label> <input type="text" class="col-sm-7 col-xs-7" style="text-transform: uppercase !important" name="rec_from" id="rec_from" readonly> </div> </div> <!-- row 3---> <div class="row select_product"> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4 col-xs-5">Received By</label> <input type="text" class="col-sm-8 col-xs-7" style="text-transform: uppercase !important" name="rec_by" id="rec_by" readonly> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4 col-xs-5">Indented By</label> <input type="text" class="col-sm-8 col-xs-7" style="text-transform: uppercase !important" name="indented_by" id="indented_by" readonly> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-5 col-xs-5">PO Approved By</label> <input type="text" class="col-sm-7 col-xs-7" style="text-transform: uppercase !important" name="po_approved_by" id="po_approved_by" readonly> </div> </div> <div class="row select_product"> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4 col-xs-5">Upload document</label> <input type="file" class="col-sm-8 col-xs-7" style="color: black;" onchange="readURL(this);" name="document" id="document" /> </div> <div class="form-group col-sm-12 col-md-4"> <img id="blah" src="#" alt="" /> </div> </div> <!--<div class="row select_product"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-4 col-xs-5">Upload document</label> <input type="file" class="col-sm-8 col-xs-7" style="color: black;" name="document" id="document" /> </div> </div>--> <br/> <div class="row land_owner_a"> <div class="col-sm-4 col-md-5"></div> <div class="col-sm-4 col-md-2" style="margin-bottom:10px;"> <button id="submit" name="submit" class="btn center-block submit pull-left">Submit</button> <!--<a href="<?php echo base_url(); ?>new_stores/consumable_received_details" class="btn default" >Cancel</a> <a href="<?php echo base_url(); ?>vendor/received_details" class="btn default" >Cancel</a> --> </div> <div class="col-sm-4 col-md-5"></div> </div> <!-- row 3---> </form> <div id="myModal" class="modal fade"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">Goods Details</h4> </div> <div class="modal-body"> <div class="row"> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label class="control-label col-md-3">Product Details :</label> <div class="col-md-7"> <input type="text" class="form-control" id="product_name" name="product_name" class="product_name" readonly> </div> </div> </div> </div> <!-- row -2--> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label class="control-label col-md-3">Ordered Quantity :</label> <div class="col-md-7"> <input type="text" class="form-control" id="rec_quantity" name="rec_quantity" class="rec_quantity" readonly> </div> </div> </div> </div> <!-- row -2--> <div class="col-md-12"> <div class="form-group"> <label class="control-label col-md-3">RECEIVED DATE :</label> <div class="col-md-7"> <input type="text" class="form-control" id="rec_date" name="rec_date" value="<?php echo date("d-m-Y");?>" > </div> </div> </div> </div> <!-- row -2--> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label class="control-label col-md-3">INVOICE # :</label> <div class="col-md-7"> <input type="text" class="form-control" id="invoice" name="invoice" > </div> </div> </div> </div> <!-- row -2--> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label class="control-label col-md-3">DATE :</label> <div class="col-md-7"> <input type="text" class="form-control" id="received_date" name="received_date" data-provide="datepicker" value="<?php echo date("d-m-Y"); ?>"> </div> </div> </div> </div> <!-- row -3--> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label class="control-label col-md-3">Received Quantity :</label> <div class="col-md-7"> <input type="text" class="form-control" id="received_quality" name="received_quality" > </div> </div> </div> </div> <!-- row -5--> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label class="control-label col-md-3">Location :</label> <div class="col-md-7" > <select class="form-control loc_drop_down" id="consumed_att" name="consumed_at" style="height:26px;" > <option value="">Select</option> <?php if(isset($consumed_at)) { foreach($consumed_at as $consumed_at) { ?> <option value="<?php echo $consumed_at->consumed_at; ?>"><?php echo $consumed_at->consumed_at; ?></option> <?php }} ?> </select> <input type="text" class="form-control loc_feild" id="consumed_at" name="consumed_at" value="<?php echo $emp_loc->location; ?>" readonly="readonly"> </div> </div> </div> </div> <!-- row -5--> <input type="hidden" class="col-sm-8 col-xs-7" name="po_id1" id="po_id1"> <input type="hidden" class="form-control" id="tr_id" name="tr_id" class="tr_id" > <input type="hidden" class="form-control" id="sum_rec_quantity" name="sum_rec_quantity" class="sum_rec_quantity" > <input type="hidden" class="form-control" id="c_val" name="c_val" class="c_val" > <!--<input type="text" class="form-control" id="shades" name="shades" class="shades" > <input type="text" class="form-control" id="width" name="width" class="width" > <input type="text" class="form-control" id="vendor_name" name="vendor_name" class="vendor_name" > <input type="text" class="form-control" id="product_name" name="product_name" class="product_name" > <input type="text" class="form-control" id="rec_quantity" name="rec_quantity" class="rec_quantity" > <input type="text" class="form-control" id="c_val" name="c_val" class="c_val" > --> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label class="control-label col-md-3">Received By :</label> <div class="col-md-7"> <input type="text" class="form-control" id="received_by" style="text-transform: uppercase !important" name="received_by" value="<?php echo $approved_by; ?>" readonly > </div> </div> </div> </div> <!-- row -5--> </div> <div class="modal-footer"> <button class="btn btn-default" data-dismiss="modal">Close</button> <button id="submit_modal" name="submit" onclick="goods_details()" class="btn btn-primary">Submit</button> </div> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div> <div class="col-sm-12"> <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> <br/><br/><br/> </div> <!-- page-content --> </div> <!-- page-content-wrapper --> <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" > <script src="<?php echo base_url(); ?>assets/js/rowedex3.min.js" type="text/javascript"></script> <style> #submit { display:none; } #jaytab { margin-bottom: 20px !important; } </style> <script> $(document).ready(function(){ $('#received_quality').on('change keyup', function() { var sanitized = $(this).val().replace(/[^0-9.]/g, ''); $(this).val(sanitized); }); }); $("#land_owner").submit(function(e) { e.preventDefault(); formdata = new FormData($(this)[0]); $.ajax({ url:"<?php echo base_url('vendor/insert_goods_data');?>", type:"POST", data: formdata, contentType: false, processData: false, success:function(data) { $('#po_no_id').val(''); $('#po_no').val(''); $('#purpose').val(''); $('#invoice_no_id').val(''); $('#current_date').val(''); $('#rec_from').val(''); $('#department').val(''); $('#quantity').val(''); $('#rate').val(''); $('#value').val(''); $('#recv_goods').val(''); $('#send_goods').val(''); $('#des_goods').val(''); $('#rec_by').val(''); $('#indented_by').val(''); $('#po_approved_by').val(''); window.location.reload(); } }); // } // else{ // swal({ // title: "Please Fill All The Fields", // 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> function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('#blah') .attr('src', e.target.result) .width(150) .height(150); }; reader.readAsDataURL(input.files[0]); } } $(document).ready(function() { $( "#po_no" ).autocomplete({ source: '<?php echo base_url('vendor/cs_received_auto_sea_pono'); ?>', }); }); $("#search").click(function(e) { e.preventDefault(); var po_no =$('#po_no').val(); po_no1=document.getElementById("po_no").value; $.ajax({ url:"<?php echo base_url('vendor/fetch_recived_data');?>", type:"POST", data: {po_no:po_no,po_no1:po_no1}, success: function (data) { var objData = jQuery.parseJSON(data); // alert(objData.recieved_by); //var obj=objData.result; $('#po_no_id').val(objData.po_no.po_no); $('#po_id').val(objData.po_no.po_id); $('#po_id1').val(objData.po_no.po_id); $('#rate').val(objData.po_no.rate_inr); $('#rec_from').val(objData.po_no.vendor_name); $('#indented_by').val(objData.po_no.indent_approved_by); $('#po_approved_by').val(objData.po_no.approved_by); $('#rec_by').val(objData.recieved_by); $('#value').val(objData.po_no.value_inr); $('#department').val(objData.result1.department); $('#quantity').val(objData.result1.quantity); $('#invoice_no_id').val(objData.invoice_no); var d = $.datepicker.formatDate('dd-mm-yy', new Date()); ///$('#current_date').val(objData.result1.department); document.getElementById('current_date').value=d; $('#purpose').val(objData.result1.purpose); grid(); } }); }); </script> <style type="text/css"> .select_product label{ background: #485b7f; color: white; height: 23px; padding-top: 2px; margin-bottom:0; } .select_product input{ background: #e8ecf2; border: transparent; height: 25px; border-bottom: 2px solid white; } @media only screen and (min-width:320px) and (max-width:640px) { .add{ margin-left: 40%; margin-top: 10px; } } </style> <!-- 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'); ?>" /> <style type="text/css"> #pager2 { width:1052px !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; } .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; } .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; } .form-control { height: 29px !important; margin-bottom: 14px; } #search_list2 { display:none; } </style> <script> $(function () { $("#received_date").datepicker({ dateFormat: "dd/mm/yy", changeMonth: true, changeYear: true }); }); </script> <script> function grid(){ var l=$("#po_id").val(); var lr=$("#po_no").val(); var ll; jQuery("#list2").jqGrid({ url:"<?php echo base_url('vendor/vendor_goods_details');?>/s"+l+"/"+lr+"/", //url:"<?php echo base_url('vendor/vendor_goods_details')?>/s"+l+"/", datatype: "json", colNames:['Id','Indent No','Product Name','Quantity','Unit','Rate','INR','Approved','Action'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'indent_no',index:'indent_no',editable:false,width:140}, {name:'product_name',index:'product_name',editable:false,width:250}, {name:'quantity',index:'quantity',editable:false,width:100}, {name:'indent_unit',index:'indent_unit',editable:false,width:100}, {name:'rate',index:'rate',editable:true,editrules:{required: true, number: true}, width:100}, {name:'inr',index:'inr',editable:true,editrules:{required: true,number: true}, width:100}, { name: 'quantity_approval', index: 'quantity_approval', width: 60, align: 'center', formatter: 'checkbox', editoptions: { value: '1:0' }, formatoptions: { disabled: true }, }, {name:'modal',index:'modal',editable:false,editrules:{required: true}, width:120,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='Add Stock' onclick='some_function' style='margin-left:30px'\>"; } }, ], rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, pager: '#pager2', sortname:'id', viewrecords: true, loadonce:true, gridview: true, onSelectRow: function(id){ if(id && id!==ll){ jQuery('#list2').jqGrid('restoreRow',ll); jQuery('#list2').jqGrid('editRow',id,true); function editRow(id) { if (id && id !== lastSelection) { var grid = $("#jqGrid"); grid.jqGrid('restoreRow',lastSelection); var editParameters = { keys: true, successfunc: editSuccessful, errorfunc: editFailed }; grid.jqGrid('editRow',id, editParameters); lastSelection = id; } } function editSuccessful() { console.log("success"); } function editFailed() { console.log("fail"); } ll=id; } }, editurl: "<?php echo base_url('vendor/edit_received_goods_details');?>", sortorder:"desc", caption:"Delivery Confirmation 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/cs_goods_details_subgrid');?>/s"+row_id+"/", //data:{'sub_id':123}, mtype : "get", datatype: "json", colNames:['Id','Received Date','Invoice','Date','Received Quantity','Location','Received By','Delete'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true}, {name:'rec_date',index:'rec_date', width:120,editable:true,editrules:{required: true}}, {name:'invoice',index:'invoice', width:120,editable:true,editrules:{required: true}}, {name:'received_date',index:'received_date', editable:true,editrules:{required: true},width:125}, {name:'received_quality',index:'received_quality', width:120,editable:true,editrules:{required: true}}, {name:'consumed_at',index:'consumed_at', width:120,editable:true,editrules:{required: true}}, {name:'rec_by',index:'rec_by', width:173,editable:false}, {name:'',index:'',align: "center",editable:false,editrules:{required: true}, width:187,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_delete($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' class='fa fa-eye' value='DELETE' \>"; }}, ], height: 'auto', rowNum:20000000000000000, sortname: 'num', sortorder: "asc" }); } }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list2").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list2").jqGrid('navGrid','#pager2', {edit:false,add:false,del:false,search:true,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true, multipleGroup:true, caption:"search" } ); // $("#list2").navButtonAdd('#pager2', // { caption:"Delete", // buttonicon:"ui-icon-trash", // onClickButton: deleteRow, // position: "last", // title:"", // cursor: "pointer", // id:"client_delete" // } // ); } 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_spares"); ?>', 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(rowId) { var id = rowId.closest('tr').attr('id'); // alert(id); $('#tr_id').val(id); $.ajax({ url:"<?php echo base_url('vendor/receive_cs_quantity')?>", type:"POST", data:{'id':id}, success:function(data){ var objData = jQuery.parseJSON(data); obj=objData.quantity; objj=objData.sum_quantity; objl=objData.location; obj1=objData.c_val; obj_emp=objData.emp_loc; var l='PEENYA - DYEING'; //alert(l); //alert(objl.consumed_at); document.getElementById("rec_quantity").value =obj.quantity; document.getElementById("rec_quantity").value+=' '+obj.indent_unit; document.getElementById("product_name").value =obj.product_name; document.getElementById("c_val").value =obj1; document.getElementById("sum_rec_quantity").value =objj.received_quality; // var b=objl.consumed_at; // if(b != 'undefined') // { // document.getElementById("consumed_at").value =objl.consumed_at; // } if(obj_emp.location == '') { $('.loc_feild').hide(); $('.loc_drop_down').show(); } else { $('.loc_feild').val(obj_emp.location); $('.loc_drop_down').hide(); } $('#myModal').modal('toggle'); } }); } function deleteRow() { // Get the currently selected row 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/receive_details_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(); } </script> <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" > <script type="text/javascript"> function goods_details() //$("#submit").click(function(e) { var rec_date =$('#rec_date').val(); var invoice =$('#invoice').val(); var received_date =$('#received_date').val(); var po_id1 =$('#po_id1').val(); var at =$('#consumed_at').val(); var att =$('#consumed_att').val(); if(at == '') { var consumed_at=att; } else { var consumed_at=at; } var tr_id =$('#tr_id').val(); var received_by =$('#received_by').val(); var received_quality =$('#received_quality').val(); var rec_quantity =$('#rec_quantity').val(); var sum_rec_quantity =$('#sum_rec_quantity').val(); var c_val =$('#c_val').val(); var c=parseFloat(c_val); var r=parseFloat(received_quality); //if(r <= c) //{ if(rec_date != '' && invoice != '' && received_date != '' && received_by != '' && received_quality != '') { $.ajax({ url:"<?php echo base_url('vendor/add_cs_goods_details');?>", type:"POST", data:{'po_id1':po_id1,'received_quality':received_quality,'received_date':received_date,'invoice':invoice,'rec_date':rec_date,'consumed_at':consumed_at,'received_by':received_by,'tr_id':tr_id}, async:false, success:function(data) { swal({ title: "Successfully Added", text: "",}); $('#invoice').val(''); //$('#received_date').val(''); $('#consumed_at').val(''); $('#tr_id').val(''); $('#received_quality').val(''); $('#myModal').modal('toggle'); $('#submit').show(); $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } }); } else{ swal({ title: "Please Fill All The Fields", text: "", }); } // } //else{ // swal({ // title: "Received Quantity is Exceeded", // text: "", // }); //} } </script> <style> .page-content { min-height:900px !important; } .ui-jqgrid-bdiv { height: auto !important; width: 1040px; overflow-y: scroll; } #ui-id-1 { min-height:auto; max-height:300px; overflow-y:scroll; } #list2_122_t { height:0px !important; } list2_136_t { height:12px !important; } .scroll { height:12px !important; } .ui-jqgrid-btable { } .ui-common-table { height:12px !important; } #refresh_list2 { display:none !important; } #client_edit { padding-right:12px !important; } #list2 { width: 1050px; height: 0px !important; } #gbox_list2 { margin-bottom: 20px !important; 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; } } .ui-jqgrid { text-transform: capitalize !important; } .tablediv { text-transform: uppercase !important; } .ui-jqgrid tr.jqgrow td{ text-transform: uppercase !important; } #sData span, #cData span { margin-left: 3px; } #sData { height: 29px; } #cData { height: 29px; } .jqgfirstrow { height: 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>