EVOLUTION-NINJA
Edit File: other_account.php
<?php $this->load->view('includes/admin_header');?> <div class="main-container " id="main-container"> <div id="sidebar" class="sidebar responsive ace-save-state"> <div class="text-center"> <h4>Folder</h4> </div> <ul class="nav nav-list"> <li> <input type="text" class="form-control" placeholder="Search Folder"> </li> <li class=""><a href="<?php echo base_url('other-account');?>">Individual sales </a></li> <li class=""><a href="<?php echo base_url('sales-pipeline-and-trend');?>"> Sales pipeline and trend </a></li> <li class=""><a href="<?php echo base_url('industry-wise-sales');?>"> Industry wise sales </a></li> <li class=""><a href="<?php echo base_url('region-wise-sales');?>"> Region wise sales </a></li> <li class=""><a href="<?php echo base_url('employee-activity');?>"> Employee activity </a></li> <!-- <li class=""><a href="<?php echo base_url('model-wise-sales');?>"> Model wise sales </a></li> --> </ul><!-- /.nav-list --> </div> <div class="main-content"> <div class="main-content-inner"> <div class=" page-content" style="background-color:#f0f0f0;"> <div class="row row-form1"> <div class="col-sm-6 col-md-3"> <h4>Individual Sales</h4> </div> <div class="col-xs-3 col-sm-2 col-md-3" style="float:right;"> <select theme="dark" width="220px" style="" placeholder="Select Your Favorite" data-search="true" id="member" name="member"> <option value=" ">Select</option> <?php foreach($roles_list_admin as $value){ ?> <option value="<?php echo $value->role_id; ?>"><?php echo $value->role_name; ?></option> <?php } ?> </select> <div id="role_members"> </div> </div> <div class="col-xs-3 col-sm-2 col-md-3" style="float:right;"> <input type="text" id="to_date" name="to_date" placeholder="To date" class="data_filter" /> </div> <div class="col-xs-3 col-sm-2 col-md-3" style="float:right;"> <input type="text" id="from_date" name="from_date" placeholder="From date" class="data_filter" /> </div> </div> <div class="row" style="background-color:white;margin-top:10px;"> <div class="col-xs-12"> <!-- PAGE CONTENT BEGINS --> <div class="hr dotted"></div> <div> <div class="row search-page" id="search-page-1"> <div class="col-xs-12"> <div class="row"> <div class="col-xs-12 col-sm-12"> <div class="row"> <div id="addele_more"> <table class="table table-responsive export_todays_sales" id="maintable"> <thead> <tr id="column_id"> <th>Account Owner</th> <th>Account Name</th> <!-- <th>Email Id</th> --> <th>Invoice Date</th> <th>Invoice Amount</th> </tr> </thead> <tbody id="filer_data"> <?php $grand_total=0; foreach($quotations as $value){ ?> <tr> <td><?php echo $value->user_name; ?></td> <td><a href="<?php echo site_url("account-info/$value->account_id");?>"> <?php echo $value->account_name;?></a></td> <!-- <td> </td> --> <td><?php echo date("d-m-Y", strtotime($value->invoice_date)); ?></td> <?php $grand_total=$grand_total + $value->amount; ?> <td><?php echo $value->amount; ?></td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> </div><!-- /.col --> </div><!-- /.row --> </div><!-- /.page-content --> </div> <div class="row" style="padding-bottom:20px;" > <div class="col-sm-3"> <label> Total Amount</label> </div> <div class="col-sm-9" > <input type="text" class="quot_number" id="grand_total" name="amount" value="<?php echo $grand_total; ?> " style="width:50%;border:none !important;border-bottom:1px solid #ddd !important" required="required"></input> </div> </div> </div><!-- /.main-content --> <div class="footer"> <div class="footer-inner"> <div class="footer-content"> <span class="blue">All Right Reserved © 2017</span> <a href=""> Yaskawa</a> </div> </div> </div> <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> </a> </div><!-- /.main-container --> <!-- <script src="<?php echo base_url('admin_assets/assets/js/jquery-2.1.4.min.js');?>"></script> --> <!-- <script src="<?php echo base_url('admin_assets/assets/js/bootstrap.min.js');?>"></script> --> <!-- page specific plugin scripts --> <!-- ace scripts --> <!-- inline scripts related to this page --> <link href="http://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet"> <script src="<?php echo base_url('admin_assets/assets/js/jquery-ui.js');?>"></script> <script src="<?php echo base_url('admin_assets/assets/datatables/jquery.dataTables.min.js');?>"></script> <script src="<?php echo base_url('admin_assets/assets/datatables/dataTables.bootstrap.min.js');?>"></script> <link rel="stylesheet" href="<?php echo base_url('admin_assets/assets/datatables/dataTables.bootstrap.css');?>"> </body> </html> <style> article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block} body{line-height:1;} ol,ul{list-style:none} blockquote,q{quotes:none} blockquote:before,blockquote:after,q:before,q:after{content:none} table{border-collapse:collapse;border-spacing:0} body{background:#F7F7F7;width:100%;height:100%;font-family:'Roboto', helvetica, sans-serif;} .container { margin:150px auto; max-width:600px;} h2 { margin:30px auto;} </style> <script type="text/javascript"> $(document).on("change",".data_filter",function() { var member=$("#member").val(); var from_date = $("#from_date").val(); var to_date = $("#to_date").val(); $.ajax({ type:"POST", url:"<?php echo site_url('yaskawa/individual_sales_filter'); ?>", data:{'member':member,'from_date':from_date,'to_date':to_date}, success : function(response){ var res=jQuery.parseJSON(response); console.log(response); var content=''; if(res.result==1) { $.each(res.date_result,function(idx,vx) { content+='<tr>'; content+='<td>'+vx.user_name+'</td>'; content+='<td><a href="<?php echo site_url();?>/account-info/'+vx.account_id+'">'+vx.account_name+'</a></td>'; content+='<td>'+vx.invoice_date+'</td>'; content+='<td>'+vx.amount+'</td>'; content+='</tr>'; $("#filer_data").html(content); }); } else if(res.result==0) { //alert("Date not found"); $("#filer_data").empty(); } } }); }); $(document).on("change","#member",function(){ var role_id = $("#member").val(); $.ajax({ type:"POST", url:"<?php echo site_url('yaskawa/role_wise_filter'); ?>", data:{'role_id':role_id}, success : function(response){ var res=jQuery.parseJSON(response); console.log(response); var content=''; if(res.result==1) { content+='<div class="col-xs-3 col-sm-2 col-md-3">'; content+='<select theme="dark" width="220px" style="" placeholder="Select Your Favorite" data-search="true" id="user_id" name="user_id">'; content+='<option value=" ">Select</option>'; $.each(res.date_result,function(idx,vx){ if(vx.user_id != 1){ content+='<option value="'+vx.user_id+'">'+vx.user_name+'</option>'; } }); content+='</select>'; content+='</div>'; $("#role_members").html(content); } } }); }); $(document).on("change","#user_id",function(){ $("#grand_total").val(''); var userid = $("#user_id").val(); $.ajax({ type:"POST", url:"<?php echo site_url('yaskawa/employee_wise_filter'); ?>", data:{'userid':userid}, success : function(response){ var res=jQuery.parseJSON(response); console.log(response); var content=''; if(res.result==1) { var grand_total = 0; $.each(res.date_result1,function(idx,vx) { content+='<tr>'; content+='<td>'+vx.user_name+'</td>'; content+='<td><a href="<?php echo site_url();?>/account-info/'+vx.account_id+'">'+vx.account_name+'</a></td>'; content+='<td> </td>'; content+='<td>'+vx.invoice_date+'</td>'; content+='<td>'+vx.amount+'</td>'; grand_total = parseInt(grand_total)+parseInt(vx.amount); content+='</tr>'; $("#filer_data").html(content); $("#grand_total").val(grand_total); }); } else if(res.result==0) { //alert("Date not found"); $("#filer_data").empty(); } } }); }); </script> <script type="text/javascript"> $("#from_date").change(function(){ var from_date=$("input[name=from_date]").val(); $.ajax({ type:"POST", url:"<?php echo site_url('other_account_filter'); ?>", data:{'from_date':from_date}, success:function(response){ } }); }); </script> <script type="text/javascript"> $(function(){ $("#from_date").datepicker({ dateFormat: 'dd-mm-yy', }).on('changeDate', function(ev){ $('#from_date').datepicker('hide'); }); $("#to_date").datepicker({ dateFormat: 'dd-mm-yy', }).on('changeDate', function(ev){ $('#to_date').datepicker('hide'); }); }); $(document).on("change","#report_value",function(e) { var report_id = []; var report_val = $('#report_value').val(); $(".move_reports:checked").each(function() { report_id.push($(this).attr('id')); }); $.ajax({ type : 'post', url : '<?php echo site_url("move-reports")?>', data : {"report_id":report_id,"report_val":report_val}, success:function(response){ response=jQuery.parseJSON(response); console.log(response); if(response.result==1) { alert("Reports Moved"); //location.reload(); } else { alert("Reports did not moved"); } } }); }); </script> <script> function setLocally (el) { el.previousElementSibling.classList.toggle('yellow'); } $(document).on("click",".report",function(){ var acc_report_id = $(this).attr('id'); $.ajax({ type : 'post', url : '<?php echo site_url("acc-update-favorite-reports")?>', data : {"acc_report_id":acc_report_id}, success:function(response){ response=jQuery.parseJSON(response); console.log(response); if(response.result==1) { alert("Reports Added to Favorite List"); //location.reload(); } else { alert("Reports already added to your favorite list"); } } }); }); </script> <script type="text/javascript"> $(document).ready(function() { $('#remove_records').click(function(){ var id=[]; $(".move_reports:checked").each(function(i) { var acc_report_id = $(this).attr('id'); id.push(acc_report_id); }); test(id); }); function test(id) { $.ajax({ type:"POST", url:'<?php echo site_url('yaskawa/acc_remove_records');?>', data:{'report_ids':id}, success:function(response){ response=jQuery.parseJSON(response); console.log(response); if(response.result==1) { alert("Deleted Successfully"); location.reload(); } else { alert("Something went wrong..Try again"); } } }); } }); </script> <style type="text/css"> .hoverr:hover .addd { display:block; } .addd{ display:none; } .add_more { padding: 0px 7px !important; font-size: 12px !important; } #block{display:none;padding-left:10px;} .pd-7{ padding-right:7px !important; padding-left:7px !important; } .pd-9{ padding:2px 9px !important; } </style> <script> $('#cbxShowHide').click(function(){ this.checked?$('#block').show():$('#block').hide(); }); </script> <script> $(function() { $('#popup-datepic').datepicker({ //.. }); }); </script> <script> $('#calendar').datepicker({ }); !function ($) { $(document).on("click","ul.nav li.parent > a > span.icon", function(){ $(this).find('em:first').toggleClass("glyphicon-minus"); }); $(".sidebar span.icon").find('em:first').addClass("glyphicon-plus"); }(window.jQuery); $(window).on('resize', function () { if ($(window).width() > 768) $('#sidebar-collapse').collapse('show') }) $(window).on('resize', function () { if ($(window).width() <= 767) $('#sidebar-collapse').collapse('hide') }) </script> <style> .favourite_icon { color: white } .favourite_icon2 { color: black } .favourite_icon.yellow { color: #438EB9 } </style> <script type="text/javascript"> $(document).ready(function(){ var datatable; var tbody = $('#table_body'); datatable = $('.table').DataTable({ }); }); </script>