EVOLUTION-NINJA
Edit File: transaction_mstr_details.php
<style> .ui-jqgrid { text-transform: capitalize !important; } .tablediv { text-transform: uppercase !important; } .ui-jqgrid tr.jqgrow td{ text-transform: uppercase !important; } </style> <?php //include("menu.php"); ?> <!-- BEGIN CONTENT --> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <h3 class="page-title"> Transaction Input details </h3> <div class="page-bar"> <ul class="page-breadcrumb"> <li><i class="fa fa-home"></i> <a href="https://swansilk.co/decotextil/dashboard/dashboard_fun">Home</a> <i class="fa fa-angle-right"></i> <a href="#" > Transaction Input details </a></li> </ul> </div> <?php if(empty($access_row)) { } else { if($access_row->insert_id == '1') { ?> <form action="<?php echo base_url(); ?>marketing/transactions_order_input_demo" method="post" class="form-horizontal"> <b>To insert data click here:</b> <input type="hidden" value="<?php echo $url_val; ?>" id="url_reference_val" name="url_reference_val" style="width: 230px;" > <input type="submit" name="Insert" value="Insert" /> <input type="button" name="Insert" data-toggle="modal" data-target="#delivery_date_Modal" value="Select" /> <input type="button" name="changedelivery" value="Change Delievery/Ship Window" onclick="change_delievery()"/> </form> <?php } else { ?> <?php } }?> <input type="hidden" id="pay_id" class="pay_id" value="<?php if(empty($access_row)){ } else { echo $access_row->pay_id; } ?>" > <input type="hidden" id="unpay_id" class="unpay_id" value="<?php if(empty($access_row)){ } else { echo $access_row->unpay_id; } ?>" > <input type="hidden" id="hhh_id" > <input type="button" name="co" value="Proforma" onclick="fun_preview1()"/> <input type="button" name="co" value="Order Confirmation" onclick="fun_preview2()"/> <input type="button" name="co" value="Order Details" onclick="fun_preview3()"/> <input type="button" name="co" onclick="recent_shipment()" value="Recent Shipment" /> <input type="button" name="co" onclick="dtl_shipment()" value="DTL Shipment" /> <input type="button" name="co" onclick="buyer()" value="DTL Fabric Stock " /> <input type="button" name="co" onclick="customer()" value="Buyer Fabric Stock " /> <input type="button" name="co" value="Production Status" onclick="pro_stat()"/> <input type="button" name="co" value="Product List" onclick="()"/> <input type="button" name="co" value="Adv Payment" onclick="payments()"/> <input type="button" name="co" value="Dyeing" onclick="deying()"/> <input type="button" name="co" value="Issue To Loom" onclick="issued_to_loom()"/> <input type="button" name="co" value="Fabric Inspect" onclick="inspected_fabric()"/> <input type="button" name="co" value="Madeups Issues" onclick="madeups_report()"/> <input type="button" name="co" value="Material List" onclick="()"/> <input type="button" name="co" value="Full Order Details" onclick="order_details()"/> <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="insert_id" class="insert_id" value="<?php if(empty($access_row)){ } else { echo $access_row->insert_id; } ?>" > <input type="hidden" id="preview_id" class="preview_id" value="<?php if(empty($access_row)){ } else { echo $access_row->preview_id; } ?>" > <input type="hidden" id="edit_id" class="edit_id" value="<?php if(empty($access_row)){ } else { echo $access_row->edit_id; } ?>" > <input type="hidden" id="approval_id" class="approval_id" value="<?php if(empty($access_row)){ } else { echo $access_row->approval_id; } ?>" > <!-- END PAGE HEADER--> <!-- BEGIN DASHBOARD STATS --> <!-- Modal --> <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Adv Payments details</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <form class="payment_details"> <div class="modal-body"> <table border="1" style="width:100%;border-spacing:0;margin-top: 1%;" cellpadding="5px"> <thead> <thead> <tr> <th>Invoice No</th> <th><input type="text" name="invoice_no" readonly class="form-control invoice_no" required="required"></th> </tr> <tr> <th>Invoice Value</th> <input type="hidden" name="id" id="ids_updates" readonly class="form-control"> <th><input type="text" name="invoice_value" readonly class="form-control invoice_value" required="required"></th> </tr> <tr> <th>Currency</th> <th><input type="text" name="currency" readonly class="currency form-control" required="required"></th> </tr> <tr> <th>Received Date</th> <th><input type="text" name="received_date" id="datepicker" readonly style="background-color: white;" class=" form-control" required="required"></th> </tr> <tr> <th>Adv Amount Received</th> <th><input type="text" name="amount_received" onkeypress="if ( isNaN(this.value + String.fromCharCode(event.keyCode) )) return false;" class="amount_received form-control"> </th></th> </tr> <tr> <th>Bank Charges</th> <th><input type="text" name="bank_charged" onkeypress="if ( isNaN(this.value + String.fromCharCode(event.keyCode) )) return false;" class="bank_charged form-control" required="required"></th> </tr> <tr> <th>Bank Realisation Rate</th> <th><input type="text" name="bank_realisation_rate" onkeypress="if ( isNaN(this.value + String.fromCharCode(event.keyCode) )) return false;" class="bank_realisation_rate form-control"></th> </tr> <tr> <th>Bank Reference</th> <th><input type="text" name="bank_reference" class="bank_reference form-control"></th> </tr> <tr> <th>INR Value</th> <th><input type="text" readonly name="inr_value" onkeypress="if ( isNaN(this.value + String.fromCharCode(event.keyCode) )) return false;" class="inr_value form-control"></th> </tr> <tr> <th>Remark</th> <th><textarea name="remark" class="remark form-control"></textarea> </th> </tr> <tr> <th>Created at</th> <th><input type="text" name="created" value="<?php echo date('d-m-Y');?>" class="created form-control"></th> </tr> <tr> <th>Approved By</th> <?php $id=$this->session->userdata('logged_in'); $data['approved_by']=$id['username']; ?> <th><input type="text" readonly name="user_name" value="<?php echo $data['approved_by'];?>" class="user_name form-control"></th> <input type="hidden" readonly name="customer_id" class="customer_id form-control"> <input type="hidden" readonly name="invoice_date" class="invoice_date form-control"> </tr> </thead> </table> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> <button type="submit" class="btn btn-primary submit">Save changes</button> </div> </form> </div> </div> </div> <!--------------------------------------------------------------------------> <!-- Modal --> <div class="modal fade" id="view_payment_details" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Adv Payments details</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <form class="payment_details"> <div class="modal-body"> <table border="1" style="width:100%;border-spacing:0;margin-top: 1%;" cellpadding="5px"> <thead> <thead> <tr> <th>Invoice No</th> <th><input type="text" name="invoice_no" readonly class="form-control invoice_no1" required="required"></th> </tr> <tr> <th>Invoice Value</th> <input type="hidden" name="id" id="ids_updates" readonly class="form-control"> <th><input type="text" name="invoice_value" readonly class="form-control invoice_value1" required="required"></th> </tr> <tr> <th>Currency</th> <th><input type="text" name="currency" readonly class="currency1 form-control" required="required"></th> </tr> <tr> <th>Received Date</th> <th><input type="text" name="received_date" readonly style="background-color: white;" class="form-control received_date1" required="required"></th> </tr> <tr> <th>Adv Amount Received</th> <th><input type="text" name="amount_received" readonly class="amount_received1 form-control"> </th></th> </tr> <tr> <th>Bank Charged</th> <th><input type="text" name="bank_charged" readonly class="bank_charged1 form-control" required="required"></th> </tr> <tr> <th>Bank Realisation Rate</th> <th><input type="text" name="bank_realisation_rate" readonly class="bank_realisation_rate1 form-control"></th> </tr> <tr> <th>Bank Reference</th> <th><input type="text" name="bank_reference1" readonly class="bank_reference1 form-control"></th> </tr> <tr> <th>INR Value</th> <th><input type="text" readonly name="inr_value" readonly class="inr_value1 form-control"></th> </tr> <tr> <th>Remark</th> <th><textarea name="remark" class="remark1 form-control" readonly></textarea> </th> </tr> <tr> <th>Created at</th> <th><input type="text" name="created" readonly class="created1 form-control"></th> </tr> <tr> <th>Approved By</th> <th><input type="text" readonly name="user_name" readonly class="user_name1 form-control"></th> </tr> </thead> </table> </div> </form> </div> </div> </div> <!--------------------------------------------------------------------------------> <!------------------------------------------------------------------------------> <!-- Modal --> <!--<div class="caption"> <i class="fa fa-globe" style="border:1px solid"></i>Transaction Input details </div>--> <!--<a href="javascript:;" class="reload"> </a>--> <input type="hidden" value="<?php echo $ref; ?>" id="ref_id" > <input type="hidden" value="<?php echo $url_val; ?>" id="url_ref" style="width: 230px;" > <div 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> <!-- END DASHBOARD STATS --> </div> </div> </div> <!-- Modal --> <div id="delivery_date_Modal" class="modal fade"> <div class="modal-dialog"> <div class="modal-content" class="workorder_application"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">Choose Delivery Date</h4> </div> <div class="modal-body"> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label class="control-label col-md-3">From Date :</label> <div class="col-md-7"> <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> <!-- row -2--> <br/> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label class="control-label col-md-3">To Date :</label> <div class="col-md-7"> <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> <!-- row -2--> </div> <div class="modal-footer"> <button class="btn btn-default" data-dismiss="modal">Close</button> <button id="delivery_submit_modal" name="submit" onclick="delievry_submit_button()" class="btn btn-primary">Submit</button> </div> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div> <!-- End BEGIN CONTAINER --> <div id="change_delivery_date_Modal" class="modal fade"> <div class="modal-dialog"> <div class="modal-content" class="workorder_application"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">Choose Delivery Date</h4> </div> <div class="modal-body"> <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 input-group openDatePicker change_del_date" name="change_del_date" id="change_del_date" data-provide="datepicker"> <input type="hidden" id="user_ref_id" > </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">Ship Window Start Date :</label> <div class="col-md-7"> <input type="text" class="form-control input-group openDatePicker change_ship_start_date" name="change_ship_start_date" id="change_ship_start_date" data-provide="datepicker"> </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">Ship Window End Date :</label> <div class="col-md-7"> <input type="text" class="form-control input-group openDatePicker change_ship_end_date" name="change_ship_end_date" id="change_ship_end_date" data-provide="datepicker"> </div> </div> </div> </div> <!-- row -2--> </div> <!-- row -2--> <br/> <div class="modal-footer"> <button class="btn btn-default" data-dismiss="modal">Close</button> <button id="" name="submit" onclick="change_del_submit()" class="btn btn-primary">Submit</button> </div> </div> </div> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div> <!-- BEGIN FOOTER --> <!-- BEGIN FOOTER --> <link rel="stylesheet" href="<?php echo base_url('assets/css/code_jquery.min.css');?>"> <script src="<?php echo base_url('assets/js/jquery-ui.min.js'); ?>" type="text/javascript"></script> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/jquery-ui.min.css'); ?>" /> <script> //$( document ).ready(function() { // $(".to_delivery_date_required_on").datepicker({ // dateFormat: "dd-mm-yy", // changeMonth: true, // changeYear: true // }); //}); //$( document ).ready(function() { // $(".from_delivery_date_required_on").datepicker({ // dateFormat: "dd-mm-yy", // changeMonth: true, // changeYear: true // }); //}); $(function(){ $(".from_delivery_date_required_on").datepicker({ dateFormat: 'dd-mm-yy', }).on('changeDate', function(ev){ $('.from_delivery_date_required_on').datepicker('hide'); }); }); $(function(){ $(".change_del_date").datepicker({ dateFormat: 'dd-mm-yy', }).on('changeDate', function(ev){ $('.change_del_date').datepicker('hide'); }); $(".change_ship_start_date").datepicker({ dateFormat: 'dd-mm-yy', }).on('changeDate', function(ev){ $('.change_ship_start_date').datepicker('hide'); }); $(".change_ship_end_date").datepicker({ dateFormat: 'dd-mm-yy', }).on('changeDate', function(ev){ $('.change_ship_end_date').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, }); }); function delievry_submit_button() { var from_required_on =$('#from_delivery_date_required_on').val(); var to_required_on =$('#to_delivery_date_required_on').val(); $.ajax({ url:"<?php echo base_url('marketing/transaction_details');?>", type:"POST", data:{'from_required_on':from_required_on,'to_required_on':to_required_on}, async:false, success:function(data) { window.location.href="<?php echo base_url('marketing/delivery_date_transaction_details'); ?>" } }); } $(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_approved_indent { display:none; } #refresh_list3 { display:none !important; } @media only screen and (min-width:320px) and (max-width:640px) { } </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; } }); } $(".amount_received").keyup(function(){ var val = this.value; var re = /^([0-9]+[\.]?[0-9]?[0-9]?|[0-9]+)$/g; var re1 = /^([0-9]+[\.]?[0-9]?[0-9]?|[0-9]+)/g; if (re.test(val)) { //do something here } else { val = re1.exec(val); if (val) { this.value = val[0]; } else { this.value = ""; } } }); $(".bank_charged").keyup(function(){ var val = this.value; var re = /^([0-9]+[\.]?[0-9]?[0-9]?|[0-9]+)$/g; var re1 = /^([0-9]+[\.]?[0-9]?[0-9]?|[0-9]+)/g; if (re.test(val)) { //do something here } else { val = re1.exec(val); if (val) { this.value = val[0]; } else { this.value = ""; } } }); $('#datepicker').datepicker({ changeMonth:true, changeYear:true, yearRange: "2000:2030", // dateFormat: 'yy-mm-dd' dateFormat: 'dd-mm-yy' }); $(".bank_realisation_rate,.amount_received").focusout(function(){ var amount_received=$('.amount_received').val(); var bank_realisation_rate=$('.bank_realisation_rate').val(); if(amount_received!='' && bank_realisation_rate!=''){ var final=parseFloat(amount_received)*parseFloat(bank_realisation_rate); var fixed=final.toFixed(2); $('.inr_value').val(fixed); } }); $('.payment_details').submit(function(e){ e.preventDefault(); $(".submit").attr('disabled', 'disabled'); $(".submit").text("Submitting..."); formdata = new FormData($(this)[0]); $.ajax({ type : 'post', url : '<?php echo site_url('quality_check/add_payment_yes_confirmation');?>', data : formdata, contentType: false, processData: false, success:function(response){ response=jQuery.parseJSON(response); console.log(response); if(response.result==1) { $('.payment_details')[0].reset(); $('#exampleModal').modal('hide'); swal({ title: "Successfully Added", text: "", }); $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $(".submit").text("Submit"); $(".submit").removeAttr('disabled'); } else { swal({ title: "Fail To add, Try Again", text: "", }); $(".submit").text("Submit"); $(".submit").removeAttr('disabled'); } } }); }); function approve_payment_fun(rowId) { var v=$('#pay_id').val(); if(v == 1) { var id = rowId.closest('tr').attr('id'); var as=id; $.ajax({ type:'post', url:'<?php echo base_url("quality_check/fetch_order_dtls"); ?>', data:{'as':as}, async:false, success: function (data) { var objdata = jQuery.parseJSON(data); var invoice_num= objdata.invoice_no; var customerID=objdata.fileNo; var fetch_res= objdata.confirm_status; var total_value=objdata.invoice_value; var currency=objdata.currency; var pay=objdata.adv_pay_stat; if(pay==1){ var id = rowId.closest('tr').attr('id'); //alert(id); var confirmMsg= confirm("This Invoice Is Already Payed. Do You Want To Unpayed This!"); if (confirmMsg==true) { var c=$('#unpay_id').val(); if(c == 1) { $.ajax({ url:"<?php echo base_url('quality_check/add_pay_no_confirmation')?>", type:"POST", data:{'id':id}, success:function(data){ $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } }); } else { swal({ title: "You Don't Have Access For To UnCheck This Payment", text: "", }); $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } else if (confirmMsg==false) { $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } } else { if(fetch_res == 'CONFIRMED') { var id = rowId.closest('tr').attr('id'); //alert(id); var confirmMsg= confirm("Do You Want To Confirm This Payment!"); if (confirmMsg==true) { $('#exampleModal').modal('show'); $('#ids_updates').val(id); $('.invoice_no').val(invoice_num); $('.customer_id').val(customerID); // $('.invoice_date').val(sys_date); $('.invoice_value').val(total_value); $('.currency').val(currency); } else if (confirmMsg==false) { $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } } else{ swal({ title: "Plese Confirm The Order", text: "", }); } } } }); } else { $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); swal({ title: "You Don't Have Acces To Approve This", text: "", }); $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } } </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"> .ss{ padding-right: 0 !important; padding-left: 0 !important; } label { font-weight: normal; text-align: left; } .hr-line{ border-top: 1px solid #465A81; } .well-sm { padding: 3px !important; border-radius: 0px !important; } input[type="file"] { padding-bottom: 28px !important; height: 25px !important; color:transparent; } .portlet.box.blue-madison { border: 1px solid #fff !important; border-top: 0; background:#fff !important; } input[type=file] { display: none; } .ui-jqgrid .ui-jqgrid-caption { text-align: left; background: rgb(72,91,127); color: white; } .ui-jqdialog .ui-jqdialog-titlebar { padding: .1em .1em; min-height: 35px; background: rgb(72,91,127); color: white; } .ui-jqdialog .ui-jqdialog-titlebar-close span { display: block; margin: -9px; } #sData { height: 27px; } #cData { height: 27px; } #dData { height: 27px; } #eData { height: 27px; } .coledit { cursor:pointer; padding-right: 22px !important; padding-left: 23px !important; margin-top: 4px !important; color:bold !important; } .ui-jqgrid .ui-jqgrid-bdiv { overflow:hidden; } .col_delete { padding-left:8px !important; padding-right:7px !important; padding-bottom: 6px !important; } .col_pre { display: inline; padding-left: 32px !important; padding-right: 33px !important; margin-top:5px !important; padding-bottom: 6px !important; } </style> <style> .col_delete { display: initial !important; padding-left: 6px !important; padding-right: 11px !important; padding-bottom: 6px !important; } </style> <!-----------------datepicker-------------> <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 --> <script> $(document).ready(function (){ var l=$("#ref_id").val(); //alert(l); jQuery("#list2").jqGrid({ url:"<?php echo base_url('marketing/getorder_details')?>/s"+l+"/", mtype : "post", datatype: "json", colNames:['Id','Select','OSL No','Orders Type','File No', 'Mode Of Order', 'Party Order No','Delivery Date','Total Value','Adv Payment','Currency','INR','PI#','Status','Plan status','Shipping Status'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, { name: 'select', width:20,align: 'center',cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_radio_val($(this))" '; }, formatter: function radio(cellValue, option) { return '<input type="radio" name="radio_' + option.id + '" />'; } }, {name:'oslNo',index:'oslNo', width:50,editable:true,width:100}, {name:'orders_Type',index:'orders_Type', width:50,editable:true,width:100}, {name:'fileNo',index:'fileNo',editable:true, width:100}, {name:'orderMode',index:'orderMode',editable:true,editrules:{required: true},editoptions: {size:10, maxlength: 10}, width:100}, {name:'orderNo',index:'orderNo',edittype:'text',editable:true,editrules:{required: true}, width:100}, {name:'deliveryDate',index:'deliveryDate',edittype:'text', width:100,editrules:{required: true},formatter: 'date', formatoptions: { newformat: 'd-m-Y'}}, {name:'totalValue',index:'totalValue',edittype:'text',editable:true,editrules:{required: true}, width:100}, {name: 'adv_pay_stat', index: 'adv_pay_stat', width: 110, align: 'center', formatter: 'checkbox', editoptions: { value: '1:0' }, formatoptions: { disabled: false}, cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="approve_payment_fun($(this))" '; } }, {name:'currency',index:'currency',edittype:'text',editable:true,editrules:{required: true}, width:100}, {name:'indian',index:'indian',edittype:'text',editable:true,editrules:{required: true}, width:100}, {name:'invoice_no',index:'invoice',edittype:'text',editable:true,editrules:{required: true}, width:100}, {name:'confirm_status',index:'confirm_status',edittype:'text',editable:true,editrules:{required: true}, width:100}, {name:'planningStatus',index:'planningStatus',edittype:'text',editable:true,editrules:{required: true}, width:100}, {name: 'shipped_fun', index: 'shipped_fun', width:55, align: 'center'}, ], 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:"desc", //multiple: true, loadonce:true, caption:"Transactions Order Details", footerrow: true, loadComplete: function () { var sumOfTotalvalues = jQuery("#list2").jqGrid('getCol','totalValue',false,'sum'); var sumOfindian = jQuery("#list2").jqGrid('getCol','indian',false,'sum'); sumOfindian = '₹ '+ (sumOfindian.toFixed(2)); jQuery("#list2").jqGrid('footerData', 'set', { deliveryDate: 'Total:', totalValue: sumOfTotalvalues.toFixed(2),indian:sumOfindian }); }, subGrid: true, subGridRowExpanded: function(subgrid_id, row_id) { // we pass two parameters // subgrid_id is a id of the div tag created within a table // the row_id is the id of the row // If we want to pass additional parameters to the url we can use // the method getRowData(row_id) - which returns associative array in type name-value // here we can easy construct the following 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('marketing/subgrid');?>/s"+row_id+"/", //data:{'sub_id':123}, mtype : "get", datatype: "json", colNames: ['Id','Article No','Unit','Width','Sub Order Type','Description','Total Quantity','Total Value','Created By','Order Confirm','Confirm By','Edit','Delete'], colModel: [ {name:'id',index:'id',hidden:true, width:50,editable:true,width:20}, {name:'articleNo',index:'articleNo', width:70,height:12}, //{name:'buyerShade',index:'buyerShade', width:80,height:12}, {name:'unit',index:'unit', width:60,height:12}, {name:'width',index:'width', width:100,height:12}, {name:'subOrderType',index:'subOrderType', width:165,height:12}, {name:'description',index:'description', width:200,height:12}, {name:'totalQuantity',index:'totalQuantity', width:100,height:12}, {name:'totalValue',index:'totalValue', width:100,height:12}, {name:'created_by',index:'created_by', width:90,height:12}, { name: 'orderConfirm', index: 'orderConfirm', width:80, align: 'center', formatter: 'checkbox', editoptions: { value: '1:0' }, formatoptions: { disabled: false }, cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun($(this))" '; } }, {name:'confirm_by',index:'confirm_by', width:90,height:12}, {name:'edit',index:'edit',align: "center",editable:false,editrules:{required: true}, width:100,editable: true, formatter:vehicalFmatter,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_edit($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' id='edit_before_planned' value='EDIT' \>"; }}, {name:'delete',index:'delete',align: "center",editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_delete($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='DELETE' \>"; }}, ], height: 'auto', rowNum:20000000, sortname: 'num', sortorder: "asc" }); } }); $("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required $("#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:"Edit", buttonicon:"ui-icon-pencil", onClickButton: editRow, position: "last", title:"", cursor: "pointer", id:"client_edit" } );*/ $("#list2").navButtonAdd('#pager2', { caption:"Delete", buttonicon:"ui-icon-trash", onClickButton: deleteRow, position: "last", title:"", cursor: "pointer", id:"client_delete" } ); }); function vehicalFmatter (cellvalue, options, rowObject) { a } function fun_radio_val(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var m=$('#hhh_id').val(as); var n=$('#ref_id').val(as); } function change_delievery() { // var id = rowId.closest('tr').attr('id'); var as=$('#hhh_id').val(); var v=$('#edit_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("marketing/fetch_change_date_id"); ?>', data:{'as':as}, async:false, success: function (data) { var objData = jQuery.parseJSON(data); $('#user_ref_id').val(as); $('#change_del_date').val(objData.del_date); $('#change_ship_start_date').val(objData.ship_window_start); $('#change_ship_end_date').val(objData.ship_window_end); $('#change_delivery_date_Modal').modal('show'); } }); } else { swal({ title: "You Don't Have Access For This Edit", text: "", }); } } function change_del_submit() { var ref_id=$('#user_ref_id').val(); var del_date=$('#change_del_date').val(); var change_ship_start_date = $('#change_ship_start_date').val(); var change_ship_end_date = $('#change_ship_end_date').val(); $.ajax({ type:'post', url:'<?php echo base_url("marketing/change_date"); ?>', data:{'ref_id':ref_id,'del_date':del_date,'change_ship_start_date':change_ship_start_date,'change_ship_end_date':change_ship_end_date}, async:false, success:function() { $('#change_delivery_date_Modal').modal('hide'); $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } }); } 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("marketing/edit_form"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); //alert(url_r); if(url_r == '1') { //window.location.href = '<?php echo base_url('marketing/edit_form');?>/'+ '?id='+as; window.open('<?php echo base_url('marketing/edit_form');?>/'+ '?id='+as,'_blank'); } else if(url_r == '2') { //window.location.href = '<?php echo base_url('marketing/edit_marketing_form');?>/'+ '?id='+as; window.open('<?php echo base_url('marketing/edit_marketing_form');?>/'+ '?id='+as,'_blank'); } else if(url_r == '3') { //window.location.href = '<?php echo base_url('marketing/edit_transaction_form');?>/'+ '?id='+as; window.open('<?php echo base_url('marketing/edit_transaction_form');?>/'+ '?id='+as,'_blank'); } else if(url_r == '4') { //window.location.href = '<?php echo base_url('marketing/marketing_edit_form');?>/'+ '?id='+as; window.open('<?php echo base_url('marketing/marketing_edit_form');?>/'+ '?id='+as,'_blank'); } } }); } else { swal({ title: "You Don't Have Access For This Edit", text: "", }); } } function fun_delete(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#delete_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("marketing/delete_form"); ?>', data:{'as':as}, async:false, success: function (data) { //alert(data); var objData = jQuery.parseJSON(data); if(objData == 'not_deleted') { swal({ title: "This Shade Details Is Already Planned, U Can't Delete It", text: "", }); } else { $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } } }); } else { swal({ title: "You Don't Have Access For This Edit", text: "", }); } } function fun_preview3() { //var id = rowId.closest('tr').attr('id'); var as=$('#hhh_id').val(); var v=$('#preview_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("marketing/orderinput"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); if(url_r == '1') { // window.location.href = '<?php echo base_url('marketing/orderinput');?>/'+ '?id='+as; window.open('<?php echo base_url('marketing/orderinput');?>/'+ '?id='+as,'_blank'); } else if(url_r == '2') { // window.location.href = '<?php echo base_url('marketing/orderinput_preview');?>/'+ '?id='+as; window.open('<?php echo base_url('marketing/orderinput_preview');?>/'+ '?id='+as,'_blank'); } else if(url_r == '3') { //window.location.href = '<?php echo base_url('marketing/order_input');?>/'+ '?id='+as; window.open('<?php echo base_url('marketing/order_input');?>/'+ '?id='+as,'_blank'); } else if(url_r == '4') { //window.location.href = '<?php echo base_url('marketing/order_input_preview');?>/'+ '?id='+as; window.open('<?php echo base_url('marketing/order_input_preview');?>/'+ '?id='+as,'_blank'); } } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } function fun_preview1() { //var id = rowId.closest('tr').attr('id'); var as=$('#hhh_id').val(); var v=$('#preview_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("marketing/preview"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); if(url_r == '1') { //window.location.href = '<?php echo base_url('marketing/preview');?>/'+ '?id='+as; window.open('<?php echo base_url('marketing/preview');?>/'+ '?id='+as,'_blank'); } else if(url_r == '2') { //window.location.href = '<?php echo base_url('marketing/performa_invoice_preview');?>/'+ '?id='+as; window.open('<?php echo base_url('marketing/performa_invoice_preview');?>/'+ '?id='+as,'_blank'); } else if(url_r == '3') { // window.location.href = '<?php echo base_url('marketing/performa_invoice');?>/'+ '?id='+as; window.open('<?php echo base_url('marketing/performa_invoice');?>/'+ '?id='+as,'_blank'); } else if(url_r == '4') { // window.location.href = '<?php echo base_url('marketing/performa_invoice_view');?>/'+ '?id='+as; window.open('<?php echo base_url('marketing/performa_invoice_view');?>/'+ '?id='+as,'_blank'); } } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } function fun_preview2() { //var id = rowId.closest('tr').attr('id'); var as=$('#hhh_id').val(); var v=$('#preview_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("marketing/orederconfirmation"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); if(url_r == '1') { //window.location.href = '<?php echo base_url('marketing/orederconfirmation');?>/'+ '?id='+as; window.open('<?php echo base_url('marketing/orederconfirmation');?>/'+ '?id='+as,'_blank'); } else if(url_r == '2') { // window.location.href = '<?php echo base_url('marketing/order_confirm_preview');?>/'+ '?id='+as; window.open('<?php echo base_url('marketing/order_confirm_preview');?>/'+ '?id='+as,'_blank'); } else if(url_r == '3') { //window.location.href = '<?php echo base_url('marketing/order_confirmation_preview');?>/'+ '?id='+as; window.open('<?php echo base_url('marketing/order_confirmation_preview');?>/'+ '?id='+as,'_blank'); } else if(url_r == '4') { //window.location.href = '<?php echo base_url('marketing/order_confirm');?>/'+ '?id='+as; window.open('<?php echo base_url('marketing/order_confirm');?>/'+ '?id='+as,'_blank'); } } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } function fun(rowId) { var v=$('#approval_id').val(); if(v == 1) { var id = rowId.closest('tr').attr('id'); //alert(id); var confirmMsg= confirm("Do You Want To Confirm!"); if (confirmMsg==true) { $.ajax({ url:"<?php echo base_url('marketing/add_confirmation')?>", type:"POST", data:{'id':id}, success:function(data){ if(data==""){ $("#editmodlist2").remove(); $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } else{ } } }); } else if (confirmMsg==false) { $.ajax({ url:"<?php echo base_url('marketing/add')?>", type:"POST", data:{'id':id}, success:function(data){ if(data==""){ $("#editmodlist2").remove(); $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } else{ } } }); } } else { swal({ title: "You Don't Have Access For This Approval", text: "", }); $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } } function editRow() { // Get the currently selected row var row = $("#list2").jqGrid('getGridParam','selrow'); //alert('hai'); if( row != null ) $("#list2").jqGrid('editGridRow',row, { modal:true,jqModal:true, recreateForm: true, beforeSubmit: function(postdata,formid){ var id=$("#id").val(); //alert(id); var oslNo=$("#oslNo").val(); var fileNo=$("#fileNo").val(); var orderMode=$("#orderMode").val(); var orderNo=$("#orderNo").val(); //alert(id); $.ajax({ url:"<?php echo base_url('marketing/customer_update')?>", type:"POST", data:{'id':id,'oslNo':oslNo,'fileNo':fileNo,'orderMode':orderMode,'orderNo':orderNo}, async:false, success:function(data){ if(data==""){ alert('Successfully Updated.'); $("#editmodlist2").remove(); $("#list2").trigger("reloadGrid"); $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } else{ $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); } } }); }, closeAfterEdit: true, reloadAfterSubmit:false, afterSubmit : false }); else $( "#dialogSelectRow" ).dialog(); } function deleteRow() { var v=$('#delete_id').val(); if(v == 1) { // Get the currently selected row var row = $("#list2").jqGrid('getGridParam','selrow'); $("#id").val(row); // A pop-up dialog will appear to confirm the selected action if( row != null ) $("#list2").jqGrid( 'delGridRow', row, { modal:true,jqModal:true, recreateForm: true, beforeSubmit: function(postdata,formid){ $.ajax({ url:"<?php echo base_url('marketing/customer_delete')?>", type:"POST", data:{'id':row}, async:false, success:function(data){ if(data==""){ //alert('Successfully Updated.'); $("#delmodlist2").remove(); $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); //$("#list2").trigger("reloadGrid"); } else{ // alert('Successful'); $("#delmodlist2").remove(); $("#list2").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); // $("#list2").trigger("reloadGrid"); } } }); }, reloadAfterSubmit:false, closeAfterDelete: true, afterSubmit : function(response, postdata) { } }); else $( "#dialogSelectRow" ).dialog(); } else { swal({ title: "You Don't Have Access For This Delete", text: "", }); } } function recent_shipment() { var as= $('#ref_id').val(); //alert(as); if(as == 'indent') { alert("Plese select Order#"); } else { var as= $('#ref_id').val(); var v=$('#preview_id').val(); //alert(v); if(v == 1) { window.open('<?php echo base_url('marketing/recent_shipment');?>/'+ '?id='+as,'_blank'); } else { alert("You Don't Have Access For This Preview"); } } } function dtl_shipment() { var as= $('#ref_id').val(); //alert(as); if(as == 'indent') { alert("Plese select Order#"); } else { var as= $('#ref_id').val(); var v=$('#preview_id').val(); //alert(v); if(v == 1) { window.open('<?php echo base_url('marketing/dtl_shipment');?>/'+ '?id='+as,'_blank'); } else { alert("You Don't Have Access For This Preview"); } } } function order_details() { var as= $('#ref_id').val(); //alert(as); if(as == 'indent') { alert("Plese select Order#"); } else { var as= $('#ref_id').val(); var v=$('#preview_id').val(); //alert(v); if(v == 1) { window.open('<?php echo base_url('marketing/fullorder_details');?>/'+ '?id='+as,'_blank'); } else { alert("You Don't Have Access For This Preview"); } } } function buyer() { var as= $('#ref_id').val(); //alert(as); if(as == 'indent') { alert("Plese select Order#"); } else { var as= $('#ref_id').val(); var v=$('#preview_id').val(); //alert(v); if(v == 1) { window.open('<?php echo base_url('marketing/buyer');?>/'+ '?id='+as,'_blank'); } else { alert("You Don't Have Access For This Preview"); } } } function customer() { var as= $('#ref_id').val(); //alert(as); if(as == 'indent') { alert("Plese select Order#"); } else { var as= $('#ref_id').val(); var v=$('#preview_id').val(); //alert(v); if(v == 1) { window.open('<?php echo base_url('marketing/customer');?>/'+ '?id='+as,'_blank'); } else { alert("You Don't Have Access For This Preview"); } } } function pro_stat() { //var id = rowId.closest('tr').attr('id'); var as=$('#ref_id').val(); var v=$('#preview_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("planning/orderinput_summary"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); if(url_r == '1') { //window.location.href = '<?php echo base_url('planning/orderinput_summary');?>/'+ '?id='+as; window.open('<?php echo base_url('planning/orderinput_summary');?>/'+ '?id='+as, '_blank'); } else if(url_r == '2') { // window.location.href = '<?php echo base_url('planning/orderinput_summary');?>/'+ '?id='+as; window.open('<?php echo base_url('planning/orderinput_summary');?>/'+ '?id='+as, '_blank'); } else if(url_r == '3') { //window.location.href = '<?php echo base_url('planning/orderinput_summary');?>/'+ '?id='+as; window.open('<?php echo base_url('planning/orderinput_summary');?>/'+ '?id='+as, '_blank'); } else if(url_r == '4') { //window.location.href = '<?php echo base_url('planning/orderinput_summary');?>/'+ '?id='+as; window.open('<?php echo base_url('planning/orderinput_summary');?>/'+ '?id='+as, '_blank'); } } }); } else { swal({ title: "This is not yet approved.", text: "", }); } } function payments() { var as=$('#ref_id').val(); //var id = rowId.closest('tr').attr('id'); var v = $('#'+as).closest('#'+as).find('input:checkbox').attr('value'); if(as == '') { swal({ title: "Plese select Invoice", text: "", }); } else { $.ajax({ url:"<?php echo site_url('quality_check/get_payment_details')?>", type:"POST", data:{'id':as}, success:function(response){ response=jQuery.parseJSON(response); console.log(response); if(response.result==1) { $('#view_payment_details').modal('show'); $('.received_date1').val(response.message.received_date); $('.amount_received1').val(response.message.amount_received); $('.bank_realisation_rate1').val(response.message.bank_realisation_rate); $('.bank_reference1').val(response.message.bank_reference); $('.inr_value1').val(response.message.inr_value); $('.remark1').val(response.message.remark); // var res = response.message.payment_created_date.split("-"); // var date=res[2]+'-'+res[1]+'-'+res[0]; $('.created1').val(response.message.created_at); $('.user_name1').val(response.message.approved_by); $('.bank_charged1').val(response.message.bank_charged); $('.invoice_no1').val(response.message.invoice_no); $('.customer_id1').val(response.message.customerid); // $('.invoice_date1').val(response.message.sys_date); $('.invoice_value1').val(response.message.invoice_value); $('.currency1').val(response.message.currency); } else { swal({ title: "No Data Found", 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; } }); } function deying() { var as= $('#ref_id').val(); //alert(as); if(as == 'indent') { alert("Plese select Order#"); } else { var as= $('#ref_id').val(); var v=$('#preview_id').val(); //alert(v); if(v == 1) { window.open('<?php echo base_url('quality_check/deying_reports');?>/'+as,'_blank'); } else { alert("You Don't Have Access For This Preview"); } } } function madeups_report() { var as= $('#ref_id').val(); //alert(as); if(as == 'indent') { alert("Plese select Order#"); } else { var as= $('#ref_id').val(); var v=$('#preview_id').val(); //alert(v); if(v == 1) { window.open('<?php echo base_url('quality_check/madeups_report');?>/'+as,'_blank'); } else { alert("You Don't Have Access For This Preview"); } } } function inspected_fabric() { var as= $('#ref_id').val(); //alert(as); if(as == 'indent') { alert("Plese select Order#"); } else { var as= $('#ref_id').val(); var v=$('#preview_id').val(); //alert(v); if(v == 1) { window.open('<?php echo base_url('quality_check/inspected_fabric');?>/'+as,'_blank'); } else { alert("You Don't Have Access For This Preview"); } } } function issued_to_loom() { var as= $('#ref_id').val(); //alert(as); if(as == 'indent') { alert("Plese select Order#"); } else { var as= $('#ref_id').val(); var v=$('#preview_id').val(); //alert(v); if(v == 1) { window.open('<?php echo base_url('quality_check/issued_to_loom');?>/'+as,'_blank'); } else { alert("You Don't Have Access For This Preview"); } } } </script> <style> #jaytab{ width:100% !important; overflow-x:scroll !important; } #jaytab1{ width:100% !important; overflow-x:scroll !important; } .tablediv { overflow-x:scroll !important; } #search_list2 { display:none !important; } #list2_122_t { height:0px !important; } list2_136_t { height:12px !important; } .scroll { height:12px !important; } .ui-jqgrid-btable { } .ui-common-table { height:12px !important; } #refresh_list2 { display:none !important; } #client_edit { padding-right:12px !important; } #list2 { //width: 1050px; height: 0px !important; } #gbox_list2 { height: auto !important; } #gview_list2 { height: auto !important; } @media only screen and (min-width:320px) and (max-width:641px){ .ui-jqgrid { margin-left: 1px !important; } .radio-list { margin-left:7% !important; } #table_pending_indent{ //overflow-x: scroll; } #jaytab{ margin-top: 0 !important; margin-left: 0 !important; //overflow-x: scroll; //width: 600px !important; padding-left: 0 !important; } #jaytab1 { margin-top: 0 !important; margin-left: 0 !important; //overflow-x: scroll; //width: 300px !important; padding-left: 0 !important; } #editmodlist2 { //width:90% !important; } #sData span, #cData span { margin-left: 0 !important; } } @media only screen and (min-width:641px) and (max-width:991px){ .ui-jqgrid { margin-left: 1px !important; } #jaytab{ margin-top: 0 !important; margin-left: 0 !important; //overflow-x: scroll; //width: 100% !important; padding-left:0 !important; padding-right:9px !important; } } #sData span, #cData span { margin-left: 3px; } #sData { height: 29px; } #cData { height: 29px; } .jqgfirstrow { height: 0px !important; } .preview { padding-bottom:3px !important; padding-top:3px !important; } .preview { padding-bottom:3px !important; padding-top:3px !important; } .tablediv { width: auto !important; // overflow: scroll !important; } .ui-jqgrid .ui-jqgrid-btable tbody tr.jqgrow td { overflow: hidden; white-space: pre; } </style>