<div class="breadcrumb-oitila db-breadcrumb">
                <div class="container">
                    <div class="row justify-content-lg-around">
                        <div class="col-xl-6 col-lg-7 col-md-5 col-sm-6 col-8">
                            <div class="part-txt">
                                <h1>Transactions</h1>
                                <ul>
                                    <li>home</li>
                                    <li>All Transactions</li>
                                </ul>
                            </div>
                        </div>
                        <div class="col-xl-6 col-lg-5 col-md-7 col-sm-6 col-4 d-flex align-items-center">
                            <div class="db-user-profile">
                                <div class="part-data">
                                    <span class="name"><?php echo $this->session->userdata("name");?></span>
                                    <ul>
                                        <li>
                                            <span class="text">ClientID</span>
                                            <span class="number"><?php echo 'CL00'.$this->session->userdata("user");?></span>
                                        </li>
                                        <li>
                                            <span class="text">Balance</span>
                                            <span class="number"><?php 	$this->db->order_by("trid","desc");

					$chk=$this->db->get_where("transaction",array("userid"=>$this->session->userdata("user")));

					if($chk->num_rows()>0){

                    $l=$chk->row();

                    echo $wallet=$l->left_amt;}else{echo $wallet=0;}?></span>
                                        </li>
                                    </ul>
                                </div>
                                <div class="part-img">
                                    <img src="<?php echo base_url();?>frontend/assets/img/member-1.jpg" alt="">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- breadcrumb end -->

            <!-- account begin -->
            <div class="user-dashboard">
                <div class="container">

                    <div class="dashboard-menu">
                        <nav>
                            <ul>
                                <li class="nav-item">
                                    <a class="nav-link" href="<?php echo base_url();?>dashboard">Dashboard</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="<?php echo base_url();?>deposite">Deposite</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="<?php echo base_url();?>withdrawls">Withdrawls</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link active" href="#">Transactions</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="<?php echo base_url();?>account">My Profile</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="<?php echo base_url();?>logout">Logout</a>
                                </li>
                            </ul>
                        </nav>
                    </div>

                    <div class="user-statics">
                        <div class="row">
                        	<div class="col-xl-12 col-lg-12 col-md-12">
                                <h3 class="title"> All Transactions</h3>
                                <table id="fullMcxPriceTable" class="display misco-data-table" style="width:100%">
                                <thead><tr bgcolor="#d4cbff">



													<th>S.No.</th>



                                                    <th>Date</th>



                                                    <th>Trans.Type</th>



                                                    <th>Limit</th>



                                                    <th>Stoploss</th>



                                                    <th>Target</th>



                                                    <th>Sq.Off</th>



                                                    <th>Amount</th>



                                                    <th>Credit/Debit</th>




                                                    <th>Balance</th>






												</tr></thead>
                                <tbody>



                                            <?php  $i=1;foreach($report as $r){?>



                                            <tr>



                                            	<td><?php echo $i;?></td>



                                            	<td><?php echo $r->tr_date;?></td>



                                            	<td><?php if($r->buysell_id!=""){echo $r->metal.' '.$r->type;}else{echo $r->tr_desc;}?></td>



                                            	<td><?php echo $r->setlimit;?></td>



                                                <td><?php echo $r->stoploss;?></td>



                                                <td><?php echo $r->target;?></td>



                                                <td><?php echo $r->last_live;?></td>



                                                <td><?php echo $r->tr_amt;?></td>



                                                



                                            	<td><?php if($r->tr_type=='Credit'){echo '<label class="badge badge-success">Credit</label>';}else{echo '<label class="badge badge-danger">Debit</label>';}?></td>



                                            	<td><?php echo $r->left_amt;?></td>



                                            	



                                            </tr>



                                            <?php $i++;}?>



                                            </tbody>
                            </table>
                            </div>	
                    	</div>
                </div>
            </div>
           	<script>
			$(document).ready(function(){
				$("#wform").submit(function(e){e.preventDefault();
					var formdata=$(this).serialize();
					$.ajax({
					 type: "POST",//dataType:'json',
					 url: '<?php echo base_url();?>home/ajax_wform_submit',
					 data: {formdata:formdata},
					 success: function(res){//alert(res.target);
							alert(res);
						 }
					 });
				});
				
				$(".wdelete").click(function(e){e.preventDefault();



		if (!confirm("Sure you want to cancel withdrawal request?")){



				  return false;



				}



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



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



			$.ajax({



							 type: "POST",



							 url: '<?php echo base_url();?>home/wdelete',



							 data: {id:id},



							 success: function(response){



								 //alert(response);



							 }



							 });



		});
			});
			</script>
            