EVOLUTION-NINJA
Edit File: budget_list_form_old.php
<?php $this->load->view('includes/header'); ?> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/grid_style.css'); ?>" /> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/jquery-ui.css'); ?>" /> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/jqgrid/css/ui.jqgrid.css'); ?>" /> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/jqgrid/css/ui.jqgrid-bootstrap.css'); ?>" /> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/jqgrid/css/ui.jqgrid-bootstrap-ui.css'); ?>" /> <script type="text/ecmascript" src="<?php echo base_url('assets/jqgrid/js/jquery.jqGrid.min.js'); ?>"></script> <script type="text/ecmascript" src="<?php echo base_url('assets/jqgrid/js/i18n/grid.locale-en.js'); ?>"></script> <script src="<?php echo base_url('assets/js/jquery-ui.js'); ?>" type="text/javascript"></script> <!----------------------------- Left MENU END ---------------------------------------------------> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <section class="content-header"> <?php $id = $this->session->userdata('id');?> </section> <section class="content"> <form class="add_form" enctype="multipart/form-data" style="padding-top:1%; !important;"> <div class="container"> <h4>Design List</h4> <div id ="jaytab" style="margin-top:3%" class="grid table-responsive"> <table id="list1"></table> <div id="pager1"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> <!-- /.row --> </br> <div class="container"> <h4>Edited Design List</h4> <div id ="jaytab" style="margin-top:3%" class="grid table-responsive"> <table id="list2"></table> <div id="pager2"></div> <div id="dialogSelectRow2" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> <!-- /.row --> </form> </section> <!-- /.content --> </div> <!-- /.content-wrapper --> <script type="text/javascript"> CallGrid(); function CallGrid() { jQuery("#list1").jqGrid({ url:"<?php echo site_url('get-budget-list-data')?>", mtype : "get", datatype: "json", colNames:['id','Heading','Type Of Work','Material','Length','Breadth','Depth','Number','Total','Unit/Total','Ratio/Unit','RF','Quantity','Unit/QTY','Rate/Unit','Total Amt','GST','GST Amt','Final Amt','Labour Charges without GST','Labour Charges 40% without GST','Action'], colModel:[ {name:'id',index:'id', width:100, hidden:true,editable:false,key:true}, {name:'table_heading',index:'table_heading', width:150, hidden:false,editable:false}, {name:'type_of_work',index:'type_of_work', width:150, hidden:false,editable:false}, {name:'material',index:'material', width:100, hidden:false,editable:false}, {name:'l_data',index:'l_data', width:100, hidden:false,editable:false}, {name:'b_data',index:'b_data', width:100, hidden:false,editable:false}, {name:'d_data',index:'d_data', width:100, hidden:false,editable:false}, {name:'number',index:'number', width:100, hidden:false,editable:false}, {name:'total',index:'total', width:100, hidden:false,editable:false}, {name:'unit_total',index:'unit_total', width:150, hidden:false,editable:false}, {name:'ratio_unit',index:'ratio_unit', width:100, hidden:false,editable:false}, {name:'rf_data',index:'rf_data', width:80, hidden:false,editable:false}, {name:'quantity',index:'quantity', width:100, hidden:false,editable:false}, {name:'unit_quantity',index:'unit_quantity', width:150, hidden:false,editable:false}, {name:'rate_unit',index:'rate_unit', width:100, hidden:false,editable:false}, {name:'total_amount',index:'total_amount', width:150, hidden:false,editable:false}, {name:'gst',index:'gst', width:80, hidden:false,editable:false}, {name:'gst_amount',index:'gst_amount', width:150, hidden:false,editable:false}, {name:'final_amount',index:'final_amount', width:100, hidden:false,editable:false}, {name:'labour_charge_without_gst',index:'labour_charge_without_gst', width:150, hidden:false,editable:false}, {name:'labour_charge_fourty_without_gst',index:'labour_charge_fourty_without_gst', width:150, hidden:false,editable:false}, {name:'insertion_count',index:'insertion_count',width:120, search:false,editable:false,align:'center',formatter: function (cellvalue, options, rowObject) { var retVal = ""; var retVal = '<a onclick="edit_budget('+rowObject.id+','+rowObject.insertion_count+');" href="javascript:void(0);"><i class="fa fa-pencil-square-o" style="color:blue;" aria-hidden="true"></i></a>'; return retVal; }}, ], rowNum:20, rowTotal: 2000, rowList : [20,30], rownumbers: true, //rownumWidth: 60, pager:"#pager1", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", shrinkToFit: true, loadonce:true, autoencode: true, caption:"Design List", //Subgrid1... subGrid: true, subGridRowExpanded: function(subgrid_id, row_id) { var subgrid_table_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 site_url('multilevel-subgrid-data');?>"+'/'+row_id, datatype: "json", colNames:['id','Heading','Type Of Work','Material','Length','Breadth','Depth','Number','Total','Unit/Total','Ratio/Unit','RF','Quantity','Unit/QTY','Rate/Unit','Total Amt','GST','GST Amt','Final Amt','Labour Charges without GST','Labour Charges 40% without GST'], colModel: [ {name:'id',index:'id', width:100, hidden:true,editable:false,key:true}, {name:'table_heading',index:'table_heading', width:150, hidden:false,editable:false}, {name:'type_of_work',index:'type_of_work', width:150, hidden:false,editable:false}, {name:'material',index:'material', width:100, hidden:false,editable:false}, {name:'l_data',index:'l_data', width:100, hidden:false,editable:false}, {name:'b_data',index:'b_data', width:100, hidden:false,editable:false}, {name:'d_data',index:'d_data', width:100, hidden:false,editable:false}, {name:'number',index:'number', width:100, hidden:false,editable:false}, {name:'total',index:'total', width:100, hidden:false,editable:false}, {name:'unit_total',index:'unit_total', width:150, hidden:false,editable:false}, {name:'ratio_unit',index:'ratio_unit', width:100, hidden:false,editable:false}, {name:'rf_data',index:'rf_data', width:80, hidden:false,editable:false}, {name:'quantity',index:'quantity', width:100, hidden:false,editable:false}, {name:'unit_quantity',index:'unit_quantity', width:150, hidden:false,editable:false}, {name:'rate_unit',index:'rate_unit', width:100, hidden:false,editable:false}, {name:'total_amount',index:'total_amount', width:150, hidden:false,editable:false}, {name:'gst',index:'gst', width:80, hidden:false,editable:false}, {name:'gst_amount',index:'gst_amount', width:150, hidden:false,editable:false}, {name:'final_amount',index:'final_amount', width:100, hidden:false,editable:false}, {name:'labour_charge_without_gst',index:'labour_charge_without_gst', width:150, hidden:false,editable:false}, {name:'labour_charge_fourty_without_gst',index:'labour_charge_fourty_without_gst', width:150, hidden:false,editable:false}, ], height: 'auto', autowidth: true, shrinkToFit: true, rowNum:20, sortname: 'num', sortorder: "asc", pager:subgrid_table_id, loadonce: true, }).navGrid('#'+subgrid_table_id+'', { edit: false, add: false, del: false, search:true }); } }); $("#list1").jqGrid("setLabel", "rn", "SL"); $("#list1").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required $("#list1").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, closeAfterDelete:true, closeAfterEdit:true }, ); } //<-----second grid data---> EditedCallGrid(); function EditedCallGrid() { jQuery("#list2").jqGrid({ url:"<?php echo site_url('get-edited-budget-list-data')?>", mtype : "get", datatype: "json", colNames:['id','Heading','Type Of Work','Material','Length','Breadth','Depth','Number','Total','Unit/Total','Ratio/Unit','RF','Quantity','Unit/QTY','Rate/Unit','Total Amt','GST','GST Amt','Final Amt','Labour Charges without GST','Labour Charges 40% without GST'], colModel:[ {name:'insertion_count',index:'insertion_count', width:100, hidden:true,editable:false,key:true,}, {name:'table_heading',index:'table_heading', width:150, hidden:false,editable:false}, {name:'type_of_work',index:'type_of_work', width:150, hidden:false,editable:false}, {name:'material',index:'material', width:100, hidden:false,editable:false}, {name:'l_data',index:'l_data', width:100, hidden:false,editable:false}, {name:'b_data',index:'b_data', width:100, hidden:false,editable:false}, {name:'d_data',index:'d_data', width:100, hidden:false,editable:false}, {name:'number',index:'number', width:100, hidden:false,editable:false}, {name:'total',index:'total', width:100, hidden:false,editable:false}, {name:'unit_total',index:'unit_total', width:150, hidden:false,editable:false}, {name:'ratio_unit',index:'ratio_unit', width:100, hidden:false,editable:false}, {name:'rf_data',index:'rf_data', width:80, hidden:false,editable:false}, {name:'quantity',index:'quantity', width:100, hidden:false,editable:false}, {name:'unit_quantity',index:'unit_quantity', width:150, hidden:false,editable:false}, {name:'rate_unit',index:'rate_unit', width:100, hidden:false,editable:false}, {name:'total_amount',index:'total_amount', width:150, hidden:false,editable:false}, {name:'gst',index:'gst', width:80, hidden:false,editable:false}, {name:'gst_amount',index:'gst_amount', width:150, hidden:false,editable:false}, {name:'final_amount',index:'final_amount', width:100, hidden:false,editable:false}, {name:'labour_charge_without_gst',index:'labour_charge_without_gst', width:150, hidden:false,editable:false}, {name:'labour_charge_fourty_without_gst',index:'labour_charge_fourty_without_gst', width:150, hidden:false,editable:false}, ], rowNum:20, rowTotal: 2000, rowList : [20,30], rownumbers: true, //rownumWidth: 60, pager:"#pager2", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", shrinkToFit: true, loadonce:true, autoencode: true, caption:"Design List", //Subgrid1... subGrid: true, subGridRowExpanded: function(subgrid_id, row_id) { var subgrid_table_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 site_url('edited-multilevel-subgrid-data');?>"+'/'+row_id, datatype: "json", colNames:['id','Heading','Type Of Work','Material','Length','Breadth','Depth','Number','Total','Unit/Total','Ratio/Unit','RF','Quantity','Unit/QTY','Rate/Unit','Total Amt','GST','GST Amt','Final Amt','Labour Charges without GST','Labour Charges 40% without GST'], colModel: [ {name:'id',index:'id', width:100, hidden:true,editable:false,key:true}, {name:'table_heading',index:'table_heading', width:150, hidden:false,editable:false}, {name:'type_of_work',index:'type_of_work', width:150, hidden:false,editable:false}, {name:'material',index:'material', width:100, hidden:false,editable:false}, {name:'l_data',index:'l_data', width:100, hidden:false,editable:false}, {name:'b_data',index:'b_data', width:100, hidden:false,editable:false}, {name:'d_data',index:'d_data', width:100, hidden:false,editable:false}, {name:'number',index:'number', width:100, hidden:false,editable:false}, {name:'total',index:'total', width:100, hidden:false,editable:false}, {name:'unit_total',index:'unit_total', width:150, hidden:false,editable:false}, {name:'ratio_unit',index:'ratio_unit', width:100, hidden:false,editable:false}, {name:'rf_data',index:'rf_data', width:80, hidden:false,editable:false}, {name:'quantity',index:'quantity', width:100, hidden:false,editable:false}, {name:'unit_quantity',index:'unit_quantity', width:150, hidden:false,editable:false}, {name:'rate_unit',index:'rate_unit', width:100, hidden:false,editable:false}, {name:'total_amount',index:'total_amount', width:150, hidden:false,editable:false}, {name:'gst',index:'gst', width:80, hidden:false,editable:false}, {name:'gst_amount',index:'gst_amount', width:150, hidden:false,editable:false}, {name:'final_amount',index:'final_amount', width:100, hidden:false,editable:false}, {name:'labour_charge_without_gst',index:'labour_charge_without_gst', width:150, hidden:false,editable:false}, {name:'labour_charge_fourty_without_gst',index:'labour_charge_fourty_without_gst', width:150, hidden:false,editable:false}, ], height: 'auto', autowidth: true, shrinkToFit: true, rowNum:20, sortname: 'num', sortorder: "asc", pager:subgrid_table_id, loadonce: true, }).navGrid('#'+subgrid_table_id+'', { edit: false, add: false, del: false, search:true }); } }); $("#list2").jqGrid("setLabel", "rn", "SL"); $("#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, closeAfterDelete:true, closeAfterEdit:true }, ); } function edit_budget(id,insert_count_no) { window.location.href="<?php echo site_url('edit-multilevel-budget');?>/"+id+'/'+insert_count_no; } </script> <?php $this->load->view('includes/footer'); ?>