 
<?php $__env->startSection('content'); ?>
<div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
			<h1 class="pull-left"><?php if($loyalty->loyalty_type==2): ?> Report- Credits Redeemed <?php else: ?> Report- Stamps Redeemed <?php endif; ?> </h1>
			<br><br>
			<?php echo $__env->make('includes.messages', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        </section>
      
        <!-- Main content -->
		<section class="content">
        <div class="row">
			<div class="col-md-4" style="">&nbsp;</div>
				<div class="col-md-4" style="">
					<a href="<?php echo url('merchant/getredeemDownloadReport'); ?>"><input type="button" class="btn btn-primary" name="view report" value="Download Excel"></a>
				</div>
		
			<div class="col-md-4" style="float:right;">
			 	<?php echo Form::open(array('url'=>'merchant/reportpointredeem','method'=>'GET','role'=>"form",'files'=>true,'id'=>'adds-add-form')); ?>

					<div class="col-md-8">
							<div class="form_group">
								<?php echo Form::text('name',Input::old('name'),array('class' => 'form-control')); ?>

							</div>
					</div>
					
					<div class="form_group">
						<?php echo Form::label('', '',['class' => '']); ?>

						<input type="submit" class='btn btn-primary' name="Search" value="Search">&emsp;
					</div>
				<?php echo Form::close(); ?>

			</div><br/><br/>
		</div>
		<div class="row">
            <div class="col-md-12">
              <div class="box">
					<div class="box-body">
					 <?php if(count($data1) == 0): ?>
					<p class='notice'><?php echo trans('admin::users.pages.no_record_found'); ?></p>
				<?php else: ?>
					 <table id="userdetail" class="table table-bordered table-striped">
                  				<thead>
                  				<tr>
								<th>Date</th>
								<th>Time</th>
								<th>Name</th>
								<th>Mobile Number</th>
								<th>Bill Number</th>
								<th>Bill Amount</th>
								<th>Net Bill Amount</th>
								<th><?php if($loyalty->loyalty_type==2): ?> Credits <?php else: ?> Stamps <?php endif; ?> Redeemed </th>
								<th>Redeemed By </th>
								<th>Comments</th>
								<th>Merchant Id</th>
								</tr>
								</thead>
							<tbody>
								<style>
								tr td table{
												text-align: center;
											}
								tr td table tr th{}
								</style>	
                    	<?php foreach( $data1 as $dd ): ?>
							                              
							  <?php 
								/*$key1=(new BaseController())->generate_key_string();
								$key2=(new BaseController())->generate_key_string();
								$en1=(new BaseController())->encryption($key2.'_'.$dd->user_id);
								$en2=(new BaseController())->encryption($key1.'_'.$dd->merchant_id);
								$str1=strtr(base64_encode($en1), '+/=', '-_,');
								$str2=strtr(base64_encode($en2), '+/=', '-_,');*/
							?> 
							<tr> 	
								<td><?php echo date('Y-m-d',strtotime($dd->created_at)); ?></td>
								<td><?php echo date('H:i:s',strtotime($dd->created_at)); ?></td>
								<td><?php echo $dd->name; ?></td>
                  				<td><a href="<?php echo url('merchant/appuser/views/'.$dd->user_id.'/'.$dd->merchant_id); ?>"><?php echo $dd->mobile; ?></a></td>
								<td><?php echo $dd->bill_no; ?></td>
								<td><?php echo $dd->bill_amount; ?></td>
								<td><?php echo $dd->netbill_amount; ?></td>
								<td><?php echo $dd->point_redeem; ?></td>
                  				
								<td><?php echo $dd->redeem_by; ?></td>
								<td><?php echo $dd->feedback; ?></td>
								<td><?php echo $dd->M_account; ?></td>
							</tr>
					   <?php endforeach; ?>
					
							</tbody>
                </table>
					 <?php endif; ?>
					</div><!--close boxbody-->
				</div><!--close box-->
<?php $name = Input::get('name'); ?>
<?php echo $data1->appends(array('name' => $name))->links(); ?>	
			</div><!--close col-md-12-->
		</div><!--close row-->	
</div>	
      
          <?php $__env->startSection('scripts'); ?>
<script type="text/javascript">

/*$('#userdetail').DataTable({
	
    "pageLength":10,
    "ordering": false,
    "lengthMenu": [5, 10, 25, 50, 75, 100 ]
});
$(document).ready(function() {
    $('#userdetail').DataTable( {
        "processing": true,
        "serverSide": true,
	"pageLength":10,
   	 "ordering": false,
    	"lengthMenu": [5, 10, 20, 50, 75, 100 ]
        "ajax": "<?php echo url('merchant/appuser2'); ?>"
    } );
} );*/
</script>
<?php $__env->stopSection(); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.merchant-backend-layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>