HEX
Server: Apache/2.4.41 (Amazon) OpenSSL/1.0.2k-fips PHP/5.6.40
System: Linux ip-172-31-40-18 4.14.146-93.123.amzn1.x86_64 #1 SMP Tue Sep 24 00:45:23 UTC 2019 x86_64
User: apache (48)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: /var/www/html/taxicamera/applicationold/views/admin/driver_settlement/driver_settlement_list.php
<div class="main-content">
  <div class="content-wrapper">
    <div class="container-fluid">
      <!-- Basic form layout section start -->
      <section id="basic-form-layouts">
      	<div class="row">
      		<div class="col-md-12">
      			<div class="card">
      				<div class="card-header">
      					<div class="page-title-wrap">
      						<h4 class="card-title">Driver Settlement List</h4>      						
      					</div>
      				</div>
      				<div class="card-body">
      					<div class="px-3">
      						<form class="form custom_form_style">
      							<div class="form-body">      							
      								<div class="row">      									
      										<div class="table-responsive custom_table_area">
      											<table class="table table-striped table-bordered dom-jQuery-events c_table_style">
                                  <thead>
                                      <tr>
      																	<th>Sl. No</th>
      																	<th>Shift Id</th>
      																	<th>Driver Name</th>
      																	<th>DC</th>
                                        <th>Car No.</th>
      																	<th>Settlement Date</th>
      																	<th width="10%">Payin/Payout Amount</th>
      																	<th class="no-sorting">Action</th>
                                      </tr>
                                  </thead>
                                  <tbody>
                                  <?php if($driver_settlement_list): ?>
                                  <?php   foreach($driver_settlement_list as $key => $list): 
                                            if($list['middle_name']!=''){
                                              $middle_name  = $list['middle_name'].' ';
                                            }
                                            else{
                                              $middle_name  ='';
                                            }
                                  ?>
                                              <tr>
                                                  <td><?php echo $key+1; ?></td>
                                                  <td><?php echo $list['shift_no']; ?></td>
                                                  <td><?php echo $list['first_name'].' '.$middle_name.$list['last_name']; ?></td>
                                                  <td><?php echo $list['dc_no']; ?></td>
                                                  <td><?php echo $list['car_no']; ?></td>
                                                  <td><?php echo date('d/m/Y',strtotime($list['created_on'])); ?></td>
                                                  <td><?php echo $list['final_settlement_amt']; ?></td>
                                                  <td class="no-sorting">
                                                    
                                                    <a title="Detail/View"href="<?php echo base_url().'admin/DriverSettlement/DriverSettlementDetail/'.$list['dr_settlement_id']; ?>" class="ser_book_btn"><i class="fa fa-eye" aria-hidden="true"></i>
                                                    </a> 
                                                    
                                                    <a title="Edit" href="<?php echo base_url().'admin/DriverSettlement/DriverSettlementEditView/'.$list['dr_settlement_id'].'/edit'; ?>" class="ser_book_btn"><i class="fa fa-pencil" aria-hidden="true"></i>
                                                    </a>
                                                  
                                                  </td>  
                                              </tr>
                                  <?php   endforeach; ?>
                                  
                                  <?php endif; ?>    
                                  </tbody>
                              </table>
      									</div>
      								</div>
      							</div>
      						</form>
      					</div>                
      				</div>
      			</div>            
      		</div>
      	</div>
      </section>
      <!-- // Basic form layout section end -->      
    </div>
  </div>
</div>
<script>
$(document).on("change","#driver_list",function(){
    var driver_id = $(this).val();
    $.ajax({
        type: "POST",
        url: '<?php echo base_url('admin/DriverRefundSettlement/ajaxDriverSettlementData')?>',
        data:{driver_id : driver_id},
        dataType:'json',
        success: function(response){
          //alert(response['driver_id']);
          if(response['previous_refund_not_settle'] !='0'){
            $("#bond_amt").val(response['bond_amt']);
            $("#driver_id").val(response['driver_id']);
            $("#bond_accumulated_amt").val(response['bond_accumulated_amt']);
          }
          else{
            $("#driver_refund_modal").html('Previous refund not settled.');
            $("#driver_refund_modal").css('color','red');
          }        
        },
        error:function(response){
          $.alert({
             type: 'red',
             title: 'Alert!',
             content: 'error',
          });
        }
    });
})
</script>
  </body>
</html>