<div class="body-content">

                        <div class="row">

                            <div class="col-md-12 col-lg-12">

                                <div class="card mb-4">

                                    <div class="card-header">

                                        <div class="d-flex justify-content-between align-items-center">

                                            <div>

                                                <h6 class="fs-17 font-weight-600 mb-0">Clients  <?php echo $this->uri->segment(3);?>  Deposite</h6>

                                            </div>

                                            

                                        </div>

                                    </div>

                                    

                                    <div class="card-body">

                                    <table class="table display table-bordered table-striped table-hover enable-disable">



                    <thead bgcolor="#666666" style="color:#FFF;"><tr><th>S.No.</th><th>Date</th><th>Amount</th><th>User</th><th>Reference/Remarks</th><th>Status</th><th>Action</th></tr></thead>



                    <tbody>



                        <?php $i=1;foreach($deposites as $dep){?>



                        <tr id="<?php echo 'depo-'.$dep->depid;?>"><td><?php echo $i;?></td>



                            <td><?php echo date("d M'y",strtotime($dep->dep_submit_date));?></td>



                            <td><?php echo $dep->dep_amt;?></td>



                            <td><?php echo $dep->first_name.' '.$dep->last_name;?></td>



                            <td><?php echo $dep->rect_number.' '.$dep->dep_remarks;?></td>



            



                            <td><?php 



							if($dep->dep_status=="Reject"){?>



                            <span class="badge badge-danger">Reject</span><?php }else



							if($dep->dep_status=="Approved"){?>



                            <span class="badge badge-success">Approved</span><?php }else{?>



                            <span class="badge badge-warning">Pending</span><?php }echo '<br/>'.$dep->admin_remarks;?></td>


                            <td><?php if(!$this->uri->segment(3)){?>
                            <a href="" class="btn btn-primary view_depo btn-sm"  data-toggle="modal" data-target="#depo_modal" id="<?php echo $dep->depid;?>"><i class="fa fa-eye"></i> View</a><?php }?>
                            
                            <a class="btn btn-sm btn-danger depdelete" title="delete"  href="#" id="<?php echo $dep->depid;?>"><i class="fa fa-trash"></i></a></td></tr>



                        <?php $i++;}?>



                    </tbody>



                </table>


<div class="modal fade" id="depo_modal" role="dialog">

            <div class="modal-dialog modal-sm">

              <div class="modal-content">

                <div class="modal-header">

                  <h5 class="modal-title text-warning">Client Deposite Request</h5>

                  <button type="button" class="close" data-dismiss="modal">&times;</button>

                </div>

                <div class="modal-body depo_div">

                </div>

              </div>

            </div>

        </div>
                <script>



				$(document).ready(function(){

					$(".view_depo").click(function(e){e.preventDefault();
						var id=$(this).attr("id");
						$(".depo_div").html('<h5>Fetching Details...</h5>');
						$.ajax({
							 type: "POST",
							 url: '<?php echo base_url();?>mcxadmin/ajax_depo_view',
							 data: {id:id},
							 success: function(res){
								 	$(".depo_div").html(res);
								}
							 });
					});

					$(".approve_form").submit(function(e){e.preventDefault();



						var formdata=$(this).serialize();



						//alert(formdata);



						$.ajax({



							 type: "POST",



							 url: '<?php echo base_url();?>mcxadmin/approve_form_submit',



							 data: {formdata:formdata},



							 success: function(response){alert(response);



								//$("#quick_view").html(response);



								}



							 });



						});



					$(".appr_form").change(function(){



						$(this).closest("form").trigger("submit");



					});



					//$(".remarks").keyup(function(){



//						$(this).closest("form").trigger("submit");



//					});



				});



				</script>

      </div>

                    				</div>

                                </div>

                            

                            </div>

                        </div>

                    </div><!--/.body content-->

                </div><!--/.main content-->

                

            </div><!--/.wrapper-->

        </div>

        <!--Global script(used by all pages)-->

        <script>



	$(document).ready(function(){



		$(".depdelete").click(function(e){e.preventDefault();



		if (!confirm("Sure you want to delete?")){



				  return false;



				}



			var id=$(this).attr("id");



			$(this).closest("tr").remove();



			$.ajax({



							 type: "POST",



							 url: '<?php echo base_url();?>mcxadmin/depdelete',



							 data: {id:id},



							 success: function(response){



								 //alert(response);



							 }



							 });



		});



	});



</script>

        

        <script src="<?php echo base_url();?>backend/plugins/metisMenu/metisMenu.min.js"></script>

        <script src="<?php echo base_url();?>backend/plugins/perfect-scrollbar/dist/perfect-scrollbar.min.js"></script>

        <!-- Third Party Scripts(used by this page)-->

        <script src="<?php echo base_url();?>backend/plugins/sparkline/sparkline.min.js"></script>

        <!--Page Active Scripts(used by this page)-->

        <script src="<?php echo base_url();?>backend/dist/js/pages/dashboard.js"></script>

        

        <script src="<?php echo base_url();?>backend/plugins/datatables/dataTables.min.js"></script>

        <script src="<?php echo base_url();?>backend/plugins/datatables/dataTables.bootstrap4.min.js"></script>

        <!--Page Active Scripts(used by this page)-->

        <script src="<?php echo base_url();?>backend/plugins/datatables/data-basic.active.js"></script>

        <!--Page Scripts(used by all page)-->

        <script src="<?php echo base_url();?>backend/dist/js/sidebar.js"></script>

    </body>

</html>