<div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1 class="m-0 text-dark">Payment Details
            </h1>
          </div><!-- /.col -->
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item "><a href="<?= base_url(); ?>/dashboard">Dashboard</a></li>
              <li class="breadcrumb-item active">Payment Details</li>
            </ol>
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
    <div class="card">
        <div class="card-body p-0">
         <div class="table-responsive">
                    <table id="triptbl" class="table card-table table-vcenter text-nowrap">
                      <thead>
                        <tr>
                          <th class="w-1">S.No</th>
                           <th>Payment Transaction id</th>
                          <th>Customer Num</th>
                           <th>Customer Name</th>
                           <th>Driver Name</th>
                           <th>Driver Num</th>
                          <th>Payment Type</th>
                          <th>Payment Amount</th>
                          <!-- <th>Payment Status</th> -->
                          <!-- <th>Payment date</th> -->
                        <?php if(userpermission('lr_payment_view')){ ?> 
                        <th>Action</th>
                        <?php } ?>
                        </tr>
                      </thead>
                        <tbody>
                     <?php if(!empty($payment)){ $count=1;
                        foreach($payment as $payments){
                        ?>
                     <tr>
                        <td> <?php echo output($count); $count++; ?></td>
                        <td> <?php echo output($payments['tp_payment_transaction_id']); 
                         ?></td>
                         <td> <?php echo output($payments['c_mobile']); 
                         ?></td>
                         <td> <?php echo output($payments['c_name']); 
                         ?></td>
                         <td> <?php echo output($payments['d_name']); 
                         ?></td>
                           <td> <?php echo output($payments['d_mobile']); 
                         ?></td>
                         <td> <?php echo output($payments['tp_payment_method_type']); 
                         ?></td>
                         <td> <?php echo output('₹'.$payments['tp_payment_amount']); 
                         ?></td>
                       
                        <!--  <td><span class="badge <?php echo ($payments['tp_payment_status']=='1') ? 'badge-success' : 'badge-danger'; ?> "><?php echo ($payments['tp_payment_status']=='1') ? 'Success' : 'Failed'; ?></span>  
                        </td> -->

                     <!--     <td> <?php echo output($payments['tp_payment_date_time']); 
                         ?></td> -->
                         <?php if(userpermission('lr_payment_view')){ ?>
                          <?php if($payments['tp_payment_method_type'] !='Cash'){ ?>
                         <td>
                           <a class="icon" href="<?php echo base_url(); ?>Payment/viewpaymentdetails/<?php echo output($payments['tp_id']); ?>" >
                           <i class="fa fa-eye"></i>
                           </a>
                        </td>
                         <?php } ?>
                         <?php if($payments['tp_payment_method_type'] =='Cash'){ ?>
                         <td>
                           <a class="icon" href="<?php echo base_url(); ?>Payment/cashdetails/<?php echo output($payments['tp_id']); ?>" >
                           <i class="fa fa-eye"></i>
                           </a>
                        </td>
                         <?php } ?>
                         <?php } ?>
                        
                     </tr>
                     <?php } } ?>
                  </tbody>
                    </table>
                   
        </div>         
        </div>
        <!-- /.card-body -->
      </div>
      
             </div>
    </section>
    <!-- /.content -->
