EVOLUTION-NINJA
Edit File: outsource_delivery_date_planning_details.php
<style> #ToolTables_sample_2_0 { display:none !important; } #refresh_list2 { display:none !important; } </style> <style> .ui-jqgrid { text-transform: capitalize !important; } .tablediv { text-transform: uppercase !important; } .ui-jqgrid tr.jqgrow td{ text-transform: uppercase !important; } .badge { background: -webkit-radial-gradient( 1px -11px, circle, rgba(17, 208, 85, 0.98) 8%, rgb(7, 46, 80) 26px ); background-color: #ef0e0e; border: 1px solid white; border-radius: 12px; color: white; font: bold 12px/9px Helvetica, Verdana, Tahoma; height: 17px; padding: 3px 3px 0 3px; text-align: center; min-width: 19px; margin-bottom: 16px; } </style> <script> function modal_function() { var ids= $("#row_id").val(); //alert(ids); var status =$('#statuss').val(); $.ajax({ url:"<?php echo base_url('planning/planning_status');?>", type:"POST", data:{'ids':ids,'status':status}, async:false, success:function(data){ $("#list3").jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid'); window.location.href="<?php echo base_url('planning/planning_order?prop_id=1') ?>"; } }); } </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> function alert_function() { swal({ title: "You Don't Have Access For This Insert", text: "", }); } </script> <style> .ui-state-highlight a, .ui-widget-content .ui-state-highlight a, .ui-widget-header .ui-state-highlight a { color: rgb(49,117,175) !important; } .ui-widget-content a { color: rgb(5, 131, 239) !important; } .badge { background: -webkit-radial-gradient( 1px -11px, circle, rgba(17, 208, 85, 0.98) 8%, rgb(7, 46, 80) 26px ); background-color: #ef0e0e; border: 1px solid white; border-radius: 12px; color: white; font: bold 12px/9px Helvetica, Verdana, Tahoma; height: 17px; padding: 3px 3px 0 3px; text-align: center; min-width: 19px; margin-bottom: 16px; } .portlet { border: 1px solid rgb(87,142,190) !important; border-top: 0; background: #fff !important; } .box { border: 1px solid rgb(87,142,190) !important; border-top: 0; background: #fff !important; } ..blue-madison { border: 1px solid rgb(87,142,190) !important; border-top: 0; background: #fff !important; } </style> <script> $( document ).ready(function() { var v= $('#ref_id').val(); // alert(v); if(v == 'today_dashboard' || v == 'month_dashboard' || v == 'year_dashboard') { $('#normal_div').hide(); $('#dashboard_div').show(); $('#bordre_box').hide(); $('#table_planned').show(); } else { $('#normal_div').show(); $('#dashboard_div').hide(); } }); </script> <script> function back_function() { window.location.href="<?php echo base_url('planning/planning_order?prop_id=1'); ?>"; } </script> <?php //include("menu.php"); ?> <!-- BEGIN CONTENT --> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <h3 class="page-title"> Planning order Details </h3> <?php $this->load->view('templates/nav_menu'); ?> <input type="button" name="Insertt" id="del_date_val_outsource" data-toggle="modal" data-target="#delivery_date_Modal_outsource" value="Select"/> <button type="button" onclick="back_function()" >Back </button> <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="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; } ?>" > <input type="hidden" id="insert_id" class="insert_id" value="<?php if(empty($access_row)){ } else { echo $access_row->insert_id; } ?>" > <div id="outsource_planned" > <div id = "jaytab" class="jaytab"> <table id="list6"></table> <div id="pager6"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> <div id="myModal" class="modal fade" role="dialog" style="color:#000;"> <div class="modal-dialog" style="width:80%" > <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Planning Details</h4> </div> <div class="modal-body"> <fieldset> <div > <input type="hidden" id="row_id" name="row_id" > <div class="row"> <div class="col-md-8"> <div class="form-group"> <label class="control-label col-md-3">Status :</label> <div class="col-md-9 "> <select name="statuss" id="statuss" class="form-control"> <option value="Select">Select</option> <option value="unplanned">Need to Modified</option> <option value="planned">Planning Confirmed</option> </select> </div> </div> </div><br/> </div> <!-- row -4--> <br/> <button onclick="modal_function()" id="generate_modal_data" class="btn btn-primary generate_modal_data" value="Generate" style="margin-left:40% !important;" data-dismiss="modal" >Submit</button> </div> </div> </div> </div> </div> <!-- END PAGE HEADER--> <!-- END DASHBOARD STATS --> <!----------------------Table planned ------------------------------------------------> </div> </div> <div id="delivery_date_Modal_outsource" 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">Type :</label> <div class="col-md-7"> <select class="form-control input-group" id="date_type1" name="date_type1" > <option value="delivery">Delivery Date</option> <option value="dyeing">Dyeing Completion Date</option> <option value="weaving">Weaving Completion Date</option> <option value="madeups">Madeups Completion Date</option> </select> </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">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_on1" 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_on1" 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_modal1" name="submit" onclick="delievry_submit_button1()" class="btn btn-primary">Submit</button> </div> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div> <style> .radio-list{ padding-left:20px; } @media only screen and (min-width:320px) and (max-width:640px) { .checkbox-inline+.checkbox-inline, .radio-inline+.radio-inline { margin-left: 0px !important; } .radio-list > label.radio-inline:first-child { padding-left: 20px; } } </style> <style> .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; } #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> <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 delievry_submit_button() { var from_required_on =$('#from_delivery_date_required_on').val(); var to_required_on =$('#to_delivery_date_required_on').val(); var date_type =$('#date_type').val(); var mark_type ='inhouse'; $.ajax({ url:"<?php echo base_url('planning/transaction_planning_details');?>", type:"POST", data:{'mark_type':mark_type,'from_required_on':from_required_on,'to_required_on':to_required_on,'date_type':date_type}, async:false, success:function(data) { window.location.href="<?php echo base_url('planning/planning_date_transaction_details'); ?>" } }); } function delievry_submit_button1() { var from_required_on =$('#from_delivery_date_required_on1').val(); var to_required_on =$('#to_delivery_date_required_on1').val(); var date_type =$('#date_type1').val(); var mark_type ='outsource'; $.ajax({ url:"<?php echo base_url('planning/transaction_planning_details');?>", type:"POST", data:{'mark_type':mark_type,'from_required_on':from_required_on,'to_required_on':to_required_on,'date_type':date_type}, async:false, success:function(data) { window.location.href="<?php echo base_url('planning/outsource_planning_date_transaction_details'); ?>" } }); } 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'); ?>" /> <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" > <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:red !important; } .ui-jqgrid .ui-jqgrid-btable tbody tr.jqgrow td { overflow: hidden; white-space: pre; } </style> <script src="<?php echo base_url(); ?>assets/js/sweetalert.min.js" type="text/javascript"></script> <link href="<?php echo base_url(); ?>assets/css/sweetalert.min.css" rel="stylesheet" type="text/css" > <!-----------------datepicker-------------> <script> $(document).ready(function(){ var colPos = 0; var navGrid = $('#list2'); navGrid.jqGrid('showCol', navGrid.getGridParam("colModel")[5].name); </script> <script> <!----------------------------------outsourec planned -------------------------------> $(document).ready(function (){ jQuery("#list6").jqGrid({ url:"<?php echo base_url('planning/planned_order_date_details')?>", datatype: "json", colNames:['Id','OSL No','File No.','Order Received Date','Delivery Date'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'oslNo',index:'oslNo',editable:true,style:'cursor:pointer',editrules:{required: true},width:250,classes:'coledit',formatter:'showlink',formatoptions:{baseLinkUrl:'<?php echo base_url('planning/add_outsourcecompletely_planned')?>'}}, // {name:'oslNo',index:'oslNo', width:250,editable:false}, {name:'fileNo',index:'fileNo', width:250,editable:true,editrules:{required: true}}, {name:'orderDate',index:'orderDate', editable:true,editrules:{required: true},width:250,formatter: 'date', formatoptions: { newformat: 'd/m/Y'}}, {name:'deliveryDate',index:'deliveryDate',classes:'edit', editable:true,editrules:{required: true},width:250,formatter: 'date', formatoptions: { newformat: 'd/m/Y'}}, ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager6", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, caption:"Outsource Planned Order", 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('planning/outsource_planned_order_id');?>/s"+row_id+"/", //data:{'sub_id':123}, mtype : "get", datatype: "json", colNames:['Id','Article No','Quality','Planned Width','Planned Mtr','Design','Buyer Shade','Our Shade','Indent No','PO No','Indent Conversion'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'articleNo',index:'articleNo', width:100,editable:true,editrules:{required: true}}, {name:'quality',index:'quality', width:150,editable:true,editrules:{required: true}}, {name:'m_width',index:'m_width', editable:true,editrules:{required: true},width:90}, {name:'PlndMtr',index:'PlndMtr', editable:true,editrules:{required: true},width:90}, {name:'design', index:'design', width:100,editable:true,editrules:{required: true}}, {name:'buyerShade',index:'buyerShade', editable:true,editrules:{required: true},width:100}, {name:'ourShade',index:'ourShade', editable:true,editrules:{required: true},width:100}, {name:'create_indent',index:'create_indent', editable:true,editrules:{required: true},width:118}, {name:'po_num',index:'po_num', editable:true,editrules:{required: true},width:90}, {name:'preview',index:'preview',align: "center",editable:false,editrules:{required: true}, width:150,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="indent_preview($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' class='fa fa-eye' value='Create Indent' onclick='some_function' classes='preview' \>"; }}, ], height: 'auto', rowNum:200000000000000, sortname: 'num', sortorder: "asc" }); } }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list6").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list6").jqGrid('navGrid','#pager6', {edit:false,add:false,del:false,search:false,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true } ); }); function indent_preview(rowId) { var v=$('#insert_id').val(); var id = rowId.closest('tr').attr('id'); var s=id; //alert(s); $.ajax({ type:'post', url:'<?php echo base_url("vendor/planning_indent_po_creation_test"); ?>', data:{'s':s}, async:false, success:function(data) { var objData = jQuery.parseJSON(data); if(objData == 'success') { swal({ title: "Indent PO is Already Created For This SubOrder", text: "", }); } else { window.location.href = '<?php echo base_url('vendor/planning_indent_po_creation');?>/'+ '?id='+s; } } }); } </script>