EVOLUTION-NINJA
Edit File: exported_fabric_detaills.php
<script> function planningtypes(str) { if(str=="po_pending") { $('#table_approved_po').hide(); $('#table_approved_madeup').hide(); $('#table_pending_po').show(); } else if(str=="approved_po") { $("#list3").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $('#table_approved_po').show(); $('#table_approved_madeup').hide(); $('#table_pending_po').hide(); } else if(str=="madeups") { $("#list4").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); $('#table_approved_po').hide(); $('#table_approved_madeup').show(); $('#table_pending_po').hide(); } } </script> <style> #table_approved_po { display:none; } #table_approved_madeup { display:none; } .ui-jqgrid { text-transform: capitalize !important; } .tablediv { text-transform: uppercase !important; } .ui-jqgrid tr.jqgrow td{ text-transform: uppercase !important; } </style> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <h3 class="page-title">Exported Fabric 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="<?php echo base_url(); ?>/dashboard/dashboard_fun">Home</a> <i class="fa fa-angle-right"></i> <a href="#" > Exported Fabric </a></li> </ul> </div> <input type="hidden" id="edit_id" class="edit_id" value="<?php if(empty($access_row)){ } else { echo $access_row->edit_id; } ?>" > <input type="hidden" id="preview_id" class="preview_id" value="<?php if(empty($access_row)){ } else { echo $access_row->preview_id; } ?>" > <input type="hidden" id="delete_id" class="delete_id" value="<?php if(empty($access_row)){ } else { echo $access_row->delete_id; } ?>" > <input type="hidden" id="approval_id" class="approval_id" value="<?php if(empty($access_row)){ } else { echo $access_row->approval_id; } ?>" > <div class="radio-list" style="margin-left: 2%;"> <input type="hidden" value="<?php echo $ref; ?>" id="ref_id" > <input type="hidden" value="<?php echo $url_val; ?>" id="url_ref" style="width: 230px;" > <?php if($ref == 'today_dashboard' || $ref == 'month_dashboard' || $ref == 'year_dashboard') { ?> <label class="radio-inline"> <input type="radio" checked="checked" name="planningorder" id="planningorder" onclick="planningtypes('po_pending')" /> Issue Fabric</label> <span class="badge"><?php echo $monthly_export_issue_fabric; ?></span> <label class="radio-inline"> <input type="radio" name="planningorder" id="planningorder" onclick="planningtypes('approved_po')" /> Exported Fabrics</label><span class="badge"><?php echo $pack_count; ?></span> <label class="radio-inline"> <input type="radio" name="planningorder" id="planningorder" onclick="planningtypes('madeups')" /> Exported Madeups</label><span class="badge"><?php echo $pack_count; ?></span> <?php } else { ?> <label class="radio-inline"> <input type="radio" checked="checked" name="planningorder" id="planningorder" onclick="planningtypes('po_pending')" /> Issue Fabric</label> <label class="radio-inline"> <input type="radio" name="planningorder" id="planningorder" onclick="planningtypes('approved_po')" /> Exported Fabrics</label> <label class="radio-inline"> <input type="radio" name="planningorder" id="planningorder" onclick="planningtypes('madeups')" /> Exported Madeups</label> <?php } ?> </div><br> <div id="table_pending_po"> <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> <div id="table_approved_po"> <div id="jaytab" class="jaytab"> <table id="list3"></table> <div id="pager3"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> <div id="table_approved_madeup"> <div id="jaytab" class="jaytab"> <table id="list4"></table> <div id="pager4"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> </div> </div> <!-- End BEGIN CONTAINER --> <!-- BEGIN FOOTER --> <!-- BEGIN FOOTER --> <link rel="stylesheet" href="<?php echo base_url('assets/css/code_jquery.min.css');?>"> <script src="<?php echo base_url('assets/js/jquery-ui.min.js'); ?>" type="text/javascript"></script> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/jquery-ui.min.css'); ?>" /> <style> .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; } }); } </script> <!-----------------datepicker-------------> <!-- The link to the CSS that the grid needs --> <link href="<?php echo base_url('assets/css/sweetalert2.min.css');?>" rel="stylesheet"/> <script src="<?php echo base_url('assets/js/sweetalert2.min.js');?>"></script> <script type="text/ecmascript" src="<?php echo base_url('jqgrid/js/jquery.jqGrid.min.js'); ?>"></script> <!-- This is the localization file of the grid controlling messages, labels, etc. <!-- We support more than 40 localizations --> <script type="text/ecmascript" src="<?php echo base_url('jqgrid/js/i18n/grid.locale-en.min.js'); ?>"></script> <!-- A link to a jQuery UI ThemeRoller theme, more than 22 built-in and many more custom --> <!-- The link to the CSS that the grid needs --> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('jqgrid/css/ui.jqgrid.min.css'); ?>" /> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('jqgrid/css/ui.jqgrid-bootstrap.min.css'); ?>" /> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('jqgrid/css/ui.jqgrid-bootstrap-ui.min.css'); ?>" /> <link rel="stylesheet" href="<?php echo base_url('assets/css/code_jquery.min.css');?>"> <script src="<?php echo base_url('assets/js/jquery-ui.min.js'); ?>" type="text/javascript"></script> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/jquery-ui.min.css'); ?>" /> <style 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; } .tablediv { overflow-x: scroll !important; } </style> <!-----------------datepicker-------------> <!-- The link to the CSS that the grid needs --> <script> $(document).ready(function (){ var l=$("#ref_id").val(); jQuery("#list2").jqGrid({ url:"<?php echo base_url('exported_fabric/exp_issue_fabric_details')?>/s"+l+"/", mtype : "post", datatype: "json", colNames:['Id','Work Order#','Vendor Name / Factory','Type','PO# / DTL No.','DTL Piece No','Supplier Piece No','Article(PRODUCT)','Unit','Width','Design','Shade','Qty','Location','Action'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100,key:true}, {name:'work_order',index:'work_order', width:50,editable:false,width:100}, {name:'vendor_name',index:'vendor_name', width:50,editable:false,width:100}, {name:'orderType',index:'orderType', width:50,editable:false,width:100}, {name:'po_no',index:'po_no',edittype:'text',editable:false,editrules:{required: true}, width:100}, {name:'ssl_pc_no',index:'ssl_pc_no', editable:true,editrules:{required: true},width:120}, {name:'piece_no',index:'piece_no',editable:false, width:100}, {name:'product_name',index:'product_name', width:120,editable:true,editrules:{required: true}}, {name:'unit',index:'unit', width:120,editable:true,editrules:{required: true}}, {name:'width',index:'width', editable:true,editrules:{required: true},width:120}, {name:'design',index:'design', editable:true,editrules:{required: true},width:120}, {name:'shades',index:'shades', width:120,editable:false}, {name:'issue_stock',index:'issue_stock', width:120,editable:false}, {name:'consumed_at',index:'consumed_at',edittype:'text',editable:false,editrules:{required: true}, width:130}, {name:' ',index:' ',editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_issue_fabric($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='Preview' onclick='some_function' style='margin-left:15px'\>"; }}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager2", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, caption:"Issue Fabric Exported Stock Details", footerrow: true, loadComplete: function () { var sumOfPrice_rec_weight = jQuery("#list2").jqGrid('getCol','issue_stock',false,'sum'); jQuery("#list2").jqGrid('footerData', 'set', { shades: 'Total Mtrs:', issue_stock: sumOfPrice_rec_weight.toFixed(2) }); }, }); //$("#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_issue_fabric(rowId) { var v=$('#preview_id').val(); if(v == 1) { var id = rowId.closest('tr').attr('id'); var as=id; $.ajax({ type:'post', url:'<?php echo base_url("exported_fabric/exported_issue_fabric"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); if(url_r == '1') { window.location.href = '<?php echo base_url('exported_fabric/exported_issue_fabric');?>/'+ '?id='+as; } else if(url_r == '2') { window.location.href = '<?php echo base_url('exported_fabric/exported_issue_fabric_data');?>/'+ '?id='+as; } else if(url_r == '3') { window.location.href = '<?php echo base_url('exported_fabric/exported_issue_fabric_details');?>/'+ '?id='+as; } else if(url_r == '4') { window.location.href = '<?php echo base_url('exported_fabric/exported_issue_fabric_preview');?>/'+ '?id='+as; } } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } <!-----------------------------------------approved pending grid---------------------------------------> $(document).ready(function (){ var l=$("#ref_id").val(); $("#list3").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); jQuery("#list3").jqGrid({ url:"<?php echo base_url('exported_fabric/exp_packing_fabric_details')?>/s"+l+"/", mtype : "post", datatype: "json", colNames:['Id','Customer ID','Date','Invoice #','Vendor Name / Factory','PO# / DTL No.','DTL Piece No','Supplier Piece No','Article(PRODUCT)','Unit','Width','Design','Shade','Exported Stock','Location','Action'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100,key:true}, {name:'customer_id',index:'customer_id',edittype:'text',editable:false,editrules:{required: true}, width:90}, {name:'received_date',index:'received_date',edittype:'text',editable:false,editrules:{required: true}, width:90}, {name:'invoice_num',index:'invoice_num',edittype:'text',editable:false,editrules:{required: true}, width:90}, {name:'vendor_name',index:'vendor_name',hidden:true, width:50,editable:false,width:100}, {name:'po_no',index:'po_no',edittype:'text',editable:false,editrules:{required: true}, width:100}, {name:'ssl_pc_no',index:'ssl_pc_no', editable:true,editrules:{required: true},width:120}, {name:'piece_no',index:'piece_no',editable:false, width:100}, {name:'product_name',index:'product_name', width:120,editable:true,editrules:{required: true}}, {name:'unit',index:'unit', width:40,editable:true,editrules:{required: true}}, {name:'width',index:'width', editable:true,editrules:{required: true},width:120}, {name:'design',index:'design', editable:true,editrules:{required: true},width:90}, {name:'shades',index:'shades', width:120,editable:false}, {name:'exp_qty',index:'exp_qty', width:80,editable:false}, {name:'consumed_at',index:'consumed_at',edittype:'text',editable:false,editrules:{required: true}, width:100}, {name:' ',index:' ',editable:false,editrules:{required: true}, width:100,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_packing($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='Preview' onclick='some_function' style='margin-left:15px'\>"; }}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager3", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, caption:"Packing List Exported Stock Details", footerrow: true, loadComplete: function () { var sumOfPrice_rec_weight = jQuery("#list3").jqGrid('getCol','exp_qty',false,'sum'); jQuery("#list3").jqGrid('footerData', 'set', { shades: 'Total Mtrs:', exp_qty: sumOfPrice_rec_weight.toFixed(2) }); }, }); $("#list3").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required $("#list3").jqGrid('navGrid','#pager3', {edit:false,add:false,del:false,search:true,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true, multipleGroup:true, caption:"search" } ); }); function fun_packing(rowId) { var v=$('#preview_id').val(); if(v == 1) { var id = rowId.closest('tr').attr('id'); var as=id; $.ajax({ type:'post', url:'<?php echo base_url("exported_fabric/exported_packing_list_fabric"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); if(url_r == '1') { window.location.href = '<?php echo base_url('exported_fabric/exported_packing_list_fabric');?>/'+ '?id='+as; } else if(url_r == '2') { window.location.href = '<?php echo base_url('exported_fabric/exported_packing_list_fabric_details');?>/'+ '?id='+as; } else if(url_r == '3') { window.location.href = '<?php echo base_url('exported_fabric/exported_packing_list_fabric_data');?>/'+ '?id='+as; } else if(url_r == '4') { window.location.href = '<?php echo base_url('exported_fabric/exported_packing_list_fabric_preview');?>/'+ '?id='+as; } } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } <!------------------------------ Madeups----------------------------------------> $(document).ready(function (){ var l=$("#ref_id").val(); $("#list4").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); jQuery("#list4").jqGrid({ url:"<?php echo base_url('exported_fabric/exp_packing_madeup_details')?>/s"+l+"/", mtype : "post", datatype: "json", colNames:['Id','Customer Name','Date','Invoice #','PO# / DTL No.','Customer Order#','Design','Order Type','Article(PRODUCT)','Size','Buyers Shade','Exported Qty','Units','Exported WT'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100,key:true}, {name:'customer_name',index:'customer_name',edittype:'text',editable:false,editrules:{required: true}, width:90}, {name:'order_date',index:'order_date',edittype:'text',editable:false,editrules:{required: true}, width:90}, {name:'invoice',index:'invoice',edittype:'text',editable:false,editrules:{required: true}, width:90}, {name:'vendor_name',index:'vendor_name',hidden:true, width:50,editable:false,width:100}, {name:'orderNo',index:'orderNo',edittype:'text',editable:false,editrules:{required: true}, width:100}, {name:'design',index:'design', editable:true,editrules:{required: true},width:120}, {name:'order_type',index:'order_type',editable:false, width:100}, {name:'article',index:'article', width:120,editable:true,editrules:{required: true}}, {name:'size',index:'size', width:40,editable:true,editrules:{required: true}}, {name:'shades',index:'shades', editable:true,editrules:{required: true},width:120}, {name:'exp_qty',index:'exp_qty', editable:true,editrules:{required: true},width:90}, {name:'units',index:'units', width:120,editable:false}, {name:'exp_wt',index:'exp_wt', width:80,editable:false}, // {name:'consumed_at',index:'consumed_at',edittype:'text',editable:false,editrules:{required: true}, width:100}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager4", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, caption:"Packing List Exported Stock Details", footerrow: true, loadComplete: function () { var sumOfPrice_rec_weight = jQuery("#list4").jqGrid('getCol','exp_qty',false,'sum'); jQuery("#list4").jqGrid('footerData', 'set', { shades: 'Total Mtrs:', exp_qty: sumOfPrice_rec_weight.toFixed(2) }); }, }); $("#list4").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required $("#list4").jqGrid('navGrid','#pager4', {edit:false,add:false,del:false,search:true,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true, multipleGroup:true, caption:"search" } ); }); function fun_packing(rowId) { var v=$('#preview_id').val(); if(v == 1) { var id = rowId.closest('tr').attr('id'); var as=id; $.ajax({ type:'post', url:'<?php echo base_url("exported_fabric/exported_packing_list_fabric"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); /* if(url_r == '1') { window.location.href = '<?php echo base_url('exported_fabric/exported_packing_list_fabric');?>/'+ '?id='+as; } else if(url_r == '2') { window.location.href = '<?php echo base_url('exported_fabric/exported_packing_list_fabric_details');?>/'+ '?id='+as; } else if(url_r == '3') { window.location.href = '<?php echo base_url('exported_fabric/exported_packing_list_fabric_data');?>/'+ '?id='+as; } else if(url_r == '4') { window.location.href = '<?php echo base_url('exported_fabric/exported_packing_list_fabric_preview');?>/'+ '?id='+as; }*/ } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } </script> <style> .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> <link rel="stylesheet" href="<?php echo base_url('assets/css/code_jquery.min.css');?>"> <script src="<?php echo base_url('assets/js/jquery-ui.min.js'); ?>" type="text/javascript"></script> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/jquery-ui.min.css'); ?>" /> <script> $(document).ready(function() { $( "#customer" ).autocomplete({ source: '<?php echo base_url('request/auto_sea'); ?>', }); }); function searchname() { var customer = document.getElementById('customer').value; $.ajax({ url:"<?php echo base_url('request/search_by_fetch')?>", dataType: "json", data:{'customer':customer}, type:"POST", async:true, success:function(data) { // alert('hai'); var obj=JSON.parse(data); document.getElementById('customer_id').value=obj[0].customerID; } }); } </script> <style> #jaytab{ width:100%; //overflow:auto; } } #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; } </style>